Make MAX and multi-recipient send exclusive - #6178
Open
j0ntz wants to merge 1 commit into
Open
Conversation
Contributor
Author
MAX spends the entire spendable balance, which only has a coherent meaning for a single recipient. The send scene now hides the MAX button whenever the send has more than one spend target, and withholds the "Add another address" row while a MAX amount is set, so the two can no longer be combined into a transaction that always fails with insufficient funds.
j0ntz
force-pushed
the
jon/remove-max-multi-recipient
branch
from
August 28, 2026 02:35
5526b61 to
62ef387
Compare
j0ntz
marked this pull request as ready for review
August 28, 2026 02:35
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Description
Asana: https://app.asana.com/0/1215088146871429/1209203315991847
MAX spends the entire spendable balance, which only has a coherent meaning for a
single recipient. Since the send scene gained 1-to-many support, MAX and
multi-send conflict in both orderings:
honors
maxSpendSetter === 0, so a max requested by any later target setsstate that nothing consumes.
send fails with Insufficient Funds, because recipient 1 already claims the
whole balance.
The operator's decision on the task (after twice rejecting a per-target
remainder calculation) is to make the two mutually exclusive. This does that in
both directions:
handleFlipInputModalpasseshideMaxButtontoFlipInputModal2once thesend has more than one spend target. The prop already existed and is gated in
ExchangedFlipInput2alongsidenoMaxSpend, so no new plumbing.renderAddAddresswithholds the "Add Another Address" row while a max spendis set. Clearing the max instead would silently discard an amount the user
deliberately chose, so the entry point is withheld rather than the amount
rewritten.
Single-recipient sends are unchanged, and currencies with
maxSpendTargets < 2never reach either branch.
Testing
Driven on the iOS simulator against a funded Bitcoin Testnet wallet
(
maxSpendTargets32, same multi-send path as mainnet BTC):the row back, so the two frames differ only in
maxSpendSetter.tsc --noEmit, jest (SendScene2 snapshots unchanged), andverify-repo.shall pass.