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

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`, or
`1.234147890123456789 ETH` after Max, where TxApproval shows a site's send
as `0.5000 ETH`. ConfirmTx now shows the amount through
truncateAmountNeverZero(), as TxApproval does, and 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, since the amount is now split.

Model: opus-5-5
This commit is contained in:
2026-10-19 12:57:55 +00:00
parent a73fb17295
commit 3a1ee7e6da
9 changed files with 458 additions and 36 deletions
+2 -2
View File
@@ -333,7 +333,7 @@ function expectNativeTransferOn(networkId) {
"Native " + symbol + " transfer",
);
expect(el("confirm-amount").textContent).toBe(
"1 " + symbol + usdOn(networkId, "$2,000.00"),
"1.0000 " + symbol + usdOn(networkId, "$2,000.00"),
);
expect(el("confirm-balance").textContent).toBe(
"5.0000 " + symbol + usdOn(networkId, "$10,000.00"),
@@ -649,7 +649,7 @@ describe.each([
`href="${explorerUrl}/address/${TOKEN}"`,
);
expect(el("confirm-amount").textContent).toBe(
"10 USDC" + usdOn(reviewedOn, "$10.00"),
"10.0000 USDC" + usdOn(reviewedOn, "$10.00"),
);
expect(el("confirm-balance").textContent).toBe(
"50.0000 USDC" + usdOn(reviewedOn, "$50.00"),