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:
@@ -48,6 +48,12 @@ const DEFAULT_STATE = {
|
||||
hideDustTransactions: true,
|
||||
dustThresholdGwei: 100000,
|
||||
utcTimestamps: false,
|
||||
// "Use Blockscout" and "Check recipients on Etherscan" in Settings, one
|
||||
// setting each for every network. Both off until the user turns them on:
|
||||
// the requests they allow send the user's addresses to a service other
|
||||
// than the RPC endpoint.
|
||||
useBlockscout: false,
|
||||
checkRecipientsOnEtherscan: false,
|
||||
fraudContracts: [],
|
||||
tokenHolderCache: {},
|
||||
theme: "system",
|
||||
@@ -406,6 +412,12 @@ function normalizePersisted(saved) {
|
||||
: 100000;
|
||||
out.utcTimestamps =
|
||||
saved.utcTimestamps !== undefined ? saved.utcTimestamps : false;
|
||||
out.useBlockscout =
|
||||
saved.useBlockscout !== undefined ? saved.useBlockscout : false;
|
||||
out.checkRecipientsOnEtherscan =
|
||||
saved.checkRecipientsOnEtherscan !== undefined
|
||||
? saved.checkRecipientsOnEtherscan
|
||||
: false;
|
||||
// A list of contract addresses, floored the same way: send.js builds its
|
||||
// fraud set as `(state.fraudContracts || []).map((a) => a.toLowerCase())`
|
||||
// and filterTransactions() maps the same list through normalizeAddress(),
|
||||
|
||||
Reference in New Issue
Block a user