mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-05 19:28:26 +00:00
The CDK fakewallet returns exactly ONE fee_option, so against the only mint we can test against the picker always collapses to its single-tier read-only row and the multi-tier path never runs. mockOnchainFeeTiers fabricates a slower/cheaper and a faster/dearer tier around whatever the mint sent. Flip MOCK_FEE_TIERS in OnchainTransferScreen to see three. What is mocked is the CHOICE, not the payment. NUT-30 requires the mint to reject a melt whose fee_index it never offered, so a fabricated index cannot be paid with — the mint's real tier survives the mock untouched, and payableFeeIndex resolves any mocked selection back to it on submit. The melt therefore goes through at the mint's real price whichever tier is picked; only the displayed estimate was invented. Mocked rows say so in plain text, because an unmarked invented fee reserve sitting next to real ones is exactly the sort of thing that gets believed later. No-op when the mint already offered more than one tier: overwriting real tiers with invented ones would be worse than useless. 87 tsc (unchanged baseline), 328/328.