fix: Blockscout and Etherscan lookups are off until the user turns them on (closes #668)
Out of the box the wallet sent the user's addresses to Blockscout for history and token lookups. It sent each recipient to Etherscan for its label. Two settings, "Use Blockscout" and "Check recipients on Etherscan", now gate those requests. Both are off in a new install and offered unticked on Welcome and in Settings. While one is off, the screens that relied on it say so in a plain line. The balance refresh and the Etherscan check read the stored setting. An open popup takes a change another page saved and draws its screens again. While "Use Blockscout" is off, no address keeps an untracked token. ENS lookups ask only the RPC endpoint. Model: opus-5-5
This commit is contained in:
@@ -191,6 +191,11 @@ function render() {
|
||||
if (el) el.classList.add("hidden");
|
||||
}
|
||||
|
||||
// Those details are Blockscout's; this line says why there are none.
|
||||
$("tx-detail-blockscout-note").classList.toggle(
|
||||
"hidden",
|
||||
!!state.useBlockscout,
|
||||
);
|
||||
loadFullTxDetails(tx.hash, tx.chainId);
|
||||
|
||||
const isoStr = isoDate(tx.timestamp);
|
||||
@@ -303,7 +308,11 @@ function populateOnChainDetails(txData, chainId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Reads the block, network details and calldata from Blockscout, and decodes
|
||||
// the calldata. While "Use Blockscout" is off, Blockscout is not asked and none
|
||||
// of them is shown.
|
||||
async function loadFullTxDetails(txHash, chainId) {
|
||||
if (!state.useBlockscout) return;
|
||||
const section = $("tx-detail-calldata-section");
|
||||
const actionEl = $("tx-detail-calldata-action");
|
||||
const detailsEl = $("tx-detail-calldata-details");
|
||||
|
||||
Reference in New Issue
Block a user