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, and each recipient to Etherscan for its label. Two settings, "Use Blockscout" and "Check recipients on Etherscan", now gate those requests where they are made. Both are off in a new profile and offered unticked on Welcome and in Settings. While one is off, the screens that relied on it say so in a plain line naming the setting; after either changes in Settings, Back draws the screen it lands on again. ENS lookups ask only the RPC endpoint, so a name resolved off-chain does not resolve. README and the user guide say what is contacted by default and what each setting adds. Model: opus-5-5
This commit is contained in:
@@ -334,6 +334,11 @@ function show(txInfo) {
|
||||
$("confirm-contract-warning").style.visibility = "hidden";
|
||||
$("confirm-burn-warning").style.visibility = "hidden";
|
||||
$("confirm-etherscan-warning").style.visibility = "hidden";
|
||||
// While "Check recipients on Etherscan" is off there is no Etherscan
|
||||
// warning to reserve space for, and a line in its place says so.
|
||||
const etherscanOn = !!state.checkRecipientsOnEtherscan;
|
||||
$("confirm-etherscan-warning").classList.toggle("hidden", !etherscanOn);
|
||||
$("confirm-etherscan-note").classList.toggle("hidden", etherscanOn);
|
||||
|
||||
// Show burn warning via reserved element (in addition to inline warning)
|
||||
if (isBurnAddress(txInfo.to)) {
|
||||
@@ -612,6 +617,7 @@ async function checkRecipientHistory(txInfo) {
|
||||
const asyncWarnings = await getFullWarnings(txInfo.to, provider, {
|
||||
fromAddress: txInfo.from,
|
||||
chainId: txInfo.chainId,
|
||||
checkRecipientsOnEtherscan: state.checkRecipientsOnEtherscan,
|
||||
});
|
||||
// The user may have left this transaction while the checks were in
|
||||
// flight; its warnings must not reach another recipient's screen.
|
||||
|
||||
Reference in New Issue
Block a user