Fix send balance display when sending from address-token view
All checks were successful
check / check (push) Successful in 17s

Read token from state.selectedToken when set, falling back to the
select element. This ensures the correct token balance is shown even
when the select dropdown is hidden or its value didn't take because
the token was filtered out by renderSendTokenSelect.
This commit is contained in:
2026-02-27 11:39:50 +07:00
parent fbb0def267
commit 01201d54b2

View File

@@ -39,7 +39,7 @@ function updateSendBalance() {
addr.ensName || null,
null,
);
const token = $("send-token").value;
const token = state.selectedToken || $("send-token").value;
if (token === "ETH") {
$("send-balance").textContent =
"Current balance: " + (addr.balance || "0") + " ETH";
@@ -89,7 +89,7 @@ function init(_ctx) {
}
}
const token = $("send-token").value;
const token = state.selectedToken || $("send-token").value;
const addr = currentAddress();
ctx.showConfirmTx({