fix: Sign & Send refuses a transfer reviewed on another network (closes #524) #542

Merged
clawbot merged 1 commits from issue-524-confirm-network-switch into next 2026-10-14 15:31:52 +02:00
Collaborator

Fixes #524.

ConfirmTx now records the chain id of the network it is drawn for, on the pending transaction, in show(). "Sign & Send" compares it with the active network and, when they differ, sends nothing and says on the screen's errors line: "The active network changed after this transaction was reviewed, so it was not sent. Please go back and review it again." The send also carries that chain id, so ethers refuses to populate it for a provider on any other network.

What the diff does not show:

  • The pending transaction's chain id used to be set at the click, and the wait, success and error screens label the amount by it. It is now set when the screen is drawn, which is the same value whenever a send goes through.
  • Reopening the popup onto a saved ConfirmTx draws the screen again for whichever network is active then, so that path is labelled for, and sends on, the new network: the second outcome the issue's definition of done allows.
  • The refusal comes after the defective-wallet check and before the password is read, so no password is spent on it.

Disclosure: if the network were switched while the password is being decrypted, the refusal is ethers' own "transaction chainId mismatch" on the error screen, not a full sentence. Nothing is signed in that case either.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/AutistMask/issues/524. ConfirmTx now records the chain id of the network it is drawn for, on the pending transaction, in `show()`. "Sign & Send" compares it with the active network and, when they differ, sends nothing and says on the screen's errors line: "The active network changed after this transaction was reviewed, so it was not sent. Please go back and review it again." The send also carries that chain id, so ethers refuses to populate it for a provider on any other network. What the diff does not show: - The pending transaction's chain id used to be set at the click, and the wait, success and error screens label the amount by it. It is now set when the screen is drawn, which is the same value whenever a send goes through. - Reopening the popup onto a saved ConfirmTx draws the screen again for whichever network is active then, so that path is labelled for, and sends on, the new network: the second outcome the issue's definition of done allows. - The refusal comes after the defective-wallet check and before the password is read, so no password is spent on it. Disclosure: if the network were switched while the password is being decrypted, the refusal is ethers' own "transaction chainId mismatch" on the error screen, not a full sentence. Nothing is signed in that case either. Model: opus-5-5
clawbot added the needs-review label 2026-10-14 06:46:52 +02:00
clawbot self-assigned this 2026-10-14 06:46:52 +02:00
clawbot added 1 commit 2026-10-14 09:28:03 +02:00
fix: Sign & Send refuses a transfer reviewed on another network (closes #524)
check / check (push) Successful in 6m46s
e2e / e2e-chrome (push) Successful in 6m42s
e2e / e2e-firefox (push) Successful in 3m16s
447eb2e70c
Settings is reachable from the confirmation screen, and Back from it only
unhides the screen as it was drawn. Sign & Send took the network at the
click, so a transfer reviewed on Sepolia went out on mainnet after a switch
in between. show() now records the chain id of the network it draws for.
Sign & Send refuses with a message on the screen when the active network
differs, and the send carries that chain id, so ethers will not populate it
for a provider on any other network.

Model: opus-5-5
clawbot force-pushed issue-524-confirm-network-switch from 06657e6136 to 447eb2e70c 2026-10-14 09:28:03 +02:00 Compare
Author
Collaborator

PASS: "Sign & Send" now refuses, with a full sentence on the screen and nothing signed or broadcast, a transfer whose confirmation screen was drawn for a network other than the active one, and the transaction it signs carries the chain id of the network that screen was drawn for.

Judgement call: a popup reopened onto a saved confirmation screen after the network was switched in a second popup draws it again for the new network but still shows and checks the balance read before the switch; I took that as the redraw the definition of done allows, and it predates this change.

Model: opus-5-5

PASS: "Sign & Send" now refuses, with a full sentence on the screen and nothing signed or broadcast, a transfer whose confirmation screen was drawn for a network other than the active one, and the transaction it signs carries the chain id of the network that screen was drawn for. Judgement call: a popup reopened onto a saved confirmation screen after the network was switched in a second popup draws it again for the new network but still shows and checks the balance read before the switch; I took that as the redraw the definition of done allows, and it predates this change. Model: opus-5-5
clawbot merged commit dfc3a35fe3 into next 2026-10-14 15:31:52 +02:00
clawbot deleted branch issue-524-confirm-network-switch 2026-10-14 15:31:52 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#542