fix(add-funds): mark reverted on-chain transfers as FAILED#2056
Merged
MusabShakeel576 merged 1 commit intoMay 7, 2026
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
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.
Summary
Cherry-pick of #2055 from
qatomasterfor the connect-wallet "Add funds" activity fix.useTransferToWallet's background receipt watcher fed the resolvedwaitForTransactionReceiptpromise straight toTransactionStatus.SUCCESS, but viem resolves with the receipt regardless of execution outcome — a reverted on-chain tx returnsreceipt.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.statusbefore promoting to SUCCESS; reverted receipts go through the same FAILED + error-metadata path the.catch()branch already uses, matching the contract pattern used inuseTransactionReceiptPollingand other deposit hooks.Test plan
Pairs with backend PR adding the
FUNDactivity type tomaster.https://claude.ai/code/session_01RxjZ6dUk9zmVbuPEXcvqaX
Generated by Claude Code