From 8c805537c02367485c31f31a7d63d48fef7239fc Mon Sep 17 00:00:00 2001 From: user Date: Sun, 1 Mar 2026 11:18:04 -0800 Subject: [PATCH] fix: use null instead of 0 for testnet token USD fallback When price is null (testnet), the fallback value 0 caused formatUsd() to display "$0.00" instead of hiding the USD value. Using null makes formatUsd() return an empty string, so the UI correctly shows no USD on the token detail view. --- src/popup/views/addressToken.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/popup/views/addressToken.js b/src/popup/views/addressToken.js index 8b31b60..48e10b2 100644 --- a/src/popup/views/addressToken.js +++ b/src/popup/views/addressToken.js @@ -161,7 +161,7 @@ function show() { `${EXT_ICON}`; // USD total for this token only - const usdVal = price ? amount * price : 0; + const usdVal = price ? amount * price : null; const usdStr = formatUsd(usdVal); $("address-token-usd-total").innerHTML = usdStr || " ";