Switching network in Settings under the confirmation screen sends the transfer on the new network #524

Open
opened 2026-10-14 04:49:15 +02:00 by clawbot · 2 comments
Collaborator

Steps. On Sepolia, Send 1 SepoliaETH to an address and press Review. ConfirmTx shows "Native SepoliaETH transfer" and checks the amount against the Sepolia balance. Press the Settings gear, choose Ethereum Mainnet, press Back, enter the password, press "Sign & Send".

What happens. 1 ETH is sent on mainnet to that address. Back only unhides ConfirmTx, because it was already drawn in this popup (src/popup/viewRouter.js:224-233), and the network switch (src/popup/views/settings.js:317-327) leaves it as it was, still labelled SepoliaETH. "Sign & Send" takes the network, endpoint and chain id at the moment of the click (src/popup/views/confirmTx.js:576-590); nothing records which network the screen was drawn for, so nothing notices the change. The other direction sends test coins instead of real ones, which is harmless; this one moves real money.

Should. README Display Consistency: "the Send and confirmation screens, which send on the active network, use the active network's" currency. A transfer confirmed on one network is never sent on another, as a site's transaction already is not: it is checked against the chain it was prepared on.

Severity: critical

Definition of done

  • A transfer confirmed on ConfirmTx is sent only on the network that screen was drawn for. If the active network has changed since, "Sign & Send" sends nothing and says why, or the screen is drawn again for the new network before it can be confirmed.
  • A test switches the network between drawing ConfirmTx and pressing "Sign & Send", and nothing is sent on the new network.

Model: opus-5-5

**Steps.** On Sepolia, Send 1 SepoliaETH to an address and press Review. ConfirmTx shows "Native SepoliaETH transfer" and checks the amount against the Sepolia balance. Press the Settings gear, choose Ethereum Mainnet, press Back, enter the password, press "Sign & Send". **What happens.** 1 ETH is sent on mainnet to that address. Back only unhides ConfirmTx, because it was already drawn in this popup (`src/popup/viewRouter.js:224-233`), and the network switch (`src/popup/views/settings.js:317-327`) leaves it as it was, still labelled SepoliaETH. "Sign & Send" takes the network, endpoint and chain id at the moment of the click (`src/popup/views/confirmTx.js:576-590`); nothing records which network the screen was drawn for, so nothing notices the change. The other direction sends test coins instead of real ones, which is harmless; this one moves real money. **Should.** README Display Consistency: "the Send and confirmation screens, which send on the active network, use the active network's" currency. A transfer confirmed on one network is never sent on another, as a site's transaction already is not: it is checked against the chain it was prepared on. Severity: critical ## Definition of done - [ ] A transfer confirmed on ConfirmTx is sent only on the network that screen was drawn for. If the active network has changed since, "Sign & Send" sends nothing and says why, or the screen is drawn again for the new network before it can be confirmed. - [ ] A test switches the network between drawing ConfirmTx and pressing "Sign & Send", and nothing is sent on the new network. Model: opus-5-5
clawbot self-assigned this 2026-10-14 04:49:15 +02:00
Author
Collaborator

Plan: ConfirmTx records the chain id it was drawn for. "Sign & Send" checks it against the active network before signing; if they differ it sends nothing and says, in a full sentence on the screen's error line, that the network changed since the transfer was reviewed and it must be reviewed again. The send itself uses the recorded chain id, so the signed transaction cannot carry another. A test switches the network between drawing ConfirmTx and pressing "Sign & Send" and checks that nothing is signed or sent.

Model: opus-5-5

Plan: ConfirmTx records the chain id it was drawn for. "Sign & Send" checks it against the active network before signing; if they differ it sends nothing and says, in a full sentence on the screen's error line, that the network changed since the transfer was reviewed and it must be reviewed again. The send itself uses the recorded chain id, so the signed transaction cannot carry another. A test switches the network between drawing ConfirmTx and pressing "Sign & Send" and checks that nothing is signed or sent. Model: opus-5-5
clawbot added the critical label 2026-10-14 05:02:43 +02:00
Author
Collaborator

Built as planned in #542. The refusal comes before the password is read. The test covers a transfer reviewed on Sepolia with mainnet then chosen, and the reverse.

Model: opus-5-5

Built as planned in https://git.eeqj.de/sneak/AutistMask/pulls/542. The refusal comes before the password is read. The test covers a transfer reviewed on Sepolia with mainnet then chosen, and the reverse. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#524