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

chore: migrate nonce state #5395

Merged
merged 7 commits into from Feb 9, 2024
Merged

chore: migrate nonce state #5395

merged 7 commits into from Feb 9, 2024

Conversation

skylarbarrera
Copy link
Contributor

What changed (plus any additional context for devs)

migrating nonce management to zustand in prep for txs migration

implementation matches bx

Screen recordings / screenshots

What to test

@@ -50,7 +46,7 @@ export default function useLoadGlobalLateData() {
// tx method names
const p7 = dispatch(transactionSignaturesLoadState());

promises.push(p1, p2, p3, p4, p5, p6, p7);
promises.push(p2, p3, p4, p5, p6, p7);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

can rename these but meh, we should slowly try to remove all of these

Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick but can you rename these to p1, p2, p3, p4, p5, p6

if (addressFrom && nonce) {
// @ts-ignore-next-line
dispatch(incrementNonce(addressFrom!, nonce, network));
if (!isNil(addressFrom) && nonce) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ts check

@@ -650,7 +648,7 @@ export const SignTransactionSheet = () => {
const sendInsteadOfSign = transactionDetails.payload.method === SEND_TRANSACTION;
const txPayload = req;
let { gas, gasLimit: gasLimitFromPayload } = txPayload;

if (!currentNetwork) return;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ts things

Copy link
Contributor

@dereknelson dereknelson left a comment

Choose a reason for hiding this comment

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

seems legit. run it

@skylarbarrera skylarbarrera merged commit 2622bbc into develop Feb 9, 2024
5 of 6 checks passed
@skylarbarrera skylarbarrera deleted the @skylar/nonces branch February 9, 2024 20:49
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.

None yet

3 participants