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: Update to new recommended nonce endpoint #2737

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Conversation

usame-algan
Copy link
Member

@usame-algan usame-algan commented Nov 2, 2023

What it solves

Use the new recommended nonce endpoint on the CGW

How this PR fixes it

  • The recommended nonce request on tx creation uses the new /nonces endpoint

How to test it

  1. Open a Safe
  2. Switch to staging CGW
  3. Create a new transaction
  4. Observe the recommended nonce is loading and correct

CGW ticket - safe-global/safe-client-gateway#681

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

Copy link

github-actions bot commented Nov 2, 2023

Branch preview

✅ Deploy successful!

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

Copy link

github-actions bot commented Nov 2, 2023

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

Copy link

github-actions bot commented Nov 2, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
75.19% (+0.01% 🔼)
9461/12583
🔴 Branches
49.5% (+0.03% 🔼)
1935/3909
🔴 Functions 57.92% 1423/2457
🟡 Lines
76.87% (+0.01% 🔼)
8566/11144
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / recommendedNonce.ts
31.58% (-0.24% 🔻)
0% 0%
37.5% (+0.66% 🔼)

Test suite run success

1046 tests passing in 143 suites.

Report generated by 🧪jest coverage report action from dd1c65d

@francovenica
Copy link
Contributor

So the ticket is labeled as "in progress" but since is in ready for QA I still checked it.

I tried in a sepolia safe play with the nonces.

Create tx
Create rejections
Check the recomended nonce when creating a tx
Checking that out of order tx cannot be executed and the safe indicates what nonce needs to be executed first
Check the order in the queue tab
Tx executed in bulk
Batched Tx
The recomended nonce in the settings

Looks good.

I'll keep the ticket here until the Work in progress tag is removed. If anything changes let me know and I'll re check

@usame-algan usame-algan marked this pull request as ready for review November 8, 2023 11:48
@usame-algan usame-algan requested a review from katspaugh November 8, 2023 11:48
@usame-algan
Copy link
Member Author

We can merge it as soon as its ready on prod CGW

@francovenica
Copy link
Contributor

Did a quick check again, same cases in safes 1.1.1.
Looks good as well

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Why so many changes? The only necessary one was fetchRecommendedParams -> getNonces on one single line.

@katspaugh katspaugh merged commit ac480ec into dev Nov 20, 2023
8 of 9 checks passed
@katspaugh katspaugh deleted the rec-nonce-change branch November 20, 2023 10:57
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants