harden: verify all approval fields and make failed signing retryable (closes #174)
All checks were successful
check / check (push) Successful in 33s

verifySignedTx compared only from, to, value and data, so a signed
transaction could differ from the approval in chain id, nonce, gas limit
or any fee field and still be broadcast. It now compares every
consequential field and refuses outright on any mismatch: the chain id
against the selected network (and against the approval when the page
fixed one), plus nonce, gas limit, gasPrice, maxFeePerGas and
maxPriorityFeePerGas wherever the approval carries a value, together
with the fee mechanism the approval implies. Fields the approval does
not carry are populated locally by the popup and have no approved value
to compare against, so they are held to absolute ceilings instead.

A failed signing attempt also left a button that could not succeed: the
background deleted the approval before it broadcast, so a retry found
nothing to sign. The approval is now retired only once the request has
an outcome, and the background tells the popup whether the failure is
retryable, so the button comes back for a failure the user can correct
and stays down with an explanation when the approval is spent.
This commit is contained in:
2026-08-11 12:24:39 +00:00
parent 19cb1ca1b0
commit 979bea2d0d
5 changed files with 647 additions and 79 deletions

View File

@@ -44,6 +44,11 @@ undefined identifiers, which is how
# Completed Steps
- 2026-08-11: Approval verification extended to every consequential field —
chain id against the selected network, nonce, gas limit, both EIP-1559 fees
and the legacy gas price — with a failed signing attempt made retryable
instead of leaving a dead button
([#174](https://git.eeqj.de/sneak/AutistMask/issues/174)).
- 2026-08-11: `docs/README.md` rewritten against the code: no competitor names,
all five network destinations documented, password/Settings/Add Wallet
sections corrected ([#163](https://git.eeqj.de/sneak/AutistMask/issues/163)).