Skip to content

Fix executed proposals when Safe tx fails#320

Merged
benjaminshafii merged 2 commits into
mainfrom
fix/savings-proposal-safe-execution
Jan 14, 2026
Merged

Fix executed proposals when Safe tx fails#320
benjaminshafii merged 2 commits into
mainfrom
fix/savings-proposal-safe-execution

Conversation

@benjaminshafii

Copy link
Copy Markdown
Member

Summary

  • Prevents savings/transfer proposals from being marked "executed" when the underlying Safe execution fails (e.g. Safe emits ExecutionFailure even though the AA EntryPoint bundle is "success").
  • Verifies execution by fetching the mined receipt and checking for Safe ExecutionSuccess / ExecutionFailure logs (and receipt status).
  • Adds a backfill script to re-check historical status=executed proposals and reclassify failures.

What Changed

  • packages/web/src/server/routers/action-proposals-router.ts: markExecuted now validates Safe execution before updating status; supports AA flows by resolving userOpHash -> txHash via EntryPoint UserOperationEvent (Base).
  • packages/web/src/app/(authenticated)/dashboard/(bank)/components/dashboard/unified-activity.tsx: retries markExecuted while verification is pending/unverified and surfaces failures.
  • packages/web/scripts/backfill-action-proposals-executed.ts: script to re-verify and reclassify previously executed proposals.

How To Test

  • UI: execute a savings deposit/withdraw proposal and confirm it only becomes "executed" after Safe ExecutionSuccess.
  • Script (dry-run):
    • pnpm --filter @zero-finance/web tsx scripts/backfill-action-proposals-executed.ts --dry-run --limit 500
    • Optional scope: --workspace-id <uuid>

Notes

  • Tests run: pnpm --filter @zero-finance/web test -- --run

Validate Safe receipts (ExecutionSuccess/ExecutionFailure) before marking action proposals executed, persist tx hashes on failures, and add a backfill script.
@vercel

vercel Bot commented Jan 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
we-love-your-startup Ready Ready Preview, Comment Jan 14, 2026 1:28am
zerofinance Ready Ready Preview, Comment Jan 14, 2026 1:28am

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant