Skip to content

Error in moveLockedLP function, typescript client #212

@myx0m0p

Description

@myx0m0p

Hello!

I wanna use function to transfer locked LP escrow to another account, using moveLockedLP function of typescript client.

It failed with error:

error TokenOwnerOffCurveError
    at getAssociatedTokenAddressSync (cli/node_modules/.pnpm/@solana+spl-token@0.4.13_@solana+web3.js@1.98.0_bufferutil@4.0.9_utf-8-validate@5.0.10__9cddd5031c4582abd8f4d7b847a3b439/node_modules/@solana/spl-token/src/state/mint.ts:197:78)
    at AmmImpl.moveLockedLP (cli/node_modules/.pnpm/@meteora-ag+dynamic-amm-sdk@1.3.2_@solana+buffer-layout@4.0.1_bufferutil@4.0.9_fastests_eecbd3d87a9e31ac38e29553e4b4e265/node_modules/@meteora-ag/dynamic-amm-sdk/src/amm/index.ts:2834:58)

I pretty sure it can be fixed easily, by allowing offcurve token accounts, as ownerLockEscrowPK is clearly belongs to the vault program:

https://github.com/MeteoraAg/dynamic-amm-sdk/blob/4303102d7e2f3172934e74eca94fbff30ba01512/ts-client/src/amm/index.ts#L2812-L2836

I can create a PR to address this issue.

Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions