Show tracked tokens with zero balance on main and address pages
Some checks failed
check / check (push) Has been cancelled

Add showZeroBalanceTokens setting (default: on). When enabled,
balanceLinesForAddress merges state.trackedTokens with the address's
tokenBalances, showing 0.0000 lines for tracked tokens that have no
balance on that address. This gives users visibility into all tokens
they're watching across all addresses.
This commit is contained in:
2026-02-26 15:37:39 +07:00
parent 6c4b2753d9
commit 47e690f466
6 changed files with 45 additions and 4 deletions

View File

@@ -57,7 +57,11 @@ function render(ctx) {
html += `<span class="flex items-center" style="width:42ch;max-width:100%">${addr.ensName ? "" : dot}${truncateMiddle(addr.address, 40)}</span>`;
html += `<span class="text-right text-muted flex-1">${addrUsd}</span>`;
html += `</div>`;
html += balanceLinesForAddress(addr);
html += balanceLinesForAddress(
addr,
state.trackedTokens,
state.showZeroBalanceTokens,
);
html += `</div>`;
});