Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Cannot use getPositionDetailV3 #1

Open
toanbku opened this issue May 30, 2024 · 0 comments
Open

Cannot use getPositionDetailV3 #1

toanbku opened this issue May 30, 2024 · 0 comments

Comments

@toanbku
Copy link

toanbku commented May 30, 2024

Version: 0.0.16


Hi team,

Following the documentation, I tried to import getPositionDetailV3 like this:

import { getPositionDetailV3 } from '@flowx-pkg/ts-sdk';

However, I encountered the following error:

Module '"@flowx-pkg/ts-sdk"' has no exported member 'getPositionDetailV3'.ts(2305)

To work around this, I used:

import * as allGetPositionDetailV3 from "@flowx-pkg/ts-sdk/src/liquidity/v3/getPositionDetailV3.js";

...
await allGetPositionDetailV3.default.getPositionDetailV3(positionObjectId);

But then I received another error:

TypeError: Cannot set properties of undefined (setting 'cache')
    at client (/Users/toanho/Personal/flowx/node_modules/@flowx-pkg/ts-sdk/src/constants.ts:2:2692)
    at getTickClmm (/Users/toanho/Personal/flowx/node_modules/@flowx-pkg/ts-sdk/src/liquidity/v3/queries/getTickClmm.ts:12:89)
    at getDataTicks (/Users/toanho/Personal/flowx/node_modules/@flowx-pkg/ts-sdk/src/liquidity/v3/getPositionDetailV3.ts:2:1949)
    at Object.getPositionDetailV3 (/Users/toanho/Personal/flowx/node_modules/@flowx-pkg/ts-sdk/src/liquidity/v3/getPositionDetailV3.ts:2:8875)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SuiPositionManager.getPositionById (file:///Users/toanho/Personal/flowx/src/bot/services/sui/position-manager.ts:1:2856)
    at async main (file:///Users/toanho/Personal/flowx/src/bot/services/sui/position-manager.test.ts:1:1010)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant