fix: the wallet's own send shows its amount to four decimal places (closes #522)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

ConfirmTx and the wait, success and error screens printed the text from
Send's amount field as typed or as Max filled it in: `0.5 ETH`, `.5 ETH`, or
`1.234147890123456789 ETH` after Max, where TxApproval shows a site's send
as `0.5000 ETH`. ConfirmTx now writes the amount as TxApproval does: parsed
at the scale it is encoded with, written back as plain decimal text, and cut
by truncateAmountNeverZero(). It hands the status screens a copy carrying
that text. The transaction is still signed for the exact amount, which stays
on the pending transaction, and the USD value is priced from it. A saved
confirmation screen whose amount is not text is no longer redrawn.

Model: opus-5-5
This commit is contained in:
2026-10-19 13:51:04 +00:00
parent c99772a520
commit e9dc1fdccd
9 changed files with 513 additions and 44 deletions
+13
View File
@@ -477,6 +477,19 @@ const CONTRACT = [
views: ["confirm-tx"],
restored: false,
},
// The amount line splits the amount to cut it to four decimals.
{
value: {
pendingTx: {
token: "ETH",
from: ADDRESS,
to: ADDRESS,
amount: 42,
},
},
views: ["confirm-tx"],
restored: false,
},
// A chain id naming no network has no explorer to link to.
{
value: {