Skip to content

fix(solana): recover completed swaps from the closed user-lock path - #187

Open
yasha-meursault wants to merge 2 commits into
devfrom
dev-recover-solana-complete-swap
Open

fix(solana): recover completed swaps from the closed user-lock path#187
yasha-meursault wants to merge 2 commits into
devfrom
dev-recover-solana-complete-swap

Conversation

@yasha-meursault

Copy link
Copy Markdown
Contributor

Anchor closes the user-lock PDA on redeem/refund, so recoverClosedUserLock returned only a status with amount 0 and empty sender/recipient/token — no dst* fields — and useRecoverSwap threw "Destination network not found" for every completed or refunded Solana swap. The lock tx still carries the full UserLocked event, and findUserDataFromLogs already parses it, so return the lock terms from that same pass and spread them in. Status and timestamp still come from the closing tx.

Anchor closes the user-lock PDA on redeem/refund, so recoverClosedUserLock
returned only a status with amount 0 and empty sender/recipient/token — no
dst* fields — and useRecoverSwap threw "Destination network not found" for
every completed or refunded Solana swap. The lock tx still carries the full
UserLocked event, and findUserDataFromLogs already parses it, so return the
lock terms from that same pass and spread them in. Status and timestamp
still come from the closing tx.
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
trainapp Ready Ready Preview Aug 6, 2026 12:49pm

Request Review

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