Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: always keep the nonce of existing txs #2323

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Fix: always keep the nonce of existing txs #2323

merged 1 commit into from
Jul 28, 2023

Conversation

katspaugh
Copy link
Member

@katspaugh katspaugh commented Jul 28, 2023

What it solves

Solves a bug with delegated txs:

  • A delegate address creates a tx with nonce N
  • An actual owner address signs it
  • Instead of signing the tx N, it creates another tx with a nonce N + 1

How this PR fixes it

The tx confirmation flow will now always use the original transaction nonce and won't update it to the recommended nonce.

How to test it

  • Create an unsigned tx using MetaMask institutional or a delegate address.
  • Sign it with an owner key
  • Observe that it signed the original tx and not created a new tx

@katspaugh katspaugh added the bug label Jul 28, 2023
@github-actions
Copy link

github-actions bot commented Jul 28, 2023

Branch preview

✅ Deploy successful!

https://fix_nonce--walletweb.review-wallet-web.5afe.dev

@github-actions
Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@liliya-soroka
Copy link
Member

The fix for the unsigned txs is verified. The same nonce is suggested during signing as was used for the tx creation

@katspaugh katspaugh merged commit 4c46aab into dev Jul 28, 2023
@katspaugh katspaugh deleted the fix-nonce branch July 28, 2023 11:49
@github-actions github-actions bot locked and limited conversation to collaborators Jul 28, 2023
@liliya-soroka
Copy link
Member

Quick check was done for :

  1. reject tx
  2. replace tx
  3. create new tx ( send token, send NFT, safe apps tx)
  4. spending limit tx( module tx)
  5. recommended nonce option

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants