Parallelize address scanning and unify address display formatting
Some checks failed
check / check (push) Has been cancelled
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:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user