Harden unstake pending settlement and staking UI refresh - #1469
Conversation
|
close for now. Can rebase and use this branch when we want to pick up the issue again. |
Keep unstake settlement independent of the staking modal, show pending confirmation instead of premature success, and treat receipt timeouts as unresolved rather than silent terminal outcomes. Co-authored-by: Cursor <cursoragent@cursor.com>
Eliminate the unstake.settlement.js file and its associated functions, streamlining the ValidatorStakingModal by directly handling pending transactions and UI updates. Adjusted the modal's state management to improve clarity and responsiveness during stake and unstake operations. This change enhances the user experience by simplifying the codebase and ensuring consistent handling of transaction states.
3ef64be to
63e12bb
Compare
Simplify the display logic for pending transactions by consolidating the text assignment for stake and unstake operations. Update comments for clarity regarding the refresh of pending transactions. This change enhances code readability and maintains consistent user feedback during transaction processing.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1184880a53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Reintroduce the logic to refresh pending transactions and update the UI after fetching validator details. This change ensures that the latest pending transactions are accurately reflected in the user interface, enhancing the responsiveness and clarity of the staking modal. The previous redundant code in the finally block has been removed for cleaner execution flow.
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Update the ValidatorStakingModal to improve the display of pending transaction statuses. Change comments for clarity and modify the text content for stake and unstake confirmations. Introduce a new CSS class for pending status elements, ensuring a more user-friendly experience during transaction processing. This refactor streamlines the UI and enhances responsiveness.
What Changed
This PR makes
withdraw_stakesettlement reliable across modal navigation and every receipt outcome while clearly separating pending-operation status from confirmed staking data.ValidatorStakingModalderives pending UI and action state frommyData.pending, revalidates controls after the submission cooldown, and blocks duplicate stake or unstake actions while confirmation is pending.Fixed Flow
Why
Previously, accepted injection immediately closed and reopened the staking modal, which blurred submission versus confirmation and coupled settlement feedback to modal navigation. The pending indicator also lived inside Your Stake Info and could force the details container visible after a load error. Using global pending state as the source of truth and a separate top-level status banner keeps operation status, confirmed staking data, navigation, and error rendering independent.
Validation
node --check app.jsgit diff --checkCloses #1466