fix: Send refuses every amount the confirmation screen would refuse (closes #532) #567

Merged
clawbot merged 1 commits from issue-532-send-amount-rule into next 2026-10-18 22:46:08 +02:00
1 Commits
Author SHA1 Message Date
sneak 75a24b59e7 fix: Send refuses every amount the confirmation screen would refuse (closes #532)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
Send accepted any amount parseFloat() read as above zero, so "1e-3",
"1abc" and an amount with a nonzero digit past the token's decimal places
reached ConfirmTx, which then refused them. isValidAmount() in
src/shared/txValidation.js is now the one check: Review and Max on Send
call it with the token's decimal places, and validateTransfer() calls it
for ConfirmTx, which now also refuses a zero amount and a token amount
with a nonzero digit past the token's places. Zeros past those places
are accepted, since the amount encoded for the transfer is the same.

Model: opus-5-5
2026-10-18 19:34:11 +00:00