Parallelize address scanning and unify address display formatting
Some checks failed
check / check (push) Has been cancelled

Scanning: check all gap-limit addresses in parallel per batch instead
of sequentially. For a wallet with 1 used address this reduces from
12 sequential RPC round-trips to 1 parallel batch + 1 small follow-up.

Display: add shared formatAddressHtml(address, ensName, maxLen) and
escapeHtml() to helpers.js. Use them in confirm-tx (was missing color
dot entirely) and approval view. Remove duplicate escapeHtml from
addressDetail.js.
This commit is contained in:
2026-02-26 03:46:25 +07:00
parent 1dfc006cb9
commit 0d543288b2
5 changed files with 84 additions and 47 deletions

View File

@@ -4,6 +4,8 @@ const {
showFlash,
balanceLinesForAddress,
addressDotHtml,
escapeHtml,
formatAddressHtml,
truncateMiddle,
} = require("./helpers");
const { state, currentAddress } = require("../../shared/state");
@@ -76,12 +78,6 @@ function timeAgo(timestamp) {
return years + " year" + (years !== 1 ? "s" : "") + " ago";
}
function escapeHtml(s) {
const div = document.createElement("div");
div.textContent = s;
return div.innerHTML;
}
let loadedTxs = [];
let ensNameMap = new Map();