feat: rework L1 staking timing and blocking logic#662
Conversation
- Updated useETA hook to support step-specific fallback durations - Modified stakingEvents service to unblock withdrawals once synced to sequencer - Enhanced TransactionHistoryItemStatus and StatusItem to show granular ETAs - Updated WithdrawStatusDialog with dynamic step-based timing
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Updates the withdraw status dialog, per-step status items, and transaction history status to consume this shared timing logic (removing direct Written by Cursor Bugbot for commit d01591b. This will update automatically on new commits. Configure here. |
- Created getWithdrawStepTiming utility to deduplicate logic - Fixed dateExpectedToComplete bug (using it as endDate) - Fixed useETA stale state bug by resetting state on invalid inputs - Updated StatusItem, TransactionHistoryItemStatus, and WithdrawStatusDialog
Wrap approveNewNetwork and approveSwitchNetwork in try/catch to handle cases where MetaMask combines both prompts into a single popup. Add stabilization delays for CI reliability.
Remove verbose console.log calls from Metamask wallet helpers to reduce test noise and replace unused catch error vars with ignored (_) handlers. Update ecosystem domain assertion to allow subdomain redirects by matching the opened domain against an escaped href domain via a regex (e.g. o2.app -> trade.o2.app). These changes make tests quieter and more robust to network prompt absence and benign subdomain redirects.
Update the domain verification logic in the Ecosystem test to simplify the check for subdomain redirects. The new implementation directly compares the opened page domain with the href domain and allows for subdomain matches, enhancing test robustness.
…github.com/FuelLabs/fuel-explorer into feat/rework-l1-staking-timing-and-blocking
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| ? undefined | ||
| : 600, // ~10 mins for committing | ||
| }; | ||
| } |
There was a problem hiding this comment.
Fallback countdown for committing phase starts too early
Medium Severity
When dateExpectedToComplete is unavailable for WaitingCommittingToL1, the fallback timer uses sentDate (the original transaction-sent timestamp) as startDate with a 600-second duration. In useETA, dateFinish becomes sentDate + 10 minutes. Since the sync phase (~2 min) already elapsed before reaching this status, the user sees ~8 minutes remaining instead of the intended ~10 minutes. The startDate for the fallback case needs to reflect when the committing phase actually began, not when the transaction was originally sent.


Closes FE-1797
Implementation Summary
stakingEventsto unblock funds once they reach the "Synced to Sequencer" phase, allowing concurrent withdrawals or staking.dateExpectedToCompletebeing used as a start date instead of an end date.useMemoand useETA imports in WithdrawStatusDialog.Testing Checklist
1. Timing & ETA Display
2. Blocking Logic (Faster Unblocking)
3. Edge Cases
Skipped.