-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable trigger shortcuts (#3957)
### Description This PR does 2 things (that made sense to test together) 1. add a saga for triggering a shortcut 2. add some redux state management to display available / claiming / claimed statuses on the rewards screen The logic for 2 is a little more hefty than I originally planned, i may have overthought the scenario. What i wanted to cater for is: 1. a user claims a reward successfully 2. their balance and positions are refreshed in the background while the user remains on the rewards screen 3. they should see that their reward was claimed, but the positions may refresh and the claimable parts removed. so the screen essentially tracks all the data it was loaded with, and if any rewards go "missing" from the redux store then we mark it as "claimed". 4. to make this a little robust for rewards that can be continuously claimed (i.e. on successful claim, the reward remains but the reward amount changes) i made up a reward id that relies on a combination of reward amount and reward address. ### Test plan https://github.com/valora-inc/wallet/assets/20150449/595bb6ae-26fc-426f-aede-12356929022f ### Related issues - Fixes RET-733 ### Backwards compatibility Y
- Loading branch information
1 parent
e62f8e8
commit 5ffffdf
Showing
16 changed files
with
559 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.