From 01201d54b254602e6f8765667d9b21cbfa7ec233 Mon Sep 17 00:00:00 2001 From: sneak Date: Fri, 27 Feb 2026 11:39:50 +0700 Subject: [PATCH] Fix send balance display when sending from address-token view 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. --- src/popup/views/send.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/popup/views/send.js b/src/popup/views/send.js index 4512a85..efb4f5c 100644 --- a/src/popup/views/send.js +++ b/src/popup/views/send.js @@ -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({