Implements #372 by driving the label from nativeCurrency, not removing the field.
The wallet's balances and the Send and confirmation screens use nativeCurrency() in src/popup/views/helpers.js, the active network's. The approval, wait, success, error and transaction detail screens, the history and the fee-limit refusal use nativeCurrencyByChainId() in src/shared/networks.js.
Not obvious from the diff:
The "ETH" in state.selectedToken, txInfo.token and the Send option's value is the native token's id, not its label; unchanged.
txInfo and every history entry carry chainId: Send records the active network's when pressed, the approval its transaction's, the history its explorer's network. fetchRecentTransactions() takes it as its third argument.
A token reporting any network's nativeCurrency is a fake, as one reporting ETH was (KNOWN_SYMBOLS in src/shared/tokenList.js).
The transaction detail screen calls an entry a token transfer when it has a token contract, not by symbol.
The fee sentence and contract-recipient warning moved from index.html into show().
Judgement call: a transaction's figures are labelled by its own chain, the wallet's balances by the active network; the approval screen's value and fee name the nativeCurrency of the network its Network line names.
Judgement call: a chain id naming no network reads ETH; a wait or detail screen saved by an earlier version has none.
Judgement call: every network's nativeCurrency is reserved on every network, so a SepoliaETH token is dropped on mainnet too.
Judgement call: fixed wording kept: the USD/ETH price line (mainnet only) and the swap lines, where ETH is the router's name for the native currency.
Model: opus-5-5
Implements https://git.eeqj.de/sneak/AutistMask/issues/372 by driving the label from `nativeCurrency`, not removing the field.
The wallet's balances and the Send and confirmation screens use `nativeCurrency()` in `src/popup/views/helpers.js`, the active network's. The approval, wait, success, error and transaction detail screens, the history and the fee-limit refusal use `nativeCurrencyByChainId()` in `src/shared/networks.js`.
Not obvious from the diff:
- The `"ETH"` in `state.selectedToken`, `txInfo.token` and the Send option's value is the native token's id, not its label; unchanged.
- `txInfo` and every history entry carry `chainId`: Send records the active network's when pressed, the approval its transaction's, the history its explorer's network. `fetchRecentTransactions()` takes it as its third argument.
- A token reporting any network's `nativeCurrency` is a fake, as one reporting `ETH` was (`KNOWN_SYMBOLS` in `src/shared/tokenList.js`).
- The transaction detail screen calls an entry a token transfer when it has a token contract, not by symbol.
- The fee sentence and contract-recipient warning moved from `index.html` into `show()`.
Judgement call: a transaction's figures are labelled by its own chain, the wallet's balances by the active network; the approval screen's value and fee name the `nativeCurrency` of the network its Network line names.
Judgement call: a chain id naming no network reads `ETH`; a wait or detail screen saved by an earlier version has none.
Judgement call: every network's `nativeCurrency` is reserved on every network, so a `SepoliaETH` token is dropped on mainnet too.
Judgement call: fixed wording kept: the USD/ETH price line (mainnet only) and the swap lines, where `ETH` is the router's name for the native currency.
Model: opus-5-5
On Sepolia a fake token can now carry the native coin's label unchallenged. The fake-token rule reserves only ETH for the native asset (src/shared/tokenList.js:3626, read by src/shared/symbolSpoof.js), so an ERC-20 whose symbol is SepoliaETH passes it in the history, the balance list and the Send selector, and now reads exactly like the real coin, which read ETH before this change. The detail screen also decides native or token by symbol (src/popup/views/transactionDetail.js:45), so that token's transfer now shows as "Native SepoliaETH Transfer" where it showed "ERC-20 Token Transfer". README.md (lines 1115-1117 and 2355-2358) says a token claiming the native asset's symbol is always dropped. Acceptable: a token claiming the active network's nativeCurrency is treated as a spoof just as one claiming ETH is; the detail screen tells a native transfer from a token transfer by something a token cannot set (for example whether the entry has a token contract), not by symbol; a test covers both on Sepolia.
Two places still name the network's coin ETH on Sepolia, beyond the exceptions the plan on #372 allows (token symbols and swap lines): the fee-ceiling refusal (src/shared/approvalVerify.js:411-415), which states a Sepolia fee in ETH (the issue's fee item), and the contract-recipient warning (src/popup/index.html:651), shown on the screen that now says "Native SepoliaETH transfer". The PR body's reason for the first, that it has no network to read, does not hold: every transaction it checks carries its chain id. Acceptable: both name the active network's nativeCurrency, and the exception sentence in README.md (lines 853-855) and the PR body's judgement-call line match.
Model: opus-5-5
FAIL
1. On Sepolia a fake token can now carry the native coin's label unchallenged. The fake-token rule reserves only `ETH` for the native asset (`src/shared/tokenList.js:3626`, read by `src/shared/symbolSpoof.js`), so an ERC-20 whose symbol is `SepoliaETH` passes it in the history, the balance list and the Send selector, and now reads exactly like the real coin, which read `ETH` before this change. The detail screen also decides native or token by symbol (`src/popup/views/transactionDetail.js:45`), so that token's transfer now shows as "Native SepoliaETH Transfer" where it showed "ERC-20 Token Transfer". `README.md` (lines 1115-1117 and 2355-2358) says a token claiming the native asset's symbol is always dropped. Acceptable: a token claiming the active network's `nativeCurrency` is treated as a spoof just as one claiming `ETH` is; the detail screen tells a native transfer from a token transfer by something a token cannot set (for example whether the entry has a token contract), not by symbol; a test covers both on Sepolia.
2. Two places still name the network's coin `ETH` on Sepolia, beyond the exceptions the plan on https://git.eeqj.de/sneak/AutistMask/issues/372 allows (token symbols and swap lines): the fee-ceiling refusal (`src/shared/approvalVerify.js:411-415`), which states a Sepolia fee in `ETH` (the issue's fee item), and the contract-recipient warning (`src/popup/index.html:651`), shown on the screen that now says "Native SepoliaETH transfer". The PR body's reason for the first, that it has no network to read, does not hold: every transaction it checks carries its chain id. Acceptable: both name the active network's `nativeCurrency`, and the exception sentence in `README.md` (lines 853-855) and the PR body's judgement-call line match.
Model: opus-5-5
Fixed: every network's nativeCurrency is now reserved like ETH, which stays reserved everywhere, and the transaction detail screen decides by whether the entry has a token contract; Sepolia tests in tests/nativeCurrency.test.js cover both.
Fixed: the fee-limit refusal names the native currency of the transaction's chain id, and show() writes the contract-recipient warning with nativeCurrency(); the README.md exception sentence and the PR body's judgement-call lines match.
Model: opus-5-5
Rework of https://git.eeqj.de/sneak/AutistMask/pulls/442#issuecomment-125767, rebased onto `next`:
1. Fixed: every network's `nativeCurrency` is now reserved like `ETH`, which stays reserved everywhere, and the transaction detail screen decides by whether the entry has a token contract; Sepolia tests in `tests/nativeCurrency.test.js` cover both.
2. Fixed: the fee-limit refusal names the native currency of the transaction's chain id, and `show()` writes the contract-recipient warning with `nativeCurrency()`; the `README.md` exception sentence and the PR body's judgement-call lines match.
Model: opus-5-5
The approval screen labels a site's transaction value and fee with the active network's nativeCurrency, not that of the network the transaction is for (src/popup/views/approval.js:333-337; the fee through formatFee(), src/popup/views/helpers.js:282-291, called at approval.js:224). A connected site can switch the network without asking (wallet_switchEthereumChain) after its mainnet transaction is prepared and before this screen draws, then switch back before the user signs, so the check at signing passes. The screen then reads "Ethereum Mainnet" beside a value and fee in SepoliaETH, presenting real ETH as the test coin; on next it read ETH. The PR body's judgement-call line for this screen does not hold: the background refuses only a network other than the one selected at signing, not the one selected when the screen was drawn. Acceptable: the approval screen's value and fee name the nativeCurrency of the network the transaction's chain id names (the lookup its Network line already makes, approval.js:215), a test covers a selected network that differs from the transaction's, and the PR body and README.md (lines 849-855) say so.
Model: opus-5-5
FAIL
1. The approval screen labels a site's transaction value and fee with the active network's `nativeCurrency`, not that of the network the transaction is for (`src/popup/views/approval.js:333-337`; the fee through `formatFee()`, `src/popup/views/helpers.js:282-291`, called at `approval.js:224`). A connected site can switch the network without asking (`wallet_switchEthereumChain`) after its mainnet transaction is prepared and before this screen draws, then switch back before the user signs, so the check at signing passes. The screen then reads "Ethereum Mainnet" beside a value and fee in `SepoliaETH`, presenting real ETH as the test coin; on `next` it read `ETH`. The PR body's judgement-call line for this screen does not hold: the background refuses only a network other than the one selected at signing, not the one selected when the screen was drawn. Acceptable: the approval screen's value and fee name the `nativeCurrency` of the network the transaction's chain id names (the lookup its Network line already makes, `approval.js:215`), a test covers a selected network that differs from the transaction's, and the PR body and `README.md` (lines 849-855) say so.
Model: opus-5-5
networks.js gives each network a nativeCurrency (ETH, SepoliaETH) and nothing
read it: every screen wrote ETH. The wallet's balances and the Send and
confirmation screens now use the active network's. A transaction's figures use
the network its chain id names, through nativeCurrencyByChainId(): the
approval value and fee, the wait, success and error screens, history entries,
the detail screen and the fee-limit refusal, so a site switching networks
cannot make one read as another network's coin. The "ETH" that selectedToken
and txInfo.token hold is the native token's id and is unchanged. A token
reporting any network's nativeCurrency is a spoof, and the detail screen calls
an entry a token transfer when it has a token contract.
Model: opus-5-5
clawbot
changed title from chore: the native token's label follows the active network to chore: the native token's label follows the network2026-10-05 01:00:44 +02:00
Fixed: the approval screen's value and fee name the nativeCurrency of the network the transaction's chain id names, and so do the wait, success, error and transaction detail screens and the history, each by the chain id its transaction carries; tests/nativeCurrency.test.js shows each with the other network selected, and README.md and the PR body's judgement-call line say so.
Model: opus-5-5
Rework of https://git.eeqj.de/sneak/AutistMask/pulls/442#issuecomment-125836, rebased onto `next`:
1. Fixed: the approval screen's value and fee name the `nativeCurrency` of the network the transaction's chain id names, and so do the wait, success, error and transaction detail screens and the history, each by the chain id its transaction carries; `tests/nativeCurrency.test.js` shows each with the other network selected, and `README.md` and the PR body's judgement-call line say so.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements #372 by driving the label from
nativeCurrency, not removing the field.The wallet's balances and the Send and confirmation screens use
nativeCurrency()insrc/popup/views/helpers.js, the active network's. The approval, wait, success, error and transaction detail screens, the history and the fee-limit refusal usenativeCurrencyByChainId()insrc/shared/networks.js.Not obvious from the diff:
"ETH"instate.selectedToken,txInfo.tokenand the Send option's value is the native token's id, not its label; unchanged.txInfoand every history entry carrychainId: Send records the active network's when pressed, the approval its transaction's, the history its explorer's network.fetchRecentTransactions()takes it as its third argument.nativeCurrencyis a fake, as one reportingETHwas (KNOWN_SYMBOLSinsrc/shared/tokenList.js).index.htmlintoshow().Judgement call: a transaction's figures are labelled by its own chain, the wallet's balances by the active network; the approval screen's value and fee name the
nativeCurrencyof the network its Network line names.Judgement call: a chain id naming no network reads
ETH; a wait or detail screen saved by an earlier version has none.Judgement call: every network's
nativeCurrencyis reserved on every network, so aSepoliaETHtoken is dropped on mainnet too.Judgement call: fixed wording kept: the USD/ETH price line (mainnet only) and the swap lines, where
ETHis the router's name for the native currency.Model: opus-5-5
FAIL
On Sepolia a fake token can now carry the native coin's label unchallenged. The fake-token rule reserves only
ETHfor the native asset (src/shared/tokenList.js:3626, read bysrc/shared/symbolSpoof.js), so an ERC-20 whose symbol isSepoliaETHpasses it in the history, the balance list and the Send selector, and now reads exactly like the real coin, which readETHbefore this change. The detail screen also decides native or token by symbol (src/popup/views/transactionDetail.js:45), so that token's transfer now shows as "Native SepoliaETH Transfer" where it showed "ERC-20 Token Transfer".README.md(lines 1115-1117 and 2355-2358) says a token claiming the native asset's symbol is always dropped. Acceptable: a token claiming the active network'snativeCurrencyis treated as a spoof just as one claimingETHis; the detail screen tells a native transfer from a token transfer by something a token cannot set (for example whether the entry has a token contract), not by symbol; a test covers both on Sepolia.Two places still name the network's coin
ETHon Sepolia, beyond the exceptions the plan on #372 allows (token symbols and swap lines): the fee-ceiling refusal (src/shared/approvalVerify.js:411-415), which states a Sepolia fee inETH(the issue's fee item), and the contract-recipient warning (src/popup/index.html:651), shown on the screen that now says "Native SepoliaETH transfer". The PR body's reason for the first, that it has no network to read, does not hold: every transaction it checks carries its chain id. Acceptable: both name the active network'snativeCurrency, and the exception sentence inREADME.md(lines 853-855) and the PR body's judgement-call line match.Model: opus-5-5
f47d17a98fto8a39df08b0Rework of #442 (comment), rebased onto
next:nativeCurrencyis now reserved likeETH, which stays reserved everywhere, and the transaction detail screen decides by whether the entry has a token contract; Sepolia tests intests/nativeCurrency.test.jscover both.show()writes the contract-recipient warning withnativeCurrency(); theREADME.mdexception sentence and the PR body's judgement-call lines match.Model: opus-5-5
FAIL
nativeCurrency, not that of the network the transaction is for (src/popup/views/approval.js:333-337; the fee throughformatFee(),src/popup/views/helpers.js:282-291, called atapproval.js:224). A connected site can switch the network without asking (wallet_switchEthereumChain) after its mainnet transaction is prepared and before this screen draws, then switch back before the user signs, so the check at signing passes. The screen then reads "Ethereum Mainnet" beside a value and fee inSepoliaETH, presenting real ETH as the test coin; onnextit readETH. The PR body's judgement-call line for this screen does not hold: the background refuses only a network other than the one selected at signing, not the one selected when the screen was drawn. Acceptable: the approval screen's value and fee name thenativeCurrencyof the network the transaction's chain id names (the lookup its Network line already makes,approval.js:215), a test covers a selected network that differs from the transaction's, and the PR body andREADME.md(lines 849-855) say so.Model: opus-5-5
8a39df08b0to9a2910358dchore: the native token's label follows the active networkto chore: the native token's label follows the networkRework of #442 (comment), rebased onto
next:nativeCurrencyof the network the transaction's chain id names, and so do the wait, success, error and transaction detail screens and the history, each by the chain id its transaction carries;tests/nativeCurrency.test.jsshows each with the other network selected, andREADME.mdand the PR body's judgement-call line say so.Model: opus-5-5
PASS
Model: opus-5-5