Repository navigation
fix(dapp): let phantom's lighthouse guards through the cash-out deposit check - #158
Merged
Merged
Conversation
…it check #157 fixed the chain submit route only. The cash-out deposit has its own submit, which checked the signed bytes as they came from the wallet, so a Phantom user's swap-then-cash-out sent the swap and then refused the deposit: "calls a program a USDC deposit does not need". The deposit check now reads the same guard-free copy, and sends what the wallet signed. A test now fails on any check that reads raw signed Solana bytes, so a third route can't miss it.
✅ Deploy Preview for useintent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for useintentadapp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Depo-dev
self-requested a review
November 6, 2026 14:14
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.
What happened
After #157, a Phantom user's "swap SOL then cash out to NGN" sent the Raydium swap (step 1) and then refused the USDC deposit (step 2) with "This transaction calls a program a USDC deposit does not need."
#157 fixed the chain submit route only. The cash-out deposit has its own submit in
lib/weave/deposit/solana.ts. That submit checked the signed bytes exactly as they came back from the wallet, including the Lighthouse guards Phantom adds before signing.Those are the only two server routes that receive signed Solana bytes: the chain submit route and
app/api/cashout/orders/[id]/submit.Fix
The deposit check reads the same guard-free copy (
withoutWalletGuards). What gets sent is exactly what the wallet signed. Any other program added beside the guard is still refused.So a third route can't miss it
solana-signed-checks-guarded.test.tsscansapp/andlib/. It fails on any check that is handed raw signed Solana bytes (transaction: …signedTransaction) rather than the guard-free copy. Its pattern matches both the old chain route and the deposit code now onmain.Checks