From 166bb461497612a6da2c3fae03d78a4739a73591 Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 26 Feb 2026 03:29:09 +0700 Subject: [PATCH] Truncate addresses by 2 chars to compensate for color dot width Move truncateMiddle to helpers.js for reuse. Shorten displayed addresses by 2 characters wherever a dot is shown: home view (40 char max), tx list (maxAddr - 2), and address detail container (40ch width). --- src/popup/index.html | 2 +- src/popup/views/addressDetail.js | 10 ++-------- src/popup/views/helpers.js | 8 ++++++++ src/popup/views/home.js | 3 ++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/popup/index.html b/src/popup/index.html index 4e423f1..934bdd2 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -207,7 +207,7 @@ `; - html += `${addr.ensName ? "" : dot}${addr.address}`; + html += `${addr.ensName ? "" : dot}${truncateMiddle(addr.address, 40)}`; html += `${addrUsd}`; html += ``; html += balanceLinesForAddress(addr);