fix(speed-up): derive live action for RBF speed up modal#12400
Conversation
ActionCenter stored the speed-up target as a frozen snapshot of the action object captured at click time, then SpeedUpModal mixed it with a live actionsById lookup. If those diverge, the replacement transaction can inherit stale/undefined metadata (e.g. amountCryptoPrecision, btcUtxoRbfTxMetadata). Store only the action id and derive the action live from the store so every field passed to the modal is current. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesSpeed Up Modal State Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
ActionCenterstored the speed-up target as a frozen snapshot of the action object captured when the "Speed Up" button was clicked, whileSpeedUpModalseparately reads the live store viaactionsById[txHash](for marking the replaced action). When those two sources diverge, the replacement transaction is created from the stale snapshot and can inherit stale/undefinedmetadata — e.g.amountCryptoPrecision(surfacing as an un-interpolatedSending %{amount} BTCnotification) andbtcUtxoRbfTxMetadata(the BTC RBF input address paths).This changes
ActionCenterto store only the action id and derive the action live from the store, so every field passed toSpeedUpModal(amountCryptoPrecision,btcUtxoRbfTxMetadata,accountIdsToRefetch,txHash,accountId) reflects current state at confirm time. A null guard is kept so a cleared action while the modal id is set can't throw.Follow-up from #12381.
Issue (if applicable)
closes #
Risk
Low. UI/state-management change scoped to the Action Center speed-up entry point. No new or modified on-chain transaction construction — the data passed to
SpeedUpModalis sourced live from existing redux state instead of a captured object reference. No protocol/signing logic changed.BTC RBF "Speed Up" flow only (native/Ledger). No signing path changes.
Testing
Engineering
%{amount}).Operations
Not flagged, but user-facing impact is limited to the BTC Speed Up notification/card showing the correct amount. To functionally check: perform a BTC send + Speed Up and confirm the new transaction notification renders the send amount.
Screenshots (if applicable)
N/A
Summary by CodeRabbit