Add token rescue feature for recovering stuck USDC#2102
Merged
Conversation
Adds a /rescue-token screen that lets users move USDC accidentally sent to their Turnkey signer address (user.walletAddress) into their Safe (user.safeAddress) on Ethereum, signed via the existing passkey flow. Displays the stuck balance, destination Safe address, and the ETH gas required with an info tooltip explaining users can reach out to the Solid team if they can't cover gas. https://claude.ai/code/session_01U9boKN8kBrUytLY72BfSbB
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Adds a RESCUE_TOKEN transaction type (incoming wallet transfer) and wires useRescueToken through createActivity/updateActivity so the recovery shows up in the activity feed: PENDING when the user signs, PROCESSING once the tx hash is broadcast (with Etherscan link), then SUCCESS or FAILED based on the receipt. https://claude.ai/code/session_01U9boKN8kBrUytLY72BfSbB
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
This PR adds a new token rescue feature that allows users to recover USDC that was accidentally sent to their signer wallet on Ethereum instead of their Solid Safe wallet.
Key Changes
New rescue token page (
app/(protected)/rescue-token.tsx): A dedicated UI for the token recovery flow that displays:New rescue token hook (
hooks/useRescueToken.ts): Core logic for executing the rescue transaction that:Gas estimation: Intelligently estimates gas costs for the USDC transfer with:
Navigation and routing:
Notable Implementation Details
signTypedDataby routing through raw sign (consistent with existinguseUser.safeAApattern)https://claude.ai/code/session_01U9boKN8kBrUytLY72BfSbB