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

@@ -1,4 +1,4 @@
const { $, addressDotHtml } = require("./helpers");
const { $, formatAddressHtml } = require("./helpers");
const { state, saveState } = require("../../shared/state");
const runtime =
@@ -14,8 +14,11 @@ function show(id) {
return;
}
$("approve-hostname").textContent = details.hostname;
const dot = addressDotHtml(state.activeAddress);
$("approve-address").innerHTML = dot + state.activeAddress;
$("approve-address").innerHTML = formatAddressHtml(
state.activeAddress,
null,
null,
);
$("approve-remember").checked = state.rememberSiteChoice;
});
}