mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-12 04:03:21 +00:00
recieve_token swaps the incoming proofs at the same mint with include_fees=True (paying the mint's NUT-02 per-proof input fee) but credited the full face value. On every topup from a fee-charging trusted mint, routstr over-credited the user by the fee and its own wallet drifted toward insolvency. Subtract get_fees_for_proofs(proofs) from the credited amount, mirroring the foreign-mint swap path which already accounts for it. Adds a fee-charging trusted-mint unit test (credited == face - input_fee). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>