1 Commits
Author SHA1 Message Date
sneak d7f0e241ff fix: Blockscout and Etherscan lookups are off until the user turns them on (closes #668)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s
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
2026-10-21 16:11:02 +00:00
14 changed files with 230 additions and 282 deletions

No files matched your search

+108 -140
View File
@@ -12,27 +12,20 @@ intercepts tx status links to their own site instead of going to Etherscan, etc.
None of the common alternatives work on Firefox. None of the common alternatives work on Firefox.
Hence, a minimally viable ERC20 browser wallet/signer that works cross-platform. Hence, a minimally viable ERC20 browser wallet/signer that works cross-platform.
Everything you need, nothing you don't. We import as few libraries as possible Everything you need, nothing you don't. We import as few libraries as possible,
and don't implement any crypto. By default the wallet sends user-specific data don't implement any crypto, and don't send user-specific data anywhere but a
only to the Ethereum RPC endpoint. The user can change that endpoint in (user-configurable) Ethereum RPC endpoint (which defaults to a public node)
Settings; it defaults to a public node. unless the user turns on one of the two lookups below. Out of the box the
extension contacts the configured RPC node for blockchain interactions and a
Out of the box the extension contacts two services: public CoinDesk API (no API key) for realtime price information, which is sent
token symbols and nothing else. Two more services are sent none of the user's
- the configured RPC node, for blockchain interactions data until the user turns them on, on the Welcome screen or in Settings: a
- a public CoinDesk API (no API key), for realtime prices. It is sent token Blockscout block-explorer API for transaction history, the tokens the user has
symbols and nothing else. not tracked and transaction details ("Use Blockscout"), and best-effort
Etherscan address label lookups during transaction confirmation ("Check
Two more services are sent none of the user's data until the user turns them on. recipients on Etherscan"). A community-maintained phishing domain blocklist is
Each has a checkbox on the Welcome screen and in Settings: built into the extension at build time and checked locally; nothing is fetched
for it at runtime.
- "Use Blockscout": a Blockscout block-explorer API, for transaction history,
the tokens the user has not tracked, and transaction details
- "Check recipients on Etherscan": a best-effort Etherscan label lookup of the
recipient during transaction confirmation
A community-maintained phishing domain blocklist is built into the extension at
build time and checked locally. Nothing is fetched for it at runtime.
In the extension is a hardcoded list of the top ERC20 contract addresses. You In the extension is a hardcoded list of the top ERC20 contract addresses. You
can add any ERC20 contract by contract address if you wish, but the hardcoded can add any ERC20 contract by contract address if you wish, but the hardcoded
@@ -434,28 +427,22 @@ there to Sepolia must put up the `[TESTNET]` banner, and switching back to
mainnet must take it down, both while Settings is still on screen. mainnet must take it down, both while Settings is still on screen.
It also covers what a new install sends to Blockscout and Etherscan It also covers what a new install sends to Blockscout and Etherscan
([#668](https://git.eeqj.de/sneak/AutistMask/issues/668)). The harness installs ([#668](https://git.eeqj.de/sneak/AutistMask/issues/668)). The route handler
a route handler before the first popup page opens. From then on, the handler records every request the extension makes, from its pages and its background
records every request the extension makes, from its pages and from its worker, from when the harness installs it, before the first popup page opens; a
background worker. A request the background worker makes while it starts up request the background worker makes while it starts up, before then, is not
comes earlier and is not recorded. The tests take these steps in order: recorded. Welcome must offer "Use Blockscout" and "Check recipients on
Etherscan" unticked. With neither changed, Home, AddressDetail, AddressToken and
- Welcome must offer "Use Blockscout" and "Check recipients on Etherscan" ConfirmTx must show the lines saying what is off; the popup is then closed until
unticked. the background has run a balance refresh of its own, and not one recorded
- With neither ticked, Home, AddressDetail, AddressToken and ConfirmTx must each request may have gone to Blockscout or Etherscan. "Use Blockscout" is then
show the line saying what is off. ticked from AddressDetail's gear: on "Back", AddressDetail must ask Blockscout
- The popup is then closed until the background has run a balance refresh of its for its history and no longer say it is off, and Blockscout must then be asked
own. No recorded request may have gone to Blockscout or Etherscan. for the token balances. "Check recipients on Etherscan" is ticked from
- "Use Blockscout" is ticked from AddressDetail's gear. On "Back", AddressDetail ConfirmTx's gear: on "Back", ConfirmTx must ask Etherscan about the recipient
must ask Blockscout for its history and no longer say the setting is off. and show the label the stub page gives it. Both stay on for the rest of the run.
Blockscout must then be asked for the token balances. TransactionDetail with "Use Blockscout" off is not driven here, since no history
- "Check recipients on Etherscan" is ticked from ConfirmTx's gear. On "Back", row leads to it then; the unit tests cover it.
ConfirmTx must ask Etherscan about the recipient and show the label the stub
page gives it.
Both settings stay on for the rest of the run. TransactionDetail with "Use
Blockscout" off is not driven here, because no history row leads to it then. The
unit tests cover it.
It also covers the confirmation screen, for both a native ETH send and an ERC-20 It also covers the confirmation screen, for both a native ETH send and an ERC-20
send: Send disabled while the fee estimate is in flight, enabled once it lands, send: Send disabled while the fee estimate is in flight, enabled once it lands,
@@ -1424,18 +1411,12 @@ that token's previous entry, as a failed ETH balance keeps its figure, or takes
Blockscout's entry from the same refresh when there is none. Every other token Blockscout's entry from the same refresh when there is none. Every other token
comes from the Blockscout `token-balances` response (`fetchTokenBalances()`), so comes from the Blockscout `token-balances` response (`fetchTokenBalances()`), so
tokens do appear without the user adding them, and they keep their previous tokens do appear without the user adding them, and they keep their previous
figures while Blockscout fails. figures while Blockscout fails. The refresh asks Blockscout only while the user
has "Use Blockscout" on. While it is off, as it is until the user turns it on, a
The refresh asks Blockscout only while the user has "Use Blockscout" on. The tracked token's entry has no holder count and no `decimals` of Blockscout's, so
setting is off until the user turns it on. While it is off: its balance is stated at the scale the bundled list or the tracked token
records, and no other token is listed, those from earlier refreshes included. A
- Only tracked tokens are listed. Untracked tokens from earlier refreshes are tracked token is shown when its balance is nonzero, and any other ERC-20 when
dropped.
- A tracked token's entry has no holder count and no `decimals` from Blockscout.
- A tracked token's balance is stated at the scale the bundled list or the
tracked token records.
A tracked token is shown when its balance is nonzero, and any other ERC-20 when
its balance is nonzero and it is in the bundled known-token list or has 1,000 or its balance is nonzero and it is in the bundled known-token list or has 1,000 or
more holders. A token claiming a symbol from the bundled list from any other more holders. A token claiming a symbol from the bundled list from any other
contract address is always dropped, tracked or not, and so is any token claiming contract address is always dropped, tracked or not, and so is any token claiming
@@ -1625,8 +1606,8 @@ such as an edit typed into Settings and not yet saved. Home is the one screen
"Back" always re-renders, so the wallet list reflects anything that changed "Back" always re-renders, so the wallet list reflects anything that changed
while the user was away from it. Changing "Use Blockscout" or "Check recipients while the user was away from it. Changing "Use Blockscout" or "Check recipients
on Etherscan" in Settings makes every screen but Settings count as not yet on Etherscan" in Settings makes every screen but Settings count as not yet
rendered. "Back" then renders again any screen a reopened popup can render. Any rendered, so "Back" renders the screen it lands on under the new setting; the
other screen, such as Send, is unhidden as it was. The stack is left as it is. stack is left as it is.
A network switch leaves every screen on the page showing the previous network. A network switch leaves every screen on the page showing the previous network.
The user makes it in Settings, or approves a site's request and the background The user makes it in Settings, or approves a site's request and the background
@@ -1669,11 +1650,11 @@ view would leave a wallet one click from deletion.
screen in that case. screen in that case.
- **Elements**: - **Elements**:
- "Welcome! To get started, add a wallet." text - "Welcome! To get started, add a wallet." text
- A well with a line saying that the wallet sends the user's data only to - A well saying that the wallet sends the user's data only to the Ethereum
the Ethereum RPC endpoint unless one of the two checkboxes below is ticked RPC endpoint unless one of the two settings in it is turned on, here or
- In the well, the "Use Blockscout" and "Check recipients on Etherscan" later in Settings: the "Use Blockscout" and "Check recipients on
checkboxes, the same two as in Settings. Each has a sentence saying what Etherscan" checkboxes, the same two as in Settings, each with its sentence
it sends and where. Both are unticked until the user ticks them on what it sends and to whom. Both are unticked until the user ticks them
- "Add wallet" button - "Add wallet" button
- **Transitions**: - **Transitions**:
- Ticking or unticking either checkbox → stores the setting, as Settings - Ticking or unticking either checkbox → stores the setting, as Settings
@@ -1709,7 +1690,7 @@ view would leave a wallet one click from deletion.
says "This transaction creates a new contract. It has no recipient." The says "This transaction creates a new contract. It has no recipient." The
transaction lists on AddressDetail and AddressToken draw the same rows. transaction lists on AddressDetail and AddressToken draw the same rows.
The history comes from Blockscout. While "Use Blockscout" is off, The history comes from Blockscout. While "Use Blockscout" is off,
Blockscout is not asked. This list then shows only the line "No Blockscout is not asked, and this list and those two show the one line "No
transaction history is shown, because "Use Blockscout" is off in transaction history is shown, because "Use Blockscout" is off in
Settings." Settings."
- "Add additional wallet..." link at bottom - "Add additional wallet..." link at bottom
@@ -1779,14 +1760,13 @@ view would leave a wallet one click from deletion.
- Full address (color dot, etherscan link, tap to copy) - Full address (color dot, etherscan link, tap to copy)
- USD total for address (see [Partial USD totals](#partial-usd-totals)) - USD total for address (see [Partial USD totals](#partial-usd-totals))
- Balance list: ETH + the ERC-20 tokens shown for this address (4 decimal - Balance list: ETH + the ERC-20 tokens shown for this address (4 decimal
places, USD inline). Each balance row is clickable → **AddressToken** places, USD inline). Each balance row is clickable → **AddressToken**.
- While "Use Blockscout" is off, a line under the balance list: "Only While "Use Blockscout" is off, the line Home has under its wallet list
tracked tokens are listed, because "Use Blockscout" is off in Settings." follows it
- Send / Receive / + Token buttons and a "···" menu button - Send / Receive / + Token buttons and a "···" menu button
- "···" dropdown containing a single "Export Private Key" entry - "···" dropdown containing a single "Export Private Key" entry
- Transaction list (with ENS resolution for counterparties). While "Use - Transaction list (with ENS resolution for counterparties), or the line
Blockscout" is off, it shows only the line "No transaction history is Home's list shows while "Use Blockscout" is off
shown, because "Use Blockscout" is off in Settings."
- **Transitions**: - **Transitions**:
- Tap balance row → **AddressToken** (for that token) - Tap balance row → **AddressToken** (for that token)
- "Send" → **Send** (refuses with a flash message on a zero balance) - "Send" → **Send** (refuses with a flash message on a zero balance)
@@ -1854,13 +1834,11 @@ view would leave a wallet one click from deletion.
- Token contract well (ERC-20 only): full contract address (tap to copy, - Token contract well (ERC-20 only): full contract address (tap to copy,
etherscan link) plus name, symbol, decimals, holder count and project etherscan link) plus name, symbol, decimals, holder count and project
website where known. The "Holders:" row is left out, not shown as 0, when website where known. The "Holders:" row is left out, not shown as 0, when
the token's balance-list entry has no holder count. That happens when: the token's balance-list entry has no holder count: the explorer did not
- the explorer did not report a readable one report a readable one, "Use Blockscout" is off, or the token is not in the
- "Use Blockscout" is off balance list
- the token is not in the balance list - Token-filtered transaction list (only this token's transfers), or the line
- Token-filtered transaction list (only this token's transfers). While "Use Home's list shows while "Use Blockscout" is off
Blockscout" is off, it shows only the line "No transaction history is
shown, because "Use Blockscout" is off in Settings."
- **Transitions**: - **Transitions**:
- "Send" → **Send** (token locked: the dropdown is replaced by a static - "Send" → **Send** (token locked: the dropdown is replaced by a static
symbol and contract address) symbol and contract address)
@@ -1948,10 +1926,10 @@ view would leave a wallet one click from deletion.
that has received ETH but never sent a transaction still holds that ETH, that has received ETH but never sent a transaction still holds that ETH,
so it gets no warning. The Etherscan label check is made only while "Check so it gets no warning. The Etherscan label check is made only while "Check
recipients on Etherscan" is on. While it is off, the Etherscan box is left recipients on Etherscan" is on. While it is off, the Etherscan box is left
out. A line in its place says "This address was not checked on Etherscan, out and a line in its place says "This address was not checked on
because "Check recipients on Etherscan" is off in Settings." The box or Etherscan, because "Check recipients on Etherscan" is off in Settings."
the line is chosen when the screen is drawn, so neither moves anything Which of the two is there is known when the screen is drawn, so neither
later moves anything later
- Errors (an invalid amount), plus five reserved error boxes, so the balance - Errors (an invalid amount), plus five reserved error boxes, so the balance
and the fee arriving later move nothing — the amount exceeds the balance and the fee arriving later move nothing — the amount exceeds the balance
(for a token whose scale is unknown it says the token's balance is (for a token whose scale is unknown it says the token's balance is
@@ -1997,8 +1975,8 @@ view would leave a wallet one click from deletion.
are that network's, so a testnet transaction shows none, its From, To and are that network's, so a testnet transaction shows none, its From, To and
token contract links open that network's explorer, the balance read, the token contract links open that network's explorer, the balance read, the
fee estimate and the contract and never-sent recipient checks ask that fee estimate and the contract and never-sent recipient checks ask that
network's RPC endpoint, and the Etherscan label check asks that network's network's RPC endpoint, and the Etherscan label check, when it is made,
explorer asks that network's explorer
- "Sign & Send" (correct password) when the gas limit, a fee per gas or the - "Sign & Send" (correct password) when the gas limit, a fee per gas or the
total fee the RPC endpoint fills in at signing is over its bound in total fee the RPC endpoint fills in at signing is over its bound in
`assertWithinCeilings()` (`src/shared/approvalVerify.js`) → nothing is `assertWithinCeilings()` (`src/shared/approvalVerify.js`) → nothing is
@@ -2118,9 +2096,9 @@ view would leave a wallet one click from deletion.
on, whichever network is active: its block, network details, decoded details on, whichever network is active: its block, network details, decoded details
and raw data are read from that network's Blockscout, the one Settings has for and raw data are read from that network's Blockscout, the one Settings has for
it, and its etherscan links open that network's explorer. They are read only it, and its etherscan links open that network's explorer. They are read only
while "Use Blockscout" is on. The user can open Settings from this screen, while "Use Blockscout" is on. The screen can still be shown with it off, when
turn the setting off and press Back. The screen is then drawn again without the user opens Settings from it, turns the setting off and presses Back; then
asking Blockscout. A line in place of those details says "No block, decoded Blockscout is not asked, and a line in their place says "No block, decoded
details, network details or raw data are shown, because "Use Blockscout" is details, network details or raw data are shown, because "Use Blockscout" is
off in Settings." off in Settings."
- **Elements** (grouped into logical blocks using light well containers; field - **Elements** (grouped into logical blocks using light well containers; field
@@ -2205,21 +2183,18 @@ view would leave a wallet one click from deletion.
already active changes nothing and sends nothing already active changes nothing and sends nothing
- Ethereum RPC: endpoint URL input + "Save" button (validated against - Ethereum RPC: endpoint URL input + "Save" button (validated against
`eth_chainId` before being saved) `eth_chainId` before being saved)
- Blockscout API: - Blockscout API: a "Use Blockscout" checkbox, unticked until the user ticks
- "Use Blockscout" checkbox, unticked until the user ticks it it, with a sentence saying it sends the user's addresses, and the hash of
- A sentence saying what it shows and what it sends. It sends the each transaction opened, to the Blockscout API below, for transaction
Blockscout API the user's addresses and the hash of each transaction history, tokens not tracked, and transaction details; then the endpoint
opened URL input + "Save" button (validated against `/stats` before being saved,
- Endpoint URL input + "Save" button. "Save" checks the URL by asking it a request the user presses for that carries no user data, made whether or
for `/stats` before saving it. That request carries no user data. It not the checkbox is ticked)
is made whether or not "Use Blockscout" is ticked. - Etherscan: a "Check recipients on Etherscan" checkbox, unticked until the
- Etherscan: user ticks it, with a sentence saying it sends the address about to be
- "Check recipients on Etherscan" checkbox, unticked until the user sent to, to Etherscan, to look for a phishing or scam label on it. Both
ticks it checkboxes are one setting each for every network, and Welcome offers the
- A sentence saying it sends each recipient's address to Etherscan to same two
check it for a phishing or scam label
- Each of the two settings applies to every network. Welcome offers the same
two checkboxes
- Token Spam Protection: - Token Spam Protection:
- "Hide fake tokens impersonating a known symbol" checkbox - "Hide fake tokens impersonating a known symbol" checkbox
- "Hide tokens with fewer than 1,000 holders" checkbox - "Hide tokens with fewer than 1,000 holders" checkbox
@@ -2763,17 +2738,12 @@ view would leave a wallet one click from deletion.
### External Services ### External Services
AutistMask is not a fully self-contained offline tool. By default it sends the AutistMask is not a fully self-contained offline tool. By default it sends the
user's data only to the Ethereum RPC endpoint. It also asks the CoinDesk price user's data to one service only, the Ethereum RPC endpoint, and asks one more,
API for prices, sending token symbols and nothing else. the CoinDesk price API, for prices with nothing but token symbols. Two more
services are sent none of the user's data until the user turns on the setting
Two more services are sent none of the user's data until the user turns on their for each, on the Welcome screen or in Settings: Blockscout ("Use Blockscout")
settings: and Etherscan ("Check recipients on Etherscan"). Both settings are off in a new
profile, and each is one setting for every network.
- Blockscout, with "Use Blockscout"
- Etherscan, with "Check recipients on Etherscan"
Both settings are on the Welcome screen and in Settings. Both are off in a new
install. Each setting applies to every network.
Contacted by default: Contacted by default:
@@ -2782,10 +2752,11 @@ Contacted by default:
them the balance of every tracked token at every address (`balanceOf`), them the balance of every tracked token at every address (`balanceOf`),
estimate gas (`eth_estimateGas`), fetch nonces (`eth_getTransactionCount`), estimate gas (`eth_estimateGas`), fetch nonces (`eth_getTransactionCount`),
broadcast transactions (`eth_sendRawTransaction`), and check transaction broadcast transactions (`eth_sendRawTransaction`), and check transaction
receipts. Every ENS lookup is made through it alone. A name whose resolver receipts. ENS lookups, of a name typed into Send and of the names shown for
says it is resolved off-chain therefore does not resolve. The default endpoint the user's addresses, are made through it alone, so a name whose resolver says
is a public RPC (configurable by the user to any endpoint they prefer, it is resolved off-chain does not resolve. The default endpoint is a public
including a local node). By default the extension talks to RPC (configurable by the user to any endpoint they prefer, including a local
node). By default the extension talks to
`https://ethereum-rpc.publicnode.com`. `https://ethereum-rpc.publicnode.com`.
- **Data sent**: Ethereum addresses, transaction data, contract call - **Data sent**: Ethereum addresses, transaction data, contract call
parameters. The RPC endpoint can see all on-chain queries and submitted parameters. The RPC endpoint can see all on-chain queries and submitted
@@ -2800,21 +2771,18 @@ Contacted by default:
Sent the user's data only while the user has turned the setting on: Sent the user's data only while the user has turned the setting on:
- **Blockscout block-explorer API** ("Use Blockscout"): The default endpoint is - **Blockscout block-explorer API** ("Use Blockscout"): Used to fetch
`https://eth.blockscout.com/api/v2` (configurable by the user in Settings). transaction history (normal transactions and ERC-20 token transfers) for Home,
- **Used for**: AddressDetail and AddressToken, the balances of the ERC-20 tokens the user has
- transaction history (normal transactions and ERC-20 token transfers), not tracked, token holder counts (for spam filtering), and a transaction's
for Home, AddressDetail and AddressToken block, network details and calldata for TransactionDetail. The default
- the balances of the ERC-20 tokens the user has not tracked endpoint is `https://eth.blockscout.com/api/v2` (configurable by the user in
- token holder counts, for spam filtering Settings). While the setting is off, those screens say in a plain line what is
- a transaction's block, network details and calldata, for not shown and that this setting turns it on, and only tracked tokens are
TransactionDetail listed, their balances read through the RPC endpoint. The endpoint check
- **While the setting is off**: each of those screens shows a line saying Settings makes when the user presses "Save" beside the URL asks only for
what it leaves out and that "Use Blockscout" is off. Only tracked tokens `/stats` and carries no user data; it is made whether or not the setting is
are listed. on.
- **Saving the URL**: pressing "Save" beside the URL in Settings asks that
URL for `/stats`. This request carries no user data. It is made whether or
not the setting is on.
- **Data sent**: Ethereum addresses, and the hash of each transaction the - **Data sent**: Ethereum addresses, and the hash of each transaction the
user opens. Blockscout receives the user's addresses to query their user opens. Blockscout receives the user's addresses to query their
transaction history and token balances. No private keys, passwords, or transaction history and token balances. No private keys, passwords, or
@@ -2825,11 +2793,12 @@ Sent the user's data only while the user has turned the setting on:
recipient address on Etherscan to check for phishing/scam labels. This is a recipient address on Etherscan to check for phishing/scam labels. This is a
direct page fetch with no API key; the user's browser makes the request. While direct page fetch with no API key; the user's browser makes the request. While
the setting is off, ConfirmTx says that no Etherscan check was made. the setting is off, ConfirmTx says that no Etherscan check was made.
- **Data sent**: the recipient's address and nothing else. - **Data sent**: the recipient address. The user's own addresses are not
sent.
The etherscan links on the screens open a page in the browser when the user The etherscan links on the screens open a page in the browser when the user
clicks one. They are not requests the wallet makes. Nothing is fetched from them clicks one. They are not requests the wallet makes, and nothing is fetched from
until the user clicks. them until then.
What the extension does NOT do: What the extension does NOT do:
@@ -2838,9 +2807,9 @@ What the extension does NOT do:
- No Infura/Alchemy dependency (any JSON-RPC endpoint works) - No Infura/Alchemy dependency (any JSON-RPC endpoint works)
- No backend servers operated by the developer - No backend servers operated by the developer
Users who want maximum privacy can point the RPC URL at their own node. With Users who want maximum privacy can point the RPC URL at their own node, and,
"Use Blockscout" on, they can point the Blockscout URL at their own instance when they turn Blockscout on, the Blockscout URL at their own instance (price
too. fetching can be disabled in a future version).
### Dependencies ### Dependencies
@@ -3022,10 +2991,9 @@ logged.
- Add multiple addresses within an HD wallet - Add multiple addresses within an HD wallet
- Manage multiple wallets simultaneously - Manage multiple wallets simultaneously
- View ETH balance per address - View ETH balance per address
- View ERC-20 token balances: - View ERC-20 token balances (tokens the user adds by contract address, and,
- tokens the user adds by contract address while "Use Blockscout" is on, tokens on the bundled known-token list and
- while "Use Blockscout" is on, tokens on the bundled known-token list and tokens with 1,000 or more holders)
tokens with 1,000 or more holders
- View transaction history and transaction details, while "Use Blockscout" is on - View transaction history and transaction details, while "Use Blockscout" is on
- Send ETH to an address - Send ETH to an address
- Send ERC-20 tokens to an address - Send ERC-20 tokens to an address
+32 -43
View File
@@ -58,7 +58,7 @@ analytics, use a portfolio tracker. The wallet is not the place for any of that.
- **No NFT galleries or portfolio views.** This is a wallet, not a dashboard. - **No NFT galleries or portfolio views.** This is a wallet, not a dashboard.
- **No third-party token list APIs.** The balances of the tokens you track are - **No third-party token list APIs.** The balances of the tokens you track are
read from your RPC endpoint. While "Use Blockscout" is on, the other tokens read from your RPC endpoint; while you have "Use Blockscout" on, the others
come from the same block explorer you configure for transaction history. The come from the same block explorer you configure for transaction history. The
extension ships its own hardcoded list of top ERC-20 contract addresses for extension ships its own hardcoded list of top ERC-20 contract addresses for
symbol-spoofing detection. Any token you want tracked across all your symbol-spoofing detection. Any token you want tracked across all your
@@ -71,12 +71,10 @@ analytics, use a portfolio tracker. The wallet is not the place for any of that.
AutistMask is a browser extension that runs entirely in your browser. It does AutistMask is a browser extension that runs entirely in your browser. It does
not have a backend server. Out of the box it sends your data only to the not have a backend server. Out of the box it sends your data only to the
Ethereum RPC endpoint. It also asks the CoinDesk price API for prices, sending Ethereum RPC endpoint, and asks the CoinDesk price API for prices with nothing
token symbols and nothing else. but token symbols. Blockscout and Etherscan are sent none of your data until you
turn on "Use Blockscout" or "Check recipients on Etherscan", on the Welcome
Blockscout and Etherscan are sent none of your data until you turn them on. screen or later in Settings. Both are off in a new install.
Their settings are "Use Blockscout" and "Check recipients on Etherscan", on the
Welcome screen and in Settings. Both are off in a new install.
### External Services ### External Services
@@ -102,27 +100,20 @@ addresses are necessarily visible to the RPC provider when querying balances.
**Blockscout API** (default: `eth.blockscout.com/api/v2`; **Blockscout API** (default: `eth.blockscout.com/api/v2`;
`eth-sepolia.blockscout.com/api/v2` on Sepolia) `eth-sepolia.blockscout.com/api/v2` on Sepolia)
Blockscout is an open-source blockchain explorer. AutistMask uses it only while Off until you turn on "Use Blockscout". Used to fetch transaction history, the
"Use Blockscout" is on. It then asks Blockscout for: balances of the tokens you have not tracked, and the details of a transaction
you open. Blockscout is an open-source blockchain explorer. AutistMask queries
it for your ERC-20 token balances (including the holder counts used for spam
filtering), your recent transactions and token transfers, and the block, fees
and calldata of a transaction you open. You can change this in Settings to a
self-hosted Blockscout instance. While it is off, the screens that would show
history say so, and only the tokens you track are listed.
- your recent transactions and token transfers When it is contacted: while "Use Blockscout" is on, on every balance refresh,
- the balances of the tokens you have not tracked, with the holder counts used whenever a screen showing transaction history is opened, and when you open a
for spam filtering transaction. The one exception, whether or not the setting is on, is pressing
- the block, fees and calldata of a transaction you open "Save" beside the Blockscout URL in Settings, which checks that URL by asking it
for `/stats` and sends none of your data.
You can change this in Settings to a self-hosted Blockscout instance. While the
setting is off, each screen that would show Blockscout's data says so instead.
Only the tokens you track are listed.
When it is contacted, while "Use Blockscout" is on:
- on every balance refresh
- whenever a screen showing transaction history is opened
- when you open a transaction
Pressing "Save" beside the Blockscout URL in Settings also contacts it, even
with the setting off. That request checks the URL by asking it for `/stats`. It
sends none of your data.
What gets sent: your Ethereum addresses (to look up balances and transactions) What gets sent: your Ethereum addresses (to look up balances and transactions)
and the hash of each transaction you open. and the hash of each transaction you open.
@@ -143,7 +134,7 @@ address.
**Etherscan address labels** (`etherscan.io`; `sepolia.etherscan.io` on Sepolia) **Etherscan address labels** (`etherscan.io`; `sepolia.etherscan.io` on Sepolia)
Off until you turn on "Check recipients on Etherscan". When you review a send, Off until you turn on "Check recipients on Etherscan". When you review a send,
AutistMask fetches the recipient's public Etherscan address page. It looks for a AutistMask fetches the recipient's public Etherscan address page and looks for a
"Fake_Phishing"/"Phish/Hack" label or a scam warning, and shows a red warning if "Fake_Phishing"/"Phish/Hack" label or a scam warning, and shows a red warning if
it finds one. This is a plain page fetch with no API key, made by your browser. it finds one. This is a plain page fetch with no API key, made by your browser.
It is best-effort: if it fails, it is silently ignored. This endpoint is not It is best-effort: if it fails, it is silently ignored. This endpoint is not
@@ -153,8 +144,8 @@ Etherscan check was made.
When it is contacted: only while "Check recipients on Etherscan" is on, each When it is contacted: only while "Check recipients on Etherscan" is on, each
time you reach the send confirmation screen. time you reach the send confirmation screen.
What gets sent: the recipient's address and nothing else. As with any request, What gets sent: the recipient address you are about to send to, and your IP
Etherscan sees your IP address. address. Your own addresses are not sent.
Etherscan links shown elsewhere in the UI (on addresses, transactions, and token Etherscan links shown elsewhere in the UI (on addresses, transactions, and token
contracts) are ordinary links. They contact nothing until you click them. contracts) are ordinary links. They contact nothing until you click them.
@@ -208,9 +199,9 @@ password.
1. Click the AutistMask icon in your browser toolbar. 1. Click the AutistMask icon in your browser toolbar.
2. Click "Add wallet" (on first use), or open Settings and click "+ Add wallet". 2. Click "Add wallet" (on first use), or open Settings and click "+ Add wallet".
On first use, the screen with "Add wallet" also offers "Use Blockscout" and On first use the same screen offers "Use Blockscout" and "Check recipients on
"Check recipients on Etherscan", both off. Tick either if you want what it Etherscan", both off; tick either if you want what it does (see External
does (see External Services). You can change both later in Settings. Services). You can change both later in Settings.
3. On the "From Phrase" tab, click the die button to generate a random 12-word 3. On the "From Phrase" tab, click the die button to generate a random 12-word
recovery phrase. recovery phrase.
4. **Write down the recovery phrase and store it safely.** Anyone with these 4. **Write down the recovery phrase and store it safely.** Anyone with these
@@ -246,14 +237,11 @@ always produce the same sequence of addresses.
### Adding ERC-20 Tokens ### Adding ERC-20 Tokens
Tokens you hold show up automatically only while "Use Blockscout" is on. Even Tokens you hold show up automatically only while "Use Blockscout" is on, and
then, a token shows up only if it is in the extension's bundled list of then only if they are in the extension's bundled list of well-known tokens or
well-known tokens or has at least 1,000 holders. Everything else is treated as have at least 1,000 holders; everything else is treated as spam and hidden. To
spam and hidden. track a token explicitly (which also shows it at zero balance, and shows it
whether or not "Use Blockscout" is on), add it by contract address:
A token you track is shown whether or not "Use Blockscout" is on. By default it
is shown at zero balance too (see Display in Settings). To track a token, add it
by contract address:
1. Go to an address detail view (click `[info]` on any address). 1. Go to an address detail view (click `[info]` on any address).
2. Click "+ Token". 2. Click "+ Token".
@@ -419,8 +407,9 @@ Click the gear icon on the home screen to access settings:
that network's defaults if you have not used it before. that network's defaults if you have not used it before.
- **Ethereum RPC**: Change the Ethereum node endpoint. Default is a public RPC. - **Ethereum RPC**: Change the Ethereum node endpoint. Default is a public RPC.
You can use your own node for maximum privacy. You can use your own node for maximum privacy.
- **Blockscout API**: the "Use Blockscout" checkbox, off until you tick it, and - **Blockscout API**: "Use Blockscout", off until you tick it, and the
the URL of the Blockscout instance. You can use a self-hosted instance. Blockscout instance used for transaction history, the tokens you have not
tracked and transaction details. You can use a self-hosted instance.
- **Etherscan**: "Check recipients on Etherscan", off until you tick it. - **Etherscan**: "Check recipients on Etherscan", off until you tick it.
- **Token Spam Protection**: Toggle individual scam filters and set the dust - **Token Spam Protection**: Toggle individual scam filters and set the dust
transaction threshold. transaction threshold.
+14 -14
View File
@@ -46,8 +46,8 @@
<div class="bg-well p-3 mx-1 mb-3"> <div class="bg-well p-3 mx-1 mb-3">
<p class="text-xs mb-2"> <p class="text-xs mb-2">
This wallet sends your data only to the Ethereum RPC This wallet sends your data only to the Ethereum RPC
endpoint, unless you turn on one of these. You can endpoint, unless you turn on either of these, here or
change them later in Settings. later in Settings.
</p> </p>
<label <label
class="text-xs flex items-center gap-1 cursor-pointer mb-1" class="text-xs flex items-center gap-1 cursor-pointer mb-1"
@@ -56,10 +56,10 @@
Use Blockscout Use Blockscout
</label> </label>
<p class="text-xs text-muted mb-2"> <p class="text-xs text-muted mb-2">
Shows transaction history, tokens you have not tracked Sends your addresses, and the hash of each transaction
and transaction details. Sends your addresses, and the you open, to the Blockscout API, for transaction
hash of each transaction you open, to the Blockscout history, tokens you have not tracked, and transaction
API. details.
</p> </p>
<label <label
class="text-xs flex items-center gap-1 cursor-pointer mb-1" class="text-xs flex items-center gap-1 cursor-pointer mb-1"
@@ -71,8 +71,8 @@
Check recipients on Etherscan Check recipients on Etherscan
</label> </label>
<p class="text-xs text-muted"> <p class="text-xs text-muted">
Sends each recipient's address to Etherscan to check it Sends the address you are about to send to, to
for a phishing or scam label. Etherscan, to look for a phishing or scam label on it.
</p> </p>
</div> </div>
<button <button
@@ -1059,10 +1059,10 @@
Use Blockscout Use Blockscout
</label> </label>
<p class="text-xs text-muted mb-2"> <p class="text-xs text-muted mb-2">
Shows transaction history, tokens you have not tracked Sends your addresses, and the hash of each transaction
and transaction details. Sends your addresses, and the you open, to the Blockscout API below, for transaction
hash of each transaction you open, to the Blockscout API history, tokens you have not tracked, and transaction
below. details.
</p> </p>
<p class="text-xs text-muted mb-1"> <p class="text-xs text-muted mb-1">
Change this if you run your own Blockscout instance. Change this if you run your own Blockscout instance.
@@ -1092,8 +1092,8 @@
Check recipients on Etherscan Check recipients on Etherscan
</label> </label>
<p class="text-xs text-muted"> <p class="text-xs text-muted">
Sends each recipient's address to Etherscan to check it Sends the address you are about to send to, to
for a phishing or scam label. Etherscan, to look for a phishing or scam label on it.
</p> </p>
</div> </div>
+7 -10
View File
@@ -38,16 +38,13 @@ function markViewRendered(view) {
if (view) renderedViews.add(view); if (view) renderedViews.add(view);
} }
// Begin a fresh page-load scope. The popup gets one by being loaded. It also // Begin a fresh page-load scope. The popup gets one by being loaded, and
// asks for one when every screen on the page is out of date: // asks for one after a network switch, because every screen then on the page
// // shows the previous network (showNewNetwork() in views/settings.js), and
// - after a network switch, since those screens show the previous network // after "Use Blockscout" or "Check recipients on Etherscan" changes in
// (showNewNetwork() in views/settings.js) // Settings, because every screen then on the page was drawn under the old
// - after "Use Blockscout" or "Check recipients on Etherscan" changes in // setting; the unit tests, which simulate several page loads against one
// Settings, since those screens were drawn under the old setting // module instance, ask for one too.
//
// The unit tests, which simulate several page loads against one module
// instance, ask for one too.
function resetRenderedViews() { function resetRenderedViews() {
renderedViews.clear(); renderedViews.clear();
} }
+2 -2
View File
@@ -334,8 +334,8 @@ function show(txInfo) {
$("confirm-contract-warning").style.visibility = "hidden"; $("confirm-contract-warning").style.visibility = "hidden";
$("confirm-burn-warning").style.visibility = "hidden"; $("confirm-burn-warning").style.visibility = "hidden";
$("confirm-etherscan-warning").style.visibility = "hidden"; $("confirm-etherscan-warning").style.visibility = "hidden";
// While "Check recipients on Etherscan" is off, there is no Etherscan // While "Check recipients on Etherscan" is off there is no Etherscan
// warning to reserve space for. A line in its place says so. // warning to reserve space for, and a line in its place says so.
const etherscanOn = !!state.checkRecipientsOnEtherscan; const etherscanOn = !!state.checkRecipientsOnEtherscan;
$("confirm-etherscan-warning").classList.toggle("hidden", !etherscanOn); $("confirm-etherscan-warning").classList.toggle("hidden", !etherscanOn);
$("confirm-etherscan-note").classList.toggle("hidden", etherscanOn); $("confirm-etherscan-note").classList.toggle("hidden", etherscanOn);
+1 -1
View File
@@ -535,7 +535,7 @@ const CONTRACT_CREATION_TEXT =
"This transaction creates a new contract. It has no recipient."; "This transaction creates a new contract. It has no recipient.";
// What the transaction lists on Home, AddressDetail and AddressToken say while // What the transaction lists on Home, AddressDetail and AddressToken say while
// the user has "Use Blockscout" off. Their history comes from Blockscout alone. // the user has "Use Blockscout" off: the history comes from Blockscout alone.
const HISTORY_OFF_TEXT = const HISTORY_OFF_TEXT =
'No transaction history is shown, because "Use Blockscout" is off in Settings.'; 'No transaction history is shown, because "Use Blockscout" is off in Settings.';
+5 -5
View File
@@ -367,11 +367,11 @@ function init(_ctx) {
showFlash("Saved."); showFlash("Saved.");
}); });
// The screens under Settings were drawn under the old setting. Each change // The screens under Settings were drawn under the old setting, so each
// makes every screen but Settings count as not yet drawn, as a network // change makes every screen but Settings count as not yet drawn, as a
// switch does. Back then draws again any screen a reopened popup can draw. // network switch does, and Back draws the one it lands on again. Welcome
// Welcome offers the same two settings, and Back only unhides it, so its // offers the same two settings and is only unhidden on Back, so its boxes
// boxes are set here too. // are set here too.
$("settings-use-blockscout").addEventListener("change", async () => { $("settings-use-blockscout").addEventListener("change", async () => {
state.useBlockscout = $("settings-use-blockscout").checked; state.useBlockscout = $("settings-use-blockscout").checked;
$("welcome-use-blockscout").checked = state.useBlockscout; $("welcome-use-blockscout").checked = state.useBlockscout;
+3 -3
View File
@@ -1,6 +1,6 @@
// The first screen, shown while there is no wallet. It offers "Use Blockscout" // The first screen, shown while there is no wallet. It offers the two lookups
// and "Check recipients on Etherscan", which Settings offers too. Both are off // at services other than the RPC endpoint, both off until the user ticks them,
// until the user ticks them. // which Settings offers as well.
const { $, showView } = require("./helpers"); const { $, showView } = require("./helpers");
const { state, saveState } = require("../../shared/state"); const { state, saveState } = require("../../shared/state");
+15 -17
View File
@@ -1,9 +1,7 @@
// Balance fetching: // Balance fetching: ETH balances and the balances of the tokens the user
// // tracks via RPC, the other ERC-20 token balances and the holder counts via
// - ETH balances, and the balances of the tokens the user tracks, via RPC // Blockscout while the user has "Use Blockscout" on, ENS reverse lookup via
// - the other ERC-20 token balances and the holder counts via Blockscout, // RPC.
// while the user has "Use Blockscout" on
// - ENS reverse lookup via RPC
const { const {
JsonRpcProvider, JsonRpcProvider,
@@ -41,12 +39,12 @@ const { resolveTokenDecimals } = require("./approvalAmount");
// is a caller bug and must not resolve to a working provider for some other // is a caller bug and must not resolve to a working provider for some other
// chain. // chain.
// //
// `disableCcipRead` keeps every ENS lookup on the RPC endpoint. A resolver can // `disableCcipRead` keeps every ENS lookup on the RPC endpoint. Left on, as
// say a name is resolved off-chain and give a web address for it. By default // ethers has it, a resolver that says a name is resolved off-chain makes ethers
// ethers then fetches that address straight from the browser, sending the name // fetch the web address the resolver gives, straight from the browser, with the
// being looked up. For the reverse lookup of the user's addresses, that is the // name being looked up; for the reverse lookup of the user's addresses that is
// user's own name (https://git.eeqj.de/sneak/AutistMask/issues/668). With the // the user's own name (https://git.eeqj.de/sneak/AutistMask/issues/668). Such a
// flag set, such a name does not resolve. // name does not resolve.
function getProvider(rpcUrl, networkId) { function getProvider(rpcUrl, networkId) {
const net = Network.from(requireNetworkId(networkId).id); const net = Network.from(requireNetworkId(networkId).id);
const provider = new JsonRpcProvider(rpcUrl, net, { staticNetwork: net }); const provider = new JsonRpcProvider(rpcUrl, net, { staticNetwork: net });
@@ -95,7 +93,7 @@ function rawUnits(value) {
// Returns [{ address, name, symbol, decimals, balance, holders }]. // Returns [{ address, name, symbol, decimals, balance, holders }].
// //
// `useBlockscout` is the user's "Use Blockscout" setting. While it is off, // `useBlockscout` is the user's "Use Blockscout" setting. While it is off,
// Blockscout is not asked and the answer is an empty list. So no token the user // Blockscout is not asked and the answer is an empty list: no token the user
// has not tracked is listed. // has not tracked is listed.
// //
// Filters out spam: only shows tokens that are in the known token list, // Filters out spam: only shows tokens that are in the known token list,
@@ -382,10 +380,10 @@ async function refreshBalances(
// ERC-20 token balances: the tracked tokens' through the RPC // ERC-20 token balances: the tracked tokens' through the RPC
// endpoint, and from Blockscout the tokens the user has not // endpoint, and from Blockscout the tokens the user has not
// tracked. When Blockscout fails, the untracked rows from before // tracked. When Blockscout fails, the untracked rows from before
// this refresh stay. While "Use Blockscout" is off, there are no // this refresh stay; while "Use Blockscout" is off there are none.
// untracked rows. The Blockscout request is started first and // The Blockscout request is started first and handed to
// handed to fetchTrackedTokenBalances() too, which waits for it // fetchTrackedTokenBalances() too, which waits for it after
// after sending its balanceOf reads, so the two run side by side. // sending its balanceOf reads, so the two run side by side.
const previous = addr.tokenBalances || []; const previous = addr.tokenBalances || [];
const explorerRequest = fetchTokenBalances( const explorerRequest = fetchTokenBalances(
addr.address, addr.address,
+4 -6
View File
@@ -48,12 +48,10 @@ const DEFAULT_STATE = {
hideDustTransactions: true, hideDustTransactions: true,
dustThresholdGwei: 100000, dustThresholdGwei: 100000,
utcTimestamps: false, utcTimestamps: false,
// "Use Blockscout" and "Check recipients on Etherscan" in Settings. Each // "Use Blockscout" and "Check recipients on Etherscan" in Settings, one
// setting applies to every network. Both are off until the user turns them // setting each for every network. Both off until the user turns them on:
// on. With "Use Blockscout" on, Blockscout is sent the user's addresses and // the requests they allow send the user's addresses to a service other
// the hash of each transaction opened. With "Check recipients on // than the RPC endpoint.
// Etherscan" on, Etherscan is sent the recipient's address and nothing
// else.
useBlockscout: false, useBlockscout: false,
checkRecipientsOnEtherscan: false, checkRecipientsOnEtherscan: false,
fraudContracts: [], fraudContracts: [],
+2 -1
View File
@@ -237,7 +237,8 @@ function mergeTransactions(txs, tokenTransfers) {
// `nativeCurrency` from networks.js (`ETH`, `SepoliaETH`). // `nativeCurrency` from networks.js (`ETH`, `SepoliaETH`).
// //
// `useBlockscout` is the user's "Use Blockscout" setting. While it is off, // `useBlockscout` is the user's "Use Blockscout" setting. While it is off,
// Blockscout is not asked and the answer is an empty list. // Blockscout is not asked and there is no history: the answer is an empty
// list.
async function fetchRecentTransactions( async function fetchRecentTransactions(
address, address,
blockscoutUrl, blockscoutUrl,
+5 -4
View File
@@ -2,10 +2,11 @@
// turns them on (https://git.eeqj.de/sneak/AutistMask/issues/668). A new // turns them on (https://git.eeqj.de/sneak/AutistMask/issues/668). A new
// profile has "Use Blockscout" and "Check recipients on Etherscan" both off. // profile has "Use Blockscout" and "Check recipients on Etherscan" both off.
// Each request to either service is skipped where it is made while its setting // Each request to either service is skipped where it is made while its setting
// is off. The popup and the background hand the stored setting to the code that // is off, and made while it is on; the popup and the background hand the
// makes the request. The one exception is the check behind "Save" beside the // stored setting to the code that makes the request. The one exception is the
// Blockscout URL in Settings. It asks that URL only for `/stats` and carries no // endpoint check Settings makes when the user presses "Save" beside the
// user data. It is made whether or not the setting is on. // Blockscout URL. It asks only for `/stats` and carries no user data; it is
// made whether or not the setting is on.
// //
// The functions that make the requests are driven directly, against a fetch() // The functions that make the requests are driven directly, against a fetch()
// that records every URL it is asked for. The screens are driven through the // that records every URL it is asked for. The screens are driven through the
+19 -21
View File
@@ -272,20 +272,18 @@ test("the exact confirmation phrase erases the record and reloads into Welcome (
// ------------------ Blockscout and Etherscan are sent no user data (#668) // ------------------ Blockscout and Etherscan are sent no user data (#668)
// //
// A fresh install sends Blockscout and Etherscan none of the user's data until // A fresh install sends Blockscout and Etherscan none of the user's data until
// the user turns on "Use Blockscout" or "Check recipients on Etherscan". One // the user turns on "Use Blockscout" or "Check recipients on Etherscan". The
// request is made with the setting off: pressing "Save" beside the Blockscout // endpoint check Settings makes when the user presses "Save" beside the
// URL asks that URL for `/stats`. It carries no user data. // Blockscout URL asks only for `/stats` and carries no user data; it is made
// // whether or not the setting is on. The route handler in tests/e2e/network.js
// The route handler in tests/e2e/network.js records every request the // records every request the extension makes, from its pages and its background
// extension makes in env.routeOpts.requests, from its pages and its background // worker, in env.routeOpts.requests. Recording starts when launch() in
// worker. Recording starts when launch() in tests/e2e/harness.js installs that // tests/e2e/harness.js installs that handler, before the first popup page
// handler, before the first popup page opens. A request the background worker // opens; a request the background worker makes while it starts up, before
// makes while it starts up comes earlier and is not recorded. // then, is not recorded. These tests drive Home, AddressDetail, AddressToken
// // and ConfirmTx, and the background's own balance refresh, before either
// Before either setting is changed, these tests drive Home, AddressDetail, // setting is changed, then turn each on and watch its requests start.
// AddressToken and ConfirmTx, and the background's own balance refresh. Then // TransactionDetail, which also asks Blockscout, is left to the unit tests in
// they turn each setting on and watch its requests start. TransactionDetail,
// which also asks Blockscout, is left to the unit tests in
// tests/blockscoutEtherscanSettings.test.js. // tests/blockscoutEtherscanSettings.test.js.
// What the three transaction lists say while Use Blockscout is off. Written // What the three transaction lists say while Use Blockscout is off. Written
@@ -397,11 +395,11 @@ test("with neither setting changed, Home, AddressDetail, AddressToken and Confir
} }
}); });
// The background refreshes balances on its alarm, once a minute. It skips a // The background refreshes balances on its alarm, once a minute, and skips a
// refresh when the stored record says one ran in the last 30 seconds, and the // refresh when the stored record says one ran in the last 30 seconds, which
// open popup's own refresh runs every 10. So the popup is closed first. The // the open popup's own refresh does every 10. So the popup is closed, and that
// background worker then writes that record back to say no refresh has run, as // record is written back to say no refresh has run, from the background
// another extension page saving it would. // worker, as another extension page saving it would.
test("with neither setting changed, nothing has reached Blockscout or Etherscan, the background's refresh included (#668)", async (env) => { test("with neither setting changed, nothing has reached Blockscout or Etherscan, the background's refresh included (#668)", async (env) => {
await waitForPersisted( await waitForPersisted(
env.page, env.page,
@@ -503,8 +501,8 @@ test("turning on Use Blockscout from AddressDetail's gear asks Blockscout for th
}); });
// Ticked from ConfirmTx's gear, so Back lands on the screen that said no // Ticked from ConfirmTx's gear, so Back lands on the screen that said no
// Etherscan check was made. Left on for the rest of the run, so the later // Etherscan check was made. Left on for the rest of the run, as the check was
// confirmation screens are driven with the check made. // always made before #668.
test("turning on Check recipients on Etherscan from ConfirmTx's gear has ConfirmTx ask Etherscan on Back and show its label (#668)", async (env) => { test("turning on Check recipients on Etherscan from ConfirmTx's gear has ConfirmTx ask Etherscan on Back and show its label (#668)", async (env) => {
env.routeOpts.ethBalanceWei = toHexWei(FUNDED_ETH_WEI); env.routeOpts.ethBalanceWei = toHexWei(FUNDED_ETH_WEI);
env.routeOpts.etherscanLabel = "Fake_Phishing668"; env.routeOpts.etherscanLabel = "Fake_Phishing668";
+13 -15
View File
@@ -1,13 +1,13 @@
// ENS lookups ask nothing but the RPC endpoint. A resolver can answer that a // ENS lookups ask nothing but the RPC endpoint. A resolver can answer that a
// name is resolved off-chain, naming a web address to fetch the answer from. // name is resolved off-chain, naming a web address to fetch the answer from;
// ethers fetches it unless the provider has `disableCcipRead` set. That request // ethers fetches it unless the provider has `disableCcipRead` set, and that
// would carry the name to a server other than the RPC endpoint // request would carry the name to a server other than the RPC endpoint
// (https://git.eeqj.de/sneak/AutistMask/issues/668). With the flag set, such a // (https://git.eeqj.de/sneak/AutistMask/issues/668). With it set, such a name
// name does not resolve. // does not resolve.
// //
// The provider getProvider() builds runs against a fake JSON-RPC node. Its // The provider getProvider() builds runs against a fake JSON-RPC node,
// answers go through ethers' own request hook, which also records the address // answered through ethers' own request hook, which also records the address of
// of every request ethers makes, the off-chain fetch included. // every request ethers makes, the off-chain fetch included.
const { FetchRequest, Interface } = require("ethers"); const { FetchRequest, Interface } = require("ethers");
const { getProvider } = require("../src/shared/balances"); const { getProvider } = require("../src/shared/balances");
@@ -17,13 +17,11 @@ const RESOLVER = "0x5555555555555555555555555555555555555555";
const USER = "0x1111111111111111111111111111111111111111"; const USER = "0x1111111111111111111111111111111111111111";
const NAME = "offchain.eth"; const NAME = "offchain.eth";
// The ENS registry's resolver(), and the resolver's functions ethers calls: // The ENS registry's resolver(), and the resolver's functions ethers calls: the
// // registry names RESOLVER for every name, the resolver says it resolves names
// - the registry names RESOLVER for every name // through resolve(), gives NAME as the reverse record of any address, and
// - the resolver says it resolves names through resolve() // answers resolve() with the OffchainLookup error that says the name is
// - it gives NAME as the reverse record of any address // resolved off-chain.
// - it answers resolve() with the OffchainLookup error, which says the name
// is resolved off-chain
const ens = new Interface([ const ens = new Interface([
"function resolver(bytes32) view returns (address)", "function resolver(bytes32) view returns (address)",
"function supportsInterface(bytes4) view returns (bool)", "function supportsInterface(bytes4) view returns (bool)",