Closed sponge-babe closed 1 month ago
After about a constant 9 hours painful struggle of trying different versions, finally i ended up with the correct versions of a lot of packages so this worked for me:
"@orca-so/whirlpools-sdk": "0.12.5", "@coral-xyz/anchor": "0.27.0", "@orca-so/common-sdk": "^0.5.3", "@solana/spl-token": "0.3.8", "@solana/web3.js": "1.88.0", "decimal.js": "10.3.1"
please have some shame and fix this issue, this is embarrassing for you as a top solana dex, such pathetic maintenance of library with no support. stop wasting devs time!
0.13.x resolves some dependency issues.
i have installed the latest sdk version along
decimal.js
and@solana/web3.js
packages but the moment i try to initialize the WhirlpoolContext i get a weird runtime error i am usingreact js
with node version18.17.1
my implementation : `
const { connection } = useConnection(); const anchrWallet = useAnchorWallet();
useEffect(() => { if (connection && anchrWallet) { const ctx = WhirlpoolContext.from( connection, anchrWallet, WHIRLPOOL_PROGRAM_ID ); } }, [anchrWallet, connection]); `
runtime error:
(0 , codecs_1.getBytesCodec) is not a function TypeError: (0 , codecs_1.getBytesCodec) is not a function at ./node_modules/@solana/spl-token-group/lib/cjs/state/tokenGroup.js (http://localhost:3000/static/js/bundle.js:138583:102) at options.factory (http://localhost:3000/static/js/bundle.js:176739:31) at __webpack_require__ (http://localhost:3000/static/js/bundle.js:176138:32) at fn (http://localhost:3000/static/js/bundle.js:176397:21) at ./node_modules/@solana/spl-token-group/lib/cjs/state/index.js (http://localhost:3000/static/js/bundle.js:138562:14) at options.factory (http://localhost:3000/static/js/bundle.js:176739:31) at __webpack_require__ (http://localhost:3000/static/js/bundle.js:176138:32) at fn (http://localhost:3000/static/js/bundle.js:176397:21) at ./node_modules/@solana/spl-token-group/lib/cjs/index.js (http://localhost:3000/static/js/bundle.js:138382:14) at options.factory (http://localhost:3000/static/js/bundle.js:176739:31)