fix: Blockscout and Etherscan lookups are off until the user turns them on (closes #668)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

Out of the box the wallet sent the user's addresses to Blockscout. 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. Each gated request reads its setting
from storage before it asks and when the answer lands. An answer that lands
after the setting went off is dropped. 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:
2026-10-26 07:49:39 +00:00
parent c316d9ee78
commit 95b579d7f0
57 changed files with 2256 additions and 186 deletions
+8 -1
View File
@@ -38,8 +38,14 @@ jest.mock("../src/shared/log", () => ({
isDebug: () => false,
}));
// Blockscout is asked only while the stored "Use Blockscout" is on.
globalThis.chrome = {
storage: { local: { get: async () => ({}), set: async () => {} } },
storage: {
local: {
get: async () => ({ autistmask: { useBlockscout: true } }),
set: async () => {},
},
},
};
const { state } = require("../src/shared/state");
@@ -158,6 +164,7 @@ beforeEach(() => {
globalThis.document = makeDocument();
globalThis.window = { location: { search: "" } };
state.blockscoutUrl = EXPLORER;
state.useBlockscout = true;
state.networkEndpoints = {};
state.wallets = [
{