1 Commits
Author SHA1 Message Date
sneak be9e5aec85 fix: a saved SuccessTx in another shape reopens as itself, and long amounts wrap (closes #740)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s
The popup refused a saved SuccessTx whose decoded record was in a shape it
did not expect, and showed Home. SuccessTx already shows only the lines it
can read, so the popup no longer checks the record first.

A long amount or token symbol was cut off at the edge of the screen. These
now wrap:

- the Amount figure
- each decoded amount
- the token symbol
- the name and description of SuccessTx's decoded action

WaitTx and ErrorTx share the line that shows the symbol, so they gain this
too.

Model: opus-5-5
2026-11-03 10:03:38 +00:00
2 changed files with 23 additions and 2 deletions

No files matched your search

+2 -2
View File
@@ -329,11 +329,11 @@ function decodedDetailsHtml(decoded, chainId) {
let html = `<div class="border border-border border-dashed p-2 mb-3">`;
if (decoded.name && typeof decoded.name === "string") {
html += `<div class="mb-2"><div class="text-xs text-muted mb-1">Action</div>`;
html += `<div class="font-bold">${escapeHtml(decoded.name)}</div></div>`;
html += `<div class="font-bold break-words">${escapeHtml(decoded.name)}</div></div>`;
}
if (decoded.description && typeof decoded.description === "string") {
html += `<div class="mb-2"><div class="text-xs text-muted mb-1">Description</div>`;
html += `<div>${escapeHtml(decoded.description)}</div></div>`;
html += `<div class="break-words">${escapeHtml(decoded.description)}</div></div>`;
}
for (const d of lines) {
html += `<div class="mb-2">`;
+21
View File
@@ -913,6 +913,27 @@ describe("a long amount on WaitTx, ErrorTx and SuccessTx", () => {
'<div class="font-bold break-words">1.0000 ETH<',
);
});
test("the name and description of SuccessTx's decoded action wrap", () => {
state.viewData = {
hash: TX_HASH,
to: RECIPIENT,
chainId: TX_INFO.chainId,
decoded: {
name: "Transfer LONGSYMBOL",
description: "Transfer LONGSYMBOL to a recipient",
details: [{ label: "Amount", value: "1.0000 ETH" }],
},
};
txStatus.renderSuccess();
const html = getElement("success-tx-decoded").innerHTML;
expect(html).toContain(
'<div class="font-bold break-words">Transfer LONGSYMBOL<',
);
expect(html).toContain(
'<div class="break-words">Transfer LONGSYMBOL to a recipient<',
);
});
});
// A saved wait comes back from storage, in whatever shape it is in. A throw when