-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: add PooledStaking slice for managing staking state #12363
Conversation
This commit adds a new file, PooledStaking.ts, which contains the implementation of the PooledStaking slice. The slice manages the staking state related to pooled stakes, exchange rates, vault data, eligibility, loading status, and errors. It also includes actions and selectors for setting and retrieving the staking data.
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Bitrise✅✅✅ Commit hash: c910e77 Note
|
Quality Gate passedIssues Measures |
Bitrise✅✅✅ Commit hash: 98523ba Note
|
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.
Left some question for my own learning but otherwise looks good! 💯
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.
LGTM!
Description
This PR refactors the staking-related state management by introducing a staking redux slice. This change improves state management consistency, reduces duplicate state, and makes the data flow more predictable across the staking feature.
PooledStaking
slice to manage staking-related stateusePooledStakes
useStakingEligibility
useVaultData
useStakingEarnings
hasStakedPositions
fromusePooledStakes
touseStakingEarnings
to avoid prop drillingRelated issues
Fixes: STAKE-870
Manual testing steps
Screenshots/Recordings
Before
Staking_without_redux.mp4
After
Staking_using_redux.mp4
Pre-merge author checklist
Pre-merge reviewer checklist