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: Hide nonce for spending limit txs #2278

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Conversation

usame-algan
Copy link
Member

What it solves

Part of #2067

How this PR fixes it

  • Adds an additional field nonceNeeded to the SafeTxContext so the nonce can be hidden from inside flow components
  • Closes the flow when submitting a spending limit tx

How to test it

  1. Open a Safe with a spending limit
  2. Create a new transaction
  3. Switch between spending limit and normal transaction
  4. Observe the nonce field is disappearing
  5. Observe the status widget is changing text
  6. Submit the transaction
  7. Observe the modal is closing

Screenshots

Screenshot 2023-07-12 at 12 24 10 Screenshot 2023-07-12 at 12 24 18

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) 🧑‍💻

@usame-algan usame-algan requested a review from iamacook July 12, 2023 10:26
@github-actions
Copy link

github-actions bot commented Jul 12, 2023

Branch preview

✅ Deploy successful!

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

@usame-algan usame-algan force-pushed the spending-limit-nonce branch from e15440c to dfee18f Compare July 12, 2023 10:26
@github-actions
Copy link

github-actions bot commented Jul 12, 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

@usame-algan
Copy link
Member Author

Imo its not ideal that we need another flag nonceNeeded in the SafeTxContext now. Ideally we should decide for a given flow if a nonce is needed or not. This is an edge case because we essentially have 2 flows combined (normal transactions and spending limit transactions). Lets revisit the discussion around splitting up the flows for the next iteration cc @katspaugh

…Tx.tsx

Co-authored-by: Aaron Cook <aaron@safe.global>
@usame-algan usame-algan merged commit 5ceda2e into epic-tx-flow Jul 12, 2023
@usame-algan usame-algan deleted the spending-limit-nonce branch July 12, 2023 12:45
@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2023
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