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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user