Skip to content

Pass wallet sendTransaction via Options for Phantom Lighthouse support#320

Merged
dankelleher merged 1 commit intomainfrom
develop
Mar 6, 2026
Merged

Pass wallet sendTransaction via Options for Phantom Lighthouse support#320
dankelleher merged 1 commit intomainfrom
develop

Conversation

@dankelleher
Copy link
Member

The previous approach used a runtime type guard on the Anchor wallet, which always returned false since AnchorWallet doesn't expose sendTransaction. Instead, accept sendTransaction as an explicit callback in the client Options and pass it from useWallet() in the React context.

This ensures single-signer transactions (including liquidUnstake with ALT) go through the wallet adapter's signAndSendTransaction path, allowing Phantom to simulate before signing.

The previous approach used a runtime type guard on the Anchor wallet,
which always returned false since AnchorWallet doesn't expose
sendTransaction. Instead, accept sendTransaction as an explicit callback
in the client Options and pass it from useWallet() in the React context.

This ensures single-signer transactions (including liquidUnstake with
ALT) go through the wallet adapter's signAndSendTransaction path,
allowing Phantom to simulate before signing.
@vercel
Copy link

vercel bot commented Mar 5, 2026

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

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Mar 5, 2026 11:01pm

Request Review

@dankelleher dankelleher merged commit 25383ac into main Mar 6, 2026
9 checks passed
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