Skip to content

fix(add-funds): mark reverted on-chain transfers as FAILED#2056

Merged
MusabShakeel576 merged 1 commit into
masterfrom
claude/wallet-pending-activity-VfZbm-master
May 7, 2026
Merged

fix(add-funds): mark reverted on-chain transfers as FAILED#2056
MusabShakeel576 merged 1 commit into
masterfrom
claude/wallet-pending-activity-VfZbm-master

Conversation

@MusabShakeel576
Copy link
Copy Markdown
Contributor

Summary

Cherry-pick of #2055 from qa to master for the connect-wallet "Add funds" activity fix.

useTransferToWallet's background receipt watcher fed the resolved waitForTransactionReceipt promise straight to TransactionStatus.SUCCESS, but viem resolves with the receipt regardless of execution outcome — a reverted on-chain tx returns receipt.status === 'reverted' rather than throwing. Connect-wallet add-funds activities therefore flipped to SUCCESS even when the user's transfer reverted on-chain, masking the failure in the activity list / detail page.

This change inspects receipt.status before promoting to SUCCESS; reverted receipts go through the same FAILED + error-metadata path the .catch() branch already uses, matching the contract pattern used in useTransactionReceiptPolling and other deposit hooks.

Test plan

  • On the home page, click Add funds, connect external wallet (MetaMask), pick a token + amount, submit
  • Verify activity appears as PENDING immediately, then PROCESSING once the tx hash is returned
  • Verify activity transitions to SUCCESS once the tx is mined and confirmed on-chain
  • Force a revert (e.g., insufficient gas / bad data) and verify the activity transitions to FAILED rather than SUCCESS
  • Confirm activity persistence by reloading the app — activity should still resolve to its final state via the backend cron / receipt-polling hook

Pairs with backend PR adding the FUND activity type to master.

https://claude.ai/code/session_01RxjZ6dUk9zmVbuPEXcvqaX


Generated by Claude Code

useTransferToWallet's background receipt watcher fed the resolved
waitForTransactionReceipt promise straight to TransactionStatus.SUCCESS,
but viem resolves with the receipt regardless of execution outcome — a
reverted on-chain tx returns receipt.status === 'reverted' rather than
throwing.  Connect-wallet add-funds activities therefore flipped to
SUCCESS even when the user's transfer reverted on-chain, masking the
failure in the activity list / detail page.

Inspect receipt.status before promoting to SUCCESS; reverted receipts
go through the same FAILED + error-metadata path the .catch() branch
already uses, matching the contract pattern used in
useTransactionReceiptPolling and other deposit hooks.

https://claude.ai/code/session_01RxjZ6dUk9zmVbuPEXcvqaX
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
solid-app Ignored Ignored May 7, 2026 0:20am
solid-app-staging Ignored Ignored May 7, 2026 0:20am

Request Review

@MusabShakeel576 MusabShakeel576 merged commit ee368da into master May 7, 2026
4 of 5 checks passed
@MusabShakeel576 MusabShakeel576 deleted the claude/wallet-pending-activity-VfZbm-master branch May 7, 2026 12:51
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.

2 participants