fix(bridge): recover stuck approvals safely - #50
Conversation
Explain missing, queued and underpriced approvals without treating missing receipts as failed transactions. Block visible wallet queues before a new approval or deposit signature. Verify mined replacement hashes against the exact approval and fresh allowance. Prevent delayed polling from undoing confirmed recovery. No nonce overrides, automatic retries or contract changes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (11)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughThe bridge now diagnoses pending approvals, validates replacement evidence, blocks submissions when wallet queues are not clear, and exposes health-specific approval states in the UI and review scenarios. ChangesApproval safety flow
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete merge-blocking risk is established for the bridge approval recovery and queue-safety changes. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 38.89% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 10 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
@kevincodex1 Hey Kevin, this is the focused follow-up to the stuck Arc approval after #49. It adds a visible-wallet-queue check before approval/deposit signatures, clearer pending-transaction guidance, and verified recovery for a wallet speed-up's replacement hash. It also fixes a race where a slow status check could put an already-confirmed recovery back into pending. Exact approval limits and the separate bridge confirmation stay unchanged. 645 tests passed, the focused recheck is 49/49, and TypeScript, lint and the production build passed. No real transactions were sent for this verification. This improves detection/recovery; it does not automatically unblock the existing wallet queue or prove where the original nonce/fee came from. Could you review this and, once CI/review is green and you're happy with the recovery flow, merge it? Thanks! |
Debounce unsigned quotes without locking amount or route edits. Cancel stale requests and show verified fee-limit diagnostics. Keep both 5% limits and all wallet approvals/deposits explicit. Refs Twigpine#50
Why
Follow-up to #49 after an Arc USDC approval stayed on "Approval submitted" without a receipt. The original transaction used nonce 2 while the source RPC still reported confirmed nonce 0. That exposed gaps in queue detection, status explanations, and recovery after a wallet speed-up.
This does not establish where the original nonce/fee came from, and it does not repair an already-submitted wallet transaction automatically.
Changes
Verification
/ui-review-bridgeroute.No wallet transactions were signed, replaced, cancelled, or sent during verification. Real-wallet settlement of this recovery flow still needs a maintainer-controlled check. The nonce guard can only see the selected RPC node's queue, not every private or wallet-only pending transaction.
No contracts, approval limits, fee calculation, dependencies, or deployment configuration changed. Unrelated local lockfile and design metadata are excluded.
Summary by CodeRabbit
New Features
Documentation