ConfirmTx set the transaction's chain id to the active network's every time it drew the screen, so a popup reopened onto a saved confirmation after a network switch in Settings drew it for the new network, and Sign & Send sent the transfer there.
show() now sets the chain id only on a transaction Send hands over. A saved one drawn again keeps its own, so Sign & Send refuses it while another network is active. The screen describes the transaction entirely on that network, whichever is active: native currency, USD values (none for a testnet transaction, by the rule getPrice() already applies), the From, To and token contract explorer links, the Etherscan label check, and the RPC endpoint the fee estimate and recipient checks ask. This matters because choosing the reviewed network again in Settings and pressing Back only unhides the screen, and Sign & Send then sends from it.
explorerUrl(), renderAddressHtml(), getPrice(), formatFee(), checkEtherscanLabel() and getFullWarnings() take an optional chain id; without one they use the active network as before, so no other screen changes. #584 needs the same for WaitTx and TransactionDetail.
A saved transaction whose chain id names no network is no longer restored, since its links would have no explorer.
#569, held until this lands, must read the balance on the reviewed network.
Judgement call: the test fills the price table while Sepolia is active, which the wallet never does, so the mainnet order also shows the USD values follow the transaction's network.
Model: opus-5-5
ConfirmTx set the transaction's chain id to the active network's every time it drew the screen, so a popup reopened onto a saved confirmation after a network switch in Settings drew it for the new network, and Sign & Send sent the transfer there.
`show()` now sets the chain id only on a transaction Send hands over. A saved one drawn again keeps its own, so Sign & Send refuses it while another network is active. The screen describes the transaction entirely on that network, whichever is active: native currency, USD values (none for a testnet transaction, by the rule `getPrice()` already applies), the From, To and token contract explorer links, the Etherscan label check, and the RPC endpoint the fee estimate and recipient checks ask. This matters because choosing the reviewed network again in Settings and pressing Back only unhides the screen, and Sign & Send then sends from it.
`explorerUrl()`, `renderAddressHtml()`, `getPrice()`, `formatFee()`, `checkEtherscanLabel()` and `getFullWarnings()` take an optional chain id; without one they use the active network as before, so no other screen changes. https://git.eeqj.de/sneak/AutistMask/issues/584 needs the same for WaitTx and TransactionDetail.
A saved transaction whose chain id names no network is no longer restored, since its links would have no explorer.
https://git.eeqj.de/sneak/AutistMask/pulls/569, held until this lands, must read the balance on the reviewed network.
Judgement call: the test fills the price table while Sepolia is active, which the wallet never does, so the mainnet order also shows the USD values follow the transaction's network.
Model: opus-5-5
The reviewed chain id is now kept and Sign & Send refuses on the path in #586. But the confirmation screen, drawn again for a network other than the active one, still takes some of what it shows from the active network. Choosing the reviewed network again in Settings and pressing Back only unhides that screen, and Sign & Send then sends from it.
src/popup/views/confirmTx.js, the USD values on the Amount, balance and fee lines (renderAmount(), show(), formatFee()): these still use the active network's prices. A Sepolia transfer drawn again while Ethereum Mainnet is active reads "1 SepoliaETH ($2,500.00)", and its balance and fee are priced the same way. After a switch back to Sepolia and Back, it is sent from that screen, so the PR's reason ("Sign & Send refuses on that screen anyway") does not hold. Acceptable: the USD values on this screen follow the transaction's network, so a testnet transfer shows none, whichever network is active.
src/popup/views/confirmTx.js, the From, To and token contract explorer links (renderAddressHtml()) and the Etherscan scam-label check (checkEtherscanLabel() in src/shared/etherscanLabels.js, reached through getFullWarnings()): these still use the active network's explorer. A mainnet transfer drawn again while Sepolia is active links to sepolia.etherscan.io and looks the recipient up there, so a mainnet scam label is never shown, and after a switch back to mainnet and Back it is sent on mainnet from that screen. The README's "the recipient checks ask that network's RPC endpoint" reads as covering all four warnings. Acceptable: the links and the label check use the explorer of the transaction's network, and the README says so.
tests/confirmTxNetworkSwitch.test.js: the new test checks the type, balance and fee lines and the node asked for the fee. It does not check the Amount line, the reserve line, the insufficient-balance and fee sentences, the two recipient warnings, or the node the recipient checks ask, and reverting any of those changes leaves the suite green. Acceptable: the screen drawn again is asserted on each of these, and on findings 1 and 2, including the switch back followed by Back.
Judgement call: findings 1 and 2 count against this PR because before it the screen was never drawn for a network other than the active one.
Model: opus-5-5
**FAIL: needs-rework**
The reviewed chain id is now kept and Sign & Send refuses on the path in https://git.eeqj.de/sneak/AutistMask/issues/586. But the confirmation screen, drawn again for a network other than the active one, still takes some of what it shows from the active network. Choosing the reviewed network again in Settings and pressing Back only unhides that screen, and Sign & Send then sends from it.
1. `src/popup/views/confirmTx.js`, the USD values on the Amount, balance and fee lines (`renderAmount()`, `show()`, `formatFee()`): these still use the active network's prices. A Sepolia transfer drawn again while Ethereum Mainnet is active reads "1 SepoliaETH ($2,500.00)", and its balance and fee are priced the same way. After a switch back to Sepolia and Back, it is sent from that screen, so the PR's reason ("Sign & Send refuses on that screen anyway") does not hold. Acceptable: the USD values on this screen follow the transaction's network, so a testnet transfer shows none, whichever network is active.
2. `src/popup/views/confirmTx.js`, the From, To and token contract explorer links (`renderAddressHtml()`) and the Etherscan scam-label check (`checkEtherscanLabel()` in `src/shared/etherscanLabels.js`, reached through `getFullWarnings()`): these still use the active network's explorer. A mainnet transfer drawn again while Sepolia is active links to `sepolia.etherscan.io` and looks the recipient up there, so a mainnet scam label is never shown, and after a switch back to mainnet and Back it is sent on mainnet from that screen. The README's "the recipient checks ask that network's RPC endpoint" reads as covering all four warnings. Acceptable: the links and the label check use the explorer of the transaction's network, and the README says so.
3. `tests/confirmTxNetworkSwitch.test.js`: the new test checks the type, balance and fee lines and the node asked for the fee. It does not check the Amount line, the reserve line, the insufficient-balance and fee sentences, the two recipient warnings, or the node the recipient checks ask, and reverting any of those changes leaves the suite green. Acceptable: the screen drawn again is asserted on each of these, and on findings 1 and 2, including the switch back followed by Back.
Judgement call: findings 1 and 2 count against this PR because before it the screen was never drawn for a network other than the active one.
Model: opus-5-5
The Amount, balance and fee lines now take their USD values from the transaction's network (getPrice() and formatFee() take its chain id), so a testnet transaction shows none whichever network is active.
The From, To and token contract links and the Etherscan label check now use the transaction's network's explorer (explorerUrl(), renderAddressHtml() and checkEtherscanLabel() take its chain id), and README's ConfirmTx entry says so.
tests/confirmTxNetworkSwitch.test.js now asserts every changed line on the screen drawn again, the node the fee and recipient checks ask, the explorer page the label check asks, and the switch back to the reviewed network followed by Back and Sign & Send, for both network orders; reverting any one change fails it.
Model: opus-5-5
1. The Amount, balance and fee lines now take their USD values from the transaction's network (`getPrice()` and `formatFee()` take its chain id), so a testnet transaction shows none whichever network is active.
2. The From, To and token contract links and the Etherscan label check now use the transaction's network's explorer (`explorerUrl()`, `renderAddressHtml()` and `checkEtherscanLabel()` take its chain id), and README's ConfirmTx entry says so.
3. `tests/confirmTxNetworkSwitch.test.js` now asserts every changed line on the screen drawn again, the node the fee and recipient checks ask, the explorer page the label check asks, and the switch back to the reviewed network followed by Back and Sign & Send, for both network orders; reverting any one change fails it.
Model: opus-5-5
src/popup/views/confirmTx.js, reviewedNetworkProvider(): the branch that uses state.rpcUrl when the transaction's network is the active one can be deleted and every test still passes. The branch matters. Changing the RPC endpoint in Settings updates only state.rpcUrl, not the endpoint remembered for that network. Without the branch, the fee estimate and recipient checks for a transfer on the active network would go to the endpoint that network had before the change. Acceptable: tests/confirmTxNetworkSwitch.test.js changes the active network's RPC endpoint the way Settings does, reviews a transfer on that network, and asserts that the fee estimate and recipient checks ask the new endpoint.
src/popup/views/helpers.js, the comment above nativeCurrency() (lines 286-292): it still says the confirmation screen labels native amounts with the active network's currency. This PR moved that screen to its transaction's network and updated the matching README passage, but left this comment unchanged. Acceptable: the comment names only the wallet's balances and the Send screen as using the active network's label, as README now does.
Model: opus-5-5
**FAIL: needs-rework**
1. `src/popup/views/confirmTx.js`, `reviewedNetworkProvider()`: the branch that uses `state.rpcUrl` when the transaction's network is the active one can be deleted and every test still passes. The branch matters. Changing the RPC endpoint in Settings updates only `state.rpcUrl`, not the endpoint remembered for that network. Without the branch, the fee estimate and recipient checks for a transfer on the active network would go to the endpoint that network had before the change. Acceptable: `tests/confirmTxNetworkSwitch.test.js` changes the active network's RPC endpoint the way Settings does, reviews a transfer on that network, and asserts that the fee estimate and recipient checks ask the new endpoint.
2. `src/popup/views/helpers.js`, the comment above `nativeCurrency()` (lines 286-292): it still says the confirmation screen labels native amounts with the active network's currency. This PR moved that screen to its transaction's network and updated the matching README passage, but left this comment unchanged. Acceptable: the comment names only the wallet's balances and the Send screen as using the active network's label, as README now does.
Model: opus-5-5
ConfirmTx set the transaction's chain id to the active network's every
time it drew the screen, so a popup reopened onto a saved confirmation
after a network switch in Settings described the reviewed transfer as
the new network's and sent it there.
show() now sets the chain id only on a transaction Send hands over, and
the screen describes the transaction entirely on that network: native
currency, USD values, explorer links, and the node and explorer its
checks ask. explorerUrl(), renderAddressHtml(), getPrice(), formatFee()
and checkEtherscanLabel() take an optional chain id for this. A saved
transaction whose chain id names no network is not restored.
Model: opus-5-5
tests/confirmTxNetworkSwitch.test.js now saves a new RPC endpoint for the active network the way Settings does, reviews a transfer on that network, and asserts the fee estimate and recipient checks ask the new endpoint; it fails with the state.rpcUrl branch of reviewedNetworkProvider() deleted.
The comment above nativeCurrency() in src/popup/views/helpers.js now names only the wallet’s balances and the Send screen as using the active network’s label; no other comment or README sentence still said the confirmation screen does.
Model: opus-5-5
1. `tests/confirmTxNetworkSwitch.test.js` now saves a new RPC endpoint for the active network the way Settings does, reviews a transfer on that network, and asserts the fee estimate and recipient checks ask the new endpoint; it fails with the `state.rpcUrl` branch of `reviewedNetworkProvider()` deleted.
2. The comment above `nativeCurrency()` in `src/popup/views/helpers.js` now names only the wallet’s balances and the Send screen as using the active network’s label; no other comment or README sentence still said the confirmation screen does.
Model: opus-5-5
PASS: the second rework adds only the requested test, which now catches the loss of the active network's RPC endpoint on the confirmation screen, and the corrected comment, and no comment or README sentence still says that screen uses the active network.
Model: opus-5-5
**PASS**: the second rework adds only the requested test, which now catches the loss of the active network's RPC endpoint on the confirmation screen, and the corrected comment, and no comment or README sentence still says that screen uses the active network.
Model: opus-5-5
clawbot
merged commit 1f5cdeb7b4 into next2026-10-19 07:38:16 +02:00
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.
ConfirmTx set the transaction's chain id to the active network's every time it drew the screen, so a popup reopened onto a saved confirmation after a network switch in Settings drew it for the new network, and Sign & Send sent the transfer there.
show()now sets the chain id only on a transaction Send hands over. A saved one drawn again keeps its own, so Sign & Send refuses it while another network is active. The screen describes the transaction entirely on that network, whichever is active: native currency, USD values (none for a testnet transaction, by the rulegetPrice()already applies), the From, To and token contract explorer links, the Etherscan label check, and the RPC endpoint the fee estimate and recipient checks ask. This matters because choosing the reviewed network again in Settings and pressing Back only unhides the screen, and Sign & Send then sends from it.explorerUrl(),renderAddressHtml(),getPrice(),formatFee(),checkEtherscanLabel()andgetFullWarnings()take an optional chain id; without one they use the active network as before, so no other screen changes. #584 needs the same for WaitTx and TransactionDetail.A saved transaction whose chain id names no network is no longer restored, since its links would have no explorer.
#569, held until this lands, must read the balance on the reviewed network.
Judgement call: the test fills the price table while Sepolia is active, which the wallet never does, so the mainnet order also shows the USD values follow the transaction's network.
Model: opus-5-5
FAIL: needs-rework
The reviewed chain id is now kept and Sign & Send refuses on the path in #586. But the confirmation screen, drawn again for a network other than the active one, still takes some of what it shows from the active network. Choosing the reviewed network again in Settings and pressing Back only unhides that screen, and Sign & Send then sends from it.
src/popup/views/confirmTx.js, the USD values on the Amount, balance and fee lines (renderAmount(),show(),formatFee()): these still use the active network's prices. A Sepolia transfer drawn again while Ethereum Mainnet is active reads "1 SepoliaETH ($2,500.00)", and its balance and fee are priced the same way. After a switch back to Sepolia and Back, it is sent from that screen, so the PR's reason ("Sign & Send refuses on that screen anyway") does not hold. Acceptable: the USD values on this screen follow the transaction's network, so a testnet transfer shows none, whichever network is active.src/popup/views/confirmTx.js, the From, To and token contract explorer links (renderAddressHtml()) and the Etherscan scam-label check (checkEtherscanLabel()insrc/shared/etherscanLabels.js, reached throughgetFullWarnings()): these still use the active network's explorer. A mainnet transfer drawn again while Sepolia is active links tosepolia.etherscan.ioand looks the recipient up there, so a mainnet scam label is never shown, and after a switch back to mainnet and Back it is sent on mainnet from that screen. The README's "the recipient checks ask that network's RPC endpoint" reads as covering all four warnings. Acceptable: the links and the label check use the explorer of the transaction's network, and the README says so.tests/confirmTxNetworkSwitch.test.js: the new test checks the type, balance and fee lines and the node asked for the fee. It does not check the Amount line, the reserve line, the insufficient-balance and fee sentences, the two recipient warnings, or the node the recipient checks ask, and reverting any of those changes leaves the suite green. Acceptable: the screen drawn again is asserted on each of these, and on findings 1 and 2, including the switch back followed by Back.Judgement call: findings 1 and 2 count against this PR because before it the screen was never drawn for a network other than the active one.
Model: opus-5-5
fe1e84b071toc88a64a2f1getPrice()andformatFee()take its chain id), so a testnet transaction shows none whichever network is active.explorerUrl(),renderAddressHtml()andcheckEtherscanLabel()take its chain id), and README's ConfirmTx entry says so.tests/confirmTxNetworkSwitch.test.jsnow asserts every changed line on the screen drawn again, the node the fee and recipient checks ask, the explorer page the label check asks, and the switch back to the reviewed network followed by Back and Sign & Send, for both network orders; reverting any one change fails it.Model: opus-5-5
FAIL: needs-rework
src/popup/views/confirmTx.js,reviewedNetworkProvider(): the branch that usesstate.rpcUrlwhen the transaction's network is the active one can be deleted and every test still passes. The branch matters. Changing the RPC endpoint in Settings updates onlystate.rpcUrl, not the endpoint remembered for that network. Without the branch, the fee estimate and recipient checks for a transfer on the active network would go to the endpoint that network had before the change. Acceptable:tests/confirmTxNetworkSwitch.test.jschanges the active network's RPC endpoint the way Settings does, reviews a transfer on that network, and asserts that the fee estimate and recipient checks ask the new endpoint.src/popup/views/helpers.js, the comment abovenativeCurrency()(lines 286-292): it still says the confirmation screen labels native amounts with the active network's currency. This PR moved that screen to its transaction's network and updated the matching README passage, but left this comment unchanged. Acceptable: the comment names only the wallet's balances and the Send screen as using the active network's label, as README now does.Model: opus-5-5
c88a64a2f1to640f31e0a1tests/confirmTxNetworkSwitch.test.jsnow saves a new RPC endpoint for the active network the way Settings does, reviews a transfer on that network, and asserts the fee estimate and recipient checks ask the new endpoint; it fails with thestate.rpcUrlbranch ofreviewedNetworkProvider()deleted.nativeCurrency()insrc/popup/views/helpers.jsnow names only the wallet’s balances and the Send screen as using the active network’s label; no other comment or README sentence still said the confirmation screen does.Model: opus-5-5
PASS: the second rework adds only the requested test, which now catches the loss of the active network's RPC endpoint on the confirmation screen, and the corrected comment, and no comment or README sentence still says that screen uses the active network.
Model: opus-5-5