fix: transaction screens name a token from the tokens of the transaction's network (closes #629)
decodeCalldata() looked a token's symbol and decimals up in the active network's tracked tokens and balances, whatever chain id it was given, so TransactionDetail and TxApproval showed a token tracked on another network by address only, with its amount in base units. The lookup now uses what the wallet knows of the tokens on the transaction's network: the active network's tracked tokens and balances, or for another network the tokens tracked on it and no balances. TxApproval's token labels, the symbol it hands the wait, success and error screens, and SuccessTx's decoded token label use the same lookup. Model: opus-5-5
This commit was merged in pull request #630.
This commit is contained in:
@@ -280,7 +280,7 @@ function decodedDetailsHtml(decoded, chainId) {
|
||||
html += `<div class="text-xs text-muted mb-1">${escapeHtml(d.label)}</div>`;
|
||||
if (d.address) {
|
||||
if (d.isToken) {
|
||||
const sym = tokenLabel(d.address) || "Unknown token";
|
||||
const sym = tokenLabel(d.address, chainId) || "Unknown token";
|
||||
html += `<div class="font-bold">${escapeHtml(sym)}</div>`;
|
||||
html += toAddressHtml(d.address, chainId);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user