Skip to content

fix(baseAccount): wait for spend/revoke receipt before success - #1411

Open
SashaMIT wants to merge 1 commit into
coinbase:mainfrom
SashaMIT:fix/base-account-spend-wait-receipt
Open

fix(baseAccount): wait for spend/revoke receipt before success#1411
SashaMIT wants to merge 1 commit into
coinbase:mainfrom
SashaMIT:fix/base-account-spend-wait-receipt

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 8, 2026

Copy link
Copy Markdown

Agents were treating Base Account spend (and revoke) as done as soon as sendTransaction returned a hash. If that transaction later reverts, a framework retry can spend again against the remaining allowance.

This waits for waitForTransactionReceipt and only returns success: true when the receipt status is success or complete, 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)
  • Regression: spend receipt reverted returns success: false and still surfaces the tx hash
  • Regression: revoke receipt reverted returns success: false
  • Happy paths call waitForTransactionReceipt before success

Made with Cursor

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.
@SashaMIT
SashaMIT requested a review from murrlincoln as a code owner August 8, 2026 02:41
@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants