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: Validation for spending limits #2277

Merged
merged 3 commits into from
Jul 12, 2023
Merged

Conversation

usame-algan
Copy link
Member

@usame-algan usame-algan commented Jul 12, 2023

What it solves

Part of #2067

How this PR fixes it

  • Pass in validation to TokenAmountInput and make the Max field optional
  • Remove amount validation for spending limits
  • Adjust spending limit replacement UI when values don't change
  • Update Remove Guard title text

Other changes

  • Resets the amount to an empty string instead of 0 when switching tokens

How to test it

  1. Open a Safe
  2. Overwrite an existing spending limit but don't change any values
  3. Observe no Max button visible
  4. It should be possible to type in a larger amount than is available for a given token
  5. Observe no strike-through values on screen
  6. Change the reset time
  7. Observe the old reset time is striked through and has its original value and not the relative time

Screenshots

Screenshot 2023-07-12 at 11 25 44 Screenshot 2023-07-12 at 11 26 10

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 09:26
@github-actions
Copy link

github-actions bot commented Jul 12, 2023

Branch preview

✅ Deploy successful!

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

@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 usame-algan merged commit cbb24e3 into epic-tx-flow Jul 12, 2023
@usame-algan usame-algan deleted the fix-spending-limit branch July 12, 2023 09:54
@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