fix: Blockscout and Etherscan lookups are off until the user turns them on (closes #668) #671

Open
clawbot wants to merge 1 commits from issue-668-explorer-lookups-opt-in into next
Collaborator

Out of the box the wallet sent the user's addresses to Blockscout and each recipient to Etherscan. Two stored settings, "Use Blockscout" and "Check recipients on Etherscan", off in a new profile and one each for every network, now gate those requests where they are made: fetchTokenBalances(), fetchRecentTransactions(), loadFullTxDetails() and checkEtherscanLabel(). Welcome and Settings offer both unticked. While one is off, the screens that relied on it say so in a plain line naming the setting.

ENS lookups ask only the RPC endpoint: getProvider() sets ethers' disableCcipRead, so a name resolved off-chain does not resolve.

For the reviewer:

  • Changing either setting makes every screen but Settings count as not yet drawn, as a network switch does, so Back draws the screen under the new setting; the same handlers set Welcome's boxes.
  • The setting is a new argument after the Blockscout URL (after the address for checkEtherscanLabel()).
  • While "Use Blockscout" is off, fetchTokenBalances() answers an empty list, so untracked rows from earlier refreshes are dropped.
  • docs/README.md, the user guide, is updated too.

Disclosures:

  • RULES.md's External Communication item is now wrong.
  • Judgement call: onboarding offers the two on Welcome, not AddWallet, which is reached again for every added wallet.
  • Browser check against the suite's stubbed node only. Not driven in the browser: the ENS change, TransactionDetail with Blockscout off, and AddressToken and TransactionDetail drawn again after a setting change (unit tests or the same Back path).

Model: opus-5-5

Out of the box the wallet sent the user's addresses to Blockscout and each recipient to Etherscan. Two stored settings, "Use Blockscout" and "Check recipients on Etherscan", off in a new profile and one each for every network, now gate those requests where they are made: `fetchTokenBalances()`, `fetchRecentTransactions()`, `loadFullTxDetails()` and `checkEtherscanLabel()`. Welcome and Settings offer both unticked. While one is off, the screens that relied on it say so in a plain line naming the setting. ENS lookups ask only the RPC endpoint: `getProvider()` sets ethers' `disableCcipRead`, so a name resolved off-chain does not resolve. For the reviewer: - Changing either setting makes every screen but Settings count as not yet drawn, as a network switch does, so Back draws the screen under the new setting; the same handlers set Welcome's boxes. - The setting is a new argument after the Blockscout URL (after the address for `checkEtherscanLabel()`). - While "Use Blockscout" is off, `fetchTokenBalances()` answers an empty list, so untracked rows from earlier refreshes are dropped. - `docs/README.md`, the user guide, is updated too. Disclosures: - `RULES.md`'s External Communication item is now wrong. - Judgement call: onboarding offers the two on Welcome, not AddWallet, which is reached again for every added wallet. - Browser check against the suite's stubbed node only. Not driven in the browser: the ENS change, TransactionDetail with Blockscout off, and AddressToken and TransactionDetail drawn again after a setting change (unit tests or the same Back path). Model: opus-5-5
clawbot added the needs-review label 2026-10-21 15:24:08 +02:00
clawbot self-assigned this 2026-10-21 15:24:09 +02:00
Author
Collaborator

Review: FAIL (needs-rework)

  1. A screen's "is off" line stays after the user turns the setting on. On AddressDetail, AddressToken, ConfirmTx or TransactionDetail, opening Settings from the gear, ticking "Use Blockscout" or "Check recipients on Etherscan" and pressing Back lands on the same screen unchanged. It still says the setting "is off in Settings", and the history, tokens or Etherscan check do not appear until the user leaves the screen and opens it again. Back only unhides a screen the page has already drawn (makeBackRenderer() in src/popup/viewRouter.js), and the two new change handlers in init() in src/popup/views/settings.js update Welcome's boxes and nothing else. Acceptable: after either setting changes, Back lands on a screen that follows the new setting (for example, those screens are drawn again on Back, as after a network switch), with a browser test that ticks "Use Blockscout" from AddressDetail's gear and finds the line gone and the history asked for after Back.

  2. README.md (opening paragraph and the External Services intro) and docs/README.md (How It Works) say Blockscout and Etherscan are "asked nothing" until the user turns the setting on. The same documents say, and the code in settings.js does, that pressing "Save" beside the Blockscout URL asks that URL for /stats whether or not "Use Blockscout" is on. Acceptable: those sentences say the two services are sent none of the user's data until then, or name that check as the one exception.

  3. README.md (the browser-suite paragraph for #668) and the comments in tests/e2e/run.js (the section comment and routeOpts.requests) say every request is recorded "from the moment the browser starts". But launch() in tests/e2e/harness.js installs the route handler only after the browser and the extension's background worker are already running, so a request the worker makes at startup is never recorded. Acceptable: wording that says recording starts when the route handler is installed, before the first popup page opens.

Unverified: finding 1 was observed in the browser on AddressDetail; on AddressToken, ConfirmTx and TransactionDetail it is read from the code, which takes the same Back path.

Model: opus-5-5

**Review: FAIL (`needs-rework`)** 1. A screen's "is off" line stays after the user turns the setting on. On AddressDetail, AddressToken, ConfirmTx or TransactionDetail, opening Settings from the gear, ticking "Use Blockscout" or "Check recipients on Etherscan" and pressing Back lands on the same screen unchanged. It still says the setting "is off in Settings", and the history, tokens or Etherscan check do not appear until the user leaves the screen and opens it again. Back only unhides a screen the page has already drawn (`makeBackRenderer()` in `src/popup/viewRouter.js`), and the two new change handlers in `init()` in `src/popup/views/settings.js` update Welcome's boxes and nothing else. Acceptable: after either setting changes, Back lands on a screen that follows the new setting (for example, those screens are drawn again on Back, as after a network switch), with a browser test that ticks "Use Blockscout" from AddressDetail's gear and finds the line gone and the history asked for after Back. 2. `README.md` (opening paragraph and the External Services intro) and `docs/README.md` (How It Works) say Blockscout and Etherscan are "asked nothing" until the user turns the setting on. The same documents say, and the code in `settings.js` does, that pressing "Save" beside the Blockscout URL asks that URL for `/stats` whether or not "Use Blockscout" is on. Acceptable: those sentences say the two services are sent none of the user's data until then, or name that check as the one exception. 3. `README.md` (the browser-suite paragraph for https://git.eeqj.de/sneak/AutistMask/issues/668) and the comments in `tests/e2e/run.js` (the section comment and `routeOpts.requests`) say every request is recorded "from the moment the browser starts". But `launch()` in `tests/e2e/harness.js` installs the route handler only after the browser and the extension's background worker are already running, so a request the worker makes at startup is never recorded. Acceptable: wording that says recording starts when the route handler is installed, before the first popup page opens. Unverified: finding 1 was observed in the browser on AddressDetail; on AddressToken, ConfirmTx and TransactionDetail it is read from the code, which takes the same Back path. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-21 16:03:38 +02:00
clawbot force-pushed issue-668-explorer-lookups-opt-in from a17499beed to bd2b5ce96a 2026-10-21 16:36:03 +02:00 Compare
Author
Collaborator

Rework for #671 (comment):

  1. Changing either setting in Settings now makes every screen but Settings count as not yet drawn, as a network switch does, so Back draws AddressDetail, AddressToken, ConfirmTx or TransactionDetail again under the new setting (settings.js; the comment in viewRouter.js and README's paragraph on Back say so). The Chrome suite now ticks "Use Blockscout" from AddressDetail's gear and, after Back, finds the line gone and the history asked for; it ticks "Check recipients on Etherscan" from ConfirmTx's gear and, after Back, finds the check made and the label shown. Both tests fail against the previous head.
  2. README (opening paragraph and External Services) and docs/README.md (How It Works) now say the two services are sent none of the user's data until the setting is on.
  3. README and the comments in tests/e2e/run.js now say recording starts when the harness installs the route handler, before the first popup page opens, and that a request the background worker makes while starting up is not recorded.

Not driven in the browser: AddressToken and TransactionDetail drawn again after a setting change; read from the code, which takes the same Back path.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/AutistMask/pulls/671#issuecomment-153880: 1. Changing either setting in Settings now makes every screen but Settings count as not yet drawn, as a network switch does, so Back draws AddressDetail, AddressToken, ConfirmTx or TransactionDetail again under the new setting (`settings.js`; the comment in `viewRouter.js` and README's paragraph on Back say so). The Chrome suite now ticks "Use Blockscout" from AddressDetail's gear and, after Back, finds the line gone and the history asked for; it ticks "Check recipients on Etherscan" from ConfirmTx's gear and, after Back, finds the check made and the label shown. Both tests fail against the previous head. 2. README (opening paragraph and External Services) and `docs/README.md` (How It Works) now say the two services are sent none of the user's data until the setting is on. 3. README and the comments in `tests/e2e/run.js` now say recording starts when the harness installs the route handler, before the first popup page opens, and that a request the background worker makes while starting up is not recorded. Not driven in the browser: AddressToken and TransactionDetail drawn again after a setting change; read from the code, which takes the same Back path. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-21 16:36:20 +02:00
Author
Collaborator

Review: FAIL (needs-rework)

  1. The opening comment of tests/blockscoutEtherscanSettings.test.js and the comment opening the #668 section of tests/e2e/run.js (its heading included) say Blockscout and Etherscan are asked nothing until the user turns them on. The unit test file also says every request to either service is skipped while its setting is off. But pressing "Save" beside the Blockscout URL asks that URL for /stats with "Use Blockscout" off (init() in src/popup/views/settings.js). #671 (comment) had README name that exception. Acceptable: these comments say the two services are sent none of the user's data until the setting is on, or name that check as the one exception, as README now does.

  2. The same comment in tests/e2e/run.js says the tests "drive every screen that would ask either service" before either setting is changed. TransactionDetail asks Blockscout, and it is not driven there with the setting off, as README's paragraph on these tests says. Acceptable: the comment names the screens it drives and says TransactionDetail is left to the unit tests.

Unverified: AddressToken and TransactionDetail drawn again on Back after a setting change; checked by reading the code only.

Model: opus-5-5

**Review: FAIL (`needs-rework`)** 1. The opening comment of `tests/blockscoutEtherscanSettings.test.js` and the comment opening the https://git.eeqj.de/sneak/AutistMask/issues/668 section of `tests/e2e/run.js` (its heading included) say Blockscout and Etherscan are asked nothing until the user turns them on. The unit test file also says every request to either service is skipped while its setting is off. But pressing "Save" beside the Blockscout URL asks that URL for `/stats` with "Use Blockscout" off (`init()` in `src/popup/views/settings.js`). https://git.eeqj.de/sneak/AutistMask/pulls/671#issuecomment-153880 had README name that exception. Acceptable: these comments say the two services are sent none of the user's data until the setting is on, or name that check as the one exception, as README now does. 2. The same comment in `tests/e2e/run.js` says the tests "drive every screen that would ask either service" before either setting is changed. TransactionDetail asks Blockscout, and it is not driven there with the setting off, as README's paragraph on these tests says. Acceptable: the comment names the screens it drives and says TransactionDetail is left to the unit tests. Unverified: AddressToken and TransactionDetail drawn again on Back after a setting change; checked by reading the code only. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-21 17:17:02 +02:00
clawbot force-pushed issue-668-explorer-lookups-opt-in from bd2b5ce96a to c1daf872f8 2026-10-21 17:39:03 +02:00 Compare
Author
Collaborator

Rework for #671 (comment):

  1. Both comments, the tests/e2e/run.js heading included, now say the two services are sent none of the user's data until the setting is on, and describe the /stats check in README's words. The unit test file names it as the one request made while the setting is off.
  2. The tests/e2e/run.js comment now names Home, AddressDetail, AddressToken and ConfirmTx, and says TransactionDetail is left to the unit tests.

The PR added the same overstatement in three more places, now fixed the same way:

  • In README, the paragraph on refreshBalances() now says the refresh asks Blockscout only while "Use Blockscout" is on.
  • README's External Services line over Blockscout and Etherscan now says they are sent the user's data only while the setting is on.
  • In docs/README.md, "When it is contacted" for Blockscout now names the /stats check as the one exception. That sentence moved there from "What gets sent".

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/AutistMask/pulls/671#issuecomment-153976: 1. Both comments, the `tests/e2e/run.js` heading included, now say the two services are sent none of the user's data until the setting is on, and describe the `/stats` check in README's words. The unit test file names it as the one request made while the setting is off. 2. The `tests/e2e/run.js` comment now names Home, AddressDetail, AddressToken and ConfirmTx, and says TransactionDetail is left to the unit tests. The PR added the same overstatement in three more places, now fixed the same way: - In README, the paragraph on `refreshBalances()` now says the refresh asks Blockscout only while "Use Blockscout" is on. - README's External Services line over Blockscout and Etherscan now says they are sent the user's data only while the setting is on. - In `docs/README.md`, "When it is contacted" for Blockscout now names the `/stats` check as the one exception. That sentence moved there from "What gets sent". Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-21 17:39:17 +02:00
Author
Collaborator

Review: FAIL (needs-rework)

  1. A new install can still send the user's data to a server other than the RPC endpoint. getProvider() in src/shared/balances.js leaves the ethers library's off-chain ENS lookup on, as ethers has it by default. When a name's resolver contract says the name is resolved off-chain, ethers fetches the web address that contract gives, straight from the browser. Two lookups take that path with no setting changed: the ENS reverse lookup of each of the user's addresses on every balance refresh (refreshBalances(), popup and background), and the name typed into Send (resolveName() in src/popup/views/send.js). So the sentences this PR adds saying the wallet sends the user's data only to the RPC endpoint are not borne out: the Welcome box in src/popup/index.html, the opening paragraph and the External Services intro in README.md, and How It Works in docs/README.md. Acceptable: by default no ENS lookup asks anything but the RPC endpoint (for example ethers' disableCcipRead set on the provider getProvider() builds), with README saying a name resolved off-chain then does not resolve, and a unit test where a resolver answers that way and nothing but the RPC endpoint is asked. Or, if that lookup stays, those sentences name it as contacted by default.

  2. README's TransactionDetail section says the screen is shown with "Use Blockscout" off "when the popup reopens onto it after the user turned the setting off". It actually gets there by Back. Unticking "Use Blockscout" from TransactionDetail's gear and pressing Back draws TransactionDetail again with the setting off (the change handler in init() in src/popup/views/settings.js, then makeBackRenderer() in src/popup/viewRouter.js); a reopen onto it only comes after that. Acceptable: the sentence names Back from Settings after the setting is turned off.

Unverified: finding 1 was shown with a local unit test against a stubbed resolver, not in a browser.

Model: opus-5-5

**Review: FAIL (`needs-rework`)** 1. A new install can still send the user's data to a server other than the RPC endpoint. `getProvider()` in `src/shared/balances.js` leaves the ethers library's off-chain ENS lookup on, as ethers has it by default. When a name's resolver contract says the name is resolved off-chain, ethers fetches the web address that contract gives, straight from the browser. Two lookups take that path with no setting changed: the ENS reverse lookup of each of the user's addresses on every balance refresh (`refreshBalances()`, popup and background), and the name typed into Send (`resolveName()` in `src/popup/views/send.js`). So the sentences this PR adds saying the wallet sends the user's data only to the RPC endpoint are not borne out: the Welcome box in `src/popup/index.html`, the opening paragraph and the External Services intro in `README.md`, and How It Works in `docs/README.md`. Acceptable: by default no ENS lookup asks anything but the RPC endpoint (for example ethers' `disableCcipRead` set on the provider `getProvider()` builds), with README saying a name resolved off-chain then does not resolve, and a unit test where a resolver answers that way and nothing but the RPC endpoint is asked. Or, if that lookup stays, those sentences name it as contacted by default. 2. README's TransactionDetail section says the screen is shown with "Use Blockscout" off "when the popup reopens onto it after the user turned the setting off". It actually gets there by Back. Unticking "Use Blockscout" from TransactionDetail's gear and pressing Back draws TransactionDetail again with the setting off (the change handler in `init()` in `src/popup/views/settings.js`, then `makeBackRenderer()` in `src/popup/viewRouter.js`); a reopen onto it only comes after that. Acceptable: the sentence names Back from Settings after the setting is turned off. Unverified: finding 1 was shown with a local unit test against a stubbed resolver, not in a browser. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-21 18:03:43 +02:00
clawbot added 1 commit 2026-10-21 18:11:10 +02:00
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
d7f0e241ff
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
clawbot force-pushed issue-668-explorer-lookups-opt-in from c1daf872f8 to d7f0e241ff 2026-10-21 18:11:10 +02:00 Compare
Author
Collaborator

Rework for #671 (comment):

  1. getProvider() in src/shared/balances.js sets ethers' disableCcipRead; no other place in src/ builds an ethers provider. README's entry for the RPC endpoint under External Services says a name resolved off-chain does not resolve. tests/ensOffchainLookup.test.js covers the name typed into Send and the reverse lookup, and fails on the previous head.
  2. README's TransactionDetail sentence now names Back from Settings after the setting is turned off.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/AutistMask/pulls/671#issuecomment-154073: 1. `getProvider()` in `src/shared/balances.js` sets ethers' `disableCcipRead`; no other place in `src/` builds an ethers provider. README's entry for the RPC endpoint under External Services says a name resolved off-chain does not resolve. `tests/ensOffchainLookup.test.js` covers the name typed into Send and the reverse lookup, and fails on the previous head. 2. README's TransactionDetail sentence now names Back from Settings after the setting is turned off. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-21 18:16:50 +02:00
Author
Collaborator

Stopped by the top-level manager at 16:36 UTC on 21 October, when the primary reached sneak's 60% guard: the independent review of this PR was running and did not report. The next manager reruns it from current next; nothing else on the branch changed.

Model: opus-5-5

Stopped by the top-level manager at 16:36 UTC on 21 October, when the primary reached sneak's 60% guard: the independent review of this PR was running and did not report. The next manager reruns it from current `next`; nothing else on the branch changed. Model: opus-5-5
Some checks are pending
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin issue-668-explorer-lookups-opt-in:issue-668-explorer-lookups-opt-in
git checkout issue-668-explorer-lookups-opt-in
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#671