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 nonce undefined in certain state #5408

Merged
merged 10 commits into from
Oct 31, 2023
Merged

Fix nonce undefined in certain state #5408

merged 10 commits into from
Oct 31, 2023

Conversation

oskarleonard
Copy link
Contributor

@oskarleonard oskarleonard commented Oct 27, 2023

What was the problem?

This PR resolves #5411, #5412

How was it solved?

Use our regular auth hook to make sure we send correct nonce. Code is also much less and easier to follow. I think a possible extra network call is worth it to always guarantee that we send with a correct nonce.

How was it tested?

Prerequisite

If you have tested this feature before. Clean your redux first (since structure was wrong before)

  1. Go to src/modules/account/store/reducer.js
  2. Remove localNonce from whitelist
  3. Go back to running application and make a page refresh.
  4. Add localNonce back to whitelist

How to test

  1. Create a new multi sig account
  2. Try sending from that account right after successfully creating it
  3. Expected: Should work without reseting the nonce

…to always make sure we use the same query key and if no data we get correct nonce
@oskarleonard oskarleonard self-assigned this Oct 30, 2023
ikem-legend
ikem-legend previously approved these changes Oct 30, 2023
@ManuGowda ManuGowda requested a review from ikem-legend October 30, 2023 17:49
Copy link
Contributor

@ManuGowda ManuGowda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes LGTM.

Need to test it by clearing redux or open incog window.

@ikem-legend ikem-legend merged commit ab8dcdd into release/3.0.0 Oct 31, 2023
3 checks passed
@ikem-legend ikem-legend deleted the fix-nonce-bug branch October 31, 2023 09:14
@ManuGowda ManuGowda restored the fix-nonce-bug branch November 17, 2023 17:36
@ManuGowda ManuGowda deleted the fix-nonce-bug branch November 27, 2023 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants