Files
minibits_wallet/__tests__
minibits-cash 4a3a7efbb4 Debug-only mock for multi-tier onchain fee options
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.
2026-07-14 23:13:22 +02:00
..
2026-06-27 23:55:40 +02:00
2026-07-08 15:44:11 +02:00