-
Notifications
You must be signed in to change notification settings - Fork 96
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
refactor(earn): check allow X chain swaps gate when showing deposit options #6389
Conversation
… chain swap options
792724d
to
12fd317
Compare
expect(getByTestId('Earn/ActionCard/Add')).toBeTruthy() | ||
expect(getByTestId('Earn/ActionCard/Transfer')).toBeTruthy() | ||
}) | ||
it.each` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are a LOT, but much more thorough. This is based on the table here (the table is out of date, beefy pool doesn't support Buy, which is replaced with Transfer).
This should get simpler with cross chain swap and deposit as the number of variants reduce significantly as we don't need to differentiate between having tokens on same chain or different chain.
expect(getByTestId('Earn/ActionCard/Deposit')).toBeTruthy() | ||
expect(getByTestId('Earn/ActionCard/AddMore')).toBeTruthy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these tests were only asserting for presence, which means if the code returns all actions for all variations, all tests will pass 😅
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6389 +/- ##
==========================================
+ Coverage 89.04% 89.05% +0.01%
==========================================
Files 735 735
Lines 31345 31350 +5
Branches 5818 5823 +5
==========================================
+ Hits 27910 27918 +8
- Misses 3241 3386 +145
+ Partials 194 46 -148
... and 67 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…ptions (#6389) ### Description Currently, cross chain swaps show up even if the cross chain swaps gate is off. This updates the before deposit bottom sheet to check for the gate before showing the cross chain swap option. Also simplified the booleans a bit to make it more readable and added more thorough tests ### Test plan Unit tests ### Related issues - Part of ACT-1507 ### Backwards compatibility Yes ### Network scalability N/A
Description
Currently, cross chain swaps show up even if the cross chain swaps gate is off. This updates the before deposit bottom sheet to check for the gate before showing the cross chain swap option. Also simplified the booleans a bit to make it more readable and added more thorough tests
Test plan
Unit tests
Related issues
Backwards compatibility
Yes
Network scalability
N/A