Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be9e5aec85 |
No files matched your search
@@ -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">`;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user