feat: a "Max" button on the Send screen (closes #198)
check / check (push) Failing after 3s
e2e / e2e-chrome (push) Failing after 2s
e2e / e2e-firefox (push) Failing after 2s

Max fills in a token's whole balance, cut down to the 18 decimal places the
confirmation screen accepts, or for ETH the exact balance minus the fee
reserve the confirmation screen's balance check gates on. An ETH fee estimate
that finishes after the Send screen was left, or its address, holding or
recipient changed, fills nothing in. The confirmation screen works a max ETH
amount out again from its own fee estimate and signs it with that estimate's
fee fields, so a fee that rose before signing cannot push amount plus fee
above the balance. validateTransfer() still gates every send, the check that
ETH covers a token send's fee included. Where there is nothing to fill in, a
flash message says why.

Model: opus-5-5
This commit is contained in:
2026-10-05 04:49:38 +00:00
parent cf7ca99215
commit b60eec9197
9 changed files with 823 additions and 35 deletions
+2 -1
View File
@@ -240,7 +240,8 @@ screen. Tokens can also be added from Settings, under "Tracked Tokens".
2. Select what to send (ETH, or any ERC-20 token with a balance on this address
that survives the spam filters).
3. Enter the recipient address or ENS name (e.g. `vitalik.eth`).
4. Enter the amount.
4. Enter the amount, or click "Max" to fill in everything you can send: a
token's whole balance, or your ETH balance minus the network fee.
5. Click "Review" to see the confirmation screen.
The confirmation screen shows: