Never present a post-broadcast error as a failed send - #6138
Conversation
📸🪓 Test evidence (iOS sim, Bitcoin testnet, real broadcasts)
🪓 HACK-FORCED: after fix warning 🪓 HACK-FORCED: after fix forward nav 🪓 HACK-FORCED: before fix error card 🪓 HACK-FORCED: before fix slider rearmed Captured by the agent's in-app test run (build-and-test). |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ab91beb. Configure here.
Anything thrown after coreWallet.broadcastTx returns used to fall into the send scene's failure handling: an error card blaming the network and a re-armed slider. But the funds have already moved at that point, so each retry re-quotes on the remaining UTXOs and pays again; one intended send became five real payments this way (engine saveTx threw on a disconnected wallet after every broadcast succeeded). Split the submit flow at the broadcast boundary: a post-broadcast error is logged, surfaced as a warning that the transaction was sent, and navigates forward exactly like a success. The slider only re-arms when nothing was broadcast.
3e4eb52 to
cfb630e
Compare
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
72da86b to
67bde85
Compare
Design doc for the two-repo fix (SendScene2 broadcast-boundary split here, saveTx and broadcast-ambiguity fixes in edge-currency-plugins#455), with the task's pre-made decisions validated against their alternatives.
67bde85 to
6c93532
Compare





CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Description
Technical design doc
GUI half of Edge bug "Send - multiple transactions after network error": one intended Bitcoin send became five real payments. Every broadcast succeeded; the engine's saveTx then threw, and the send scene treated that throw as a failed send: error card blaming the network plus a re-armed slider. Each retry re-quoted on the remaining UTXOs (saveTx marks inputs spent before it throws), so each slide was a fresh real payment. Three distinct payments happened inside 44 seconds in the incident log.
Asana: https://app.asana.com/1/9976422036640/project/1213843652804305/task/1217135300337949
The submit flow in
SendScene2.handleSliderCompleteis now split at the broadcast boundary:broadcastedTxis hoisted above the try block; once it is set, the funds have moved.logActivity), surfaced as a warning that the transaction WAS sent ("sent, but some final bookkeeping did not complete"), and navigates forward exactly like a success (onDone / transaction details).broadcastTxreturns) keeps the existing error card and retry behavior.handleSliderCompletereturns the broadcast transaction so the FIO no-bundled retry (which recursively awaits it) propagates a nested broadcast to the outer invocation; without that, the outer finally could re-arm the slider after the nested attempt broadcast (caught by Bugbot in review).Verified on the iOS sim against Bitcoin testnet with a real broadcast and an injected post-broadcast throw, before and after the fix (screenshots below). The engine half (saveTx resolving on a not-running engine, broadcast-failure classification with BroadcastAmbiguityError) is EdgeApp/edge-currency-plugins#455; this scene does not consume the ambiguity classification yet (the lock-on-ambiguous-failure UX is tracked separately).
Note
High Risk
Changes core send confirmation behavior and slider retry logic in the payment path; incorrect boundary handling could still mislead users or allow duplicate sends.
Overview
Send now treats a successful broadcast as final even when later steps (metadata, FIO record, navigation hooks) throw. That closes the path where one intended send could become several real payments after engine bookkeeping failed but the tx was already on the network.
SendScene2.handleSliderCompletehoistsbroadcastedTxabove the try block and uses it as the broadcast boundary. AfterbroadcastTxsucceeds, any catch path logs the error, shows a warning (transaction_success_bookkeeping_error_message) instead of a failure card, and navigates forward via sharednavigateForwardAsSent—same as a clean success. Thefinallyblock only re-arms the confirm slider when nothing was broadcast; pre-broadcast failures still show errors and allow retry.The handler now returns the broadcasted transaction so the FIO no-bundled retry can assign a nested successful broadcast to the outer invocation and avoid re-arming the slider.
SafeSlideruses ahandleSlideConfirmwrapper because the slider API expects a void callback.Adds English strings and a CHANGELOG entry; includes design doc
send-post-broadcast-failure.md(pairs with engine work in edge-currency-plugins).Reviewed by Cursor Bugbot for commit 6c93532. Bugbot is set up for automated code reviews on this repo. Configure here.