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. 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:
@@ -235,12 +235,18 @@ function mergeTransactions(txs, tokenTransfers) {
|
||||
// `chainId` is the chain id of the network `blockscoutUrl` serves. Every entry
|
||||
// carries it, and a native entry is labelled with that network's
|
||||
// `nativeCurrency` from networks.js (`ETH`, `SepoliaETH`).
|
||||
//
|
||||
// `useBlockscout` is the user's "Use Blockscout" setting. While it is off,
|
||||
// Blockscout is not asked and there is no history: the answer is an empty
|
||||
// list.
|
||||
async function fetchRecentTransactions(
|
||||
address,
|
||||
blockscoutUrl,
|
||||
useBlockscout,
|
||||
chainId,
|
||||
count = 25,
|
||||
) {
|
||||
if (!useBlockscout) return [];
|
||||
log.debugf("fetchRecentTransactions", address);
|
||||
const addrLower = normalizeAddress(address);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user