fix(baseAccount): wait for spend/revoke receipt before success - #1411
Open
SashaMIT wants to merge 1 commit into
Open
fix(baseAccount): wait for spend/revoke receipt before success#1411SashaMIT wants to merge 1 commit into
SashaMIT wants to merge 1 commit into
Conversation
Do not return success:true after sendTransaction alone. Wait for the receipt and require a mined success/complete status so agents do not retry a spend that later reverts (double-spend against remaining allowance). Same confirmation pattern as zeroX/sushi providers.
🟡 Heimdall Review Status
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agents were treating Base Account spend (and revoke) as done as soon as
sendTransactionreturned a hash. If that transaction later reverts, a framework retry can spend again against the remaining allowance.This waits for
waitForTransactionReceiptand only returnssuccess: truewhen the receipt status issuccessorcomplete, matching the confirmation pattern used by zeroX/sushi in this repo.Sibling of #1409 (CDP Permit2 / swap-submit retry) and #1410 (vaultsfyi network bind). Same dogfood pass, different provider and root. Does not reopen those PRs' findings.
Test plan
pnpm exec jest --testPathPattern='baseAccount/baseAccountActionProvider' --coverage=false(22/22)revertedreturnssuccess: falseand still surfaces the tx hashrevertedreturnssuccess: falsewaitForTransactionReceiptbefore successMade with Cursor