From fbb0def267795bd6c9c144bb75073d948ada6251 Mon Sep 17 00:00:00 2001 From: sneak Date: Fri, 27 Feb 2026 11:38:42 +0700 Subject: [PATCH] Replace send token dropdown with static display when token is locked When sending from the address-token view, show the token symbol as plain text instead of a disabled dropdown. ERC-20 tokens include an etherscan link to the contract address. The dropdown is restored when navigating back or entering send from other views. --- src/popup/index.html | 1 + src/popup/views/addressDetail.js | 3 ++- src/popup/views/addressToken.js | 10 +++++++++- src/popup/views/home.js | 3 ++- src/popup/views/send.js | 3 ++- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/popup/index.html b/src/popup/index.html index b3422e2..d513b64 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -398,6 +398,7 @@ > +
diff --git a/src/popup/views/addressDetail.js b/src/popup/views/addressDetail.js index 406e12f..7fd9e64 100644 --- a/src/popup/views/addressDetail.js +++ b/src/popup/views/addressDetail.js @@ -309,7 +309,8 @@ function init(_ctx) { } $("send-to").value = ""; $("send-amount").value = ""; - $("send-token").disabled = false; + $("send-token").classList.remove("hidden"); + $("send-token-static").classList.add("hidden"); updateSendBalance(); showView("send"); }); diff --git a/src/popup/views/addressToken.js b/src/popup/views/addressToken.js index cd1ef75..840c9dd 100644 --- a/src/popup/views/addressToken.js +++ b/src/popup/views/addressToken.js @@ -338,7 +338,15 @@ function init(ctx) { } else { $("send-token").value = tokenId; } - $("send-token").disabled = true; + // Hide dropdown, show static token display + $("send-token").classList.add("hidden"); + let staticHtml = escapeHtml(currentSymbol); + if (tokenId !== "ETH") { + const link = `https://etherscan.io/token/${tokenId}`; + staticHtml += ` ${EXT_ICON}`; + } + $("send-token-static").innerHTML = staticHtml; + $("send-token-static").classList.remove("hidden"); updateSendBalance(); showView("send"); }); diff --git a/src/popup/views/home.js b/src/popup/views/home.js index fb8fe87..b938781 100644 --- a/src/popup/views/home.js +++ b/src/popup/views/home.js @@ -403,7 +403,8 @@ function init(ctx) { } $("send-to").value = ""; $("send-amount").value = ""; - $("send-token").disabled = false; + $("send-token").classList.remove("hidden"); + $("send-token-static").classList.add("hidden"); renderSendTokenSelect(addr); updateSendBalance(); showView("send"); diff --git a/src/popup/views/send.js b/src/popup/views/send.js index 4001d91..4512a85 100644 --- a/src/popup/views/send.js +++ b/src/popup/views/send.js @@ -103,7 +103,8 @@ function init(_ctx) { }); $("btn-send-back").addEventListener("click", () => { - $("send-token").disabled = false; + $("send-token").classList.remove("hidden"); + $("send-token-static").classList.add("hidden"); if (state.selectedToken) { ctx.showAddressToken(); } else {