streamflow-finance / js-sdk

Web3 Distribution Layer. For Token vesting and Airdrops
https://app.streamflow.finance
GNU General Public License v3.0
106 stars 30 forks source link

Withdraw issue with spl-token@0.2.0 library installed #42

Closed iuliansafta closed 1 month ago

iuliansafta commented 2 years ago

Hello,

I have an issue when I'm trying to withdraw the funds using the JS SDK. I guess there is a conflict with the new version of spl-token@0.2.0 that I have installed.

The error:

Withdraw error TypeError: Cannot read properties of undefined (reading 'getAssociatedTokenAddress')
    at eval (sdk.js?e986:495:1)
    at step (sdk.js?e986:44:1)
    at Object.eval [as next] (sdk.js?e986:25:46)
    at eval (sdk.js?e986:19:1)
    at new Promise (<anonymous>)
    at __awaiter (sdk.js?e986:15:1)
    at ata (sdk.js?e986:492:1)
    at Function.eval (sdk.js?e986:206:1)
    at step (sdk.js?e986:44:1)
    at Object.eval [as next] (sdk.js?e986:25:46)
    at fulfilled (sdk.js?e986:16:43)

package.json

    "@project-serum/anchor": "^0.22.0",
    "@solana/spl-token": "^0.2.0",
    "@solana/wallet-adapter-base": "^0.9.3",
    "@solana/wallet-adapter-react": "^0.15.3",
    "@solana/wallet-adapter-react-ui": "^0.9.5",
    "@solana/wallet-adapter-wallets": "^0.15.4",
    "@solana/web3.js": "^1.35.1",
    "@streamflow/stream": "^2.2.1"

using an older version (0.1.8) is working fine.

Thank you!

nemanjab17 commented 2 years ago

Hey @iuliansafta we'll make sure we update the dependencies as soon as we get the chanse. Is using 0.2.x a hard requirement for you?

iuliansafta commented 2 years ago

Hi @nemanjab17, not for the moment. Thanks!