You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm following the guide to perform a trade from the doc but I'm stuck at the step 6. When I execute :
// generates all possible TradeV2 instancesconsttrades=awaitTradeV2.getTradesExactIn(allRoutes,amountIn,outputToken,isNativeIn,isNativeOut,publicClient,CHAIN_ID);
It returns every time an empty array because an error is caught.
Once we received results, some TradeV2 instances are created and it looks like the error is thrown when the TradeV2 constructor is executed.
Here is the stack error of the compiled files:
Error: Convert JSBI instances to native numbers using `toNumber`.
at JSBI.call [as valueOf] (node_modules/@traderjoe-xyz/sdk-v2/node_modules/jsbi/tsc-out/jsbi.mjs:81:15)
at Function.__toPrimitive (node_modules/@traderjoe-xyz/sdk-core/node_modules/jsbi/tsc-out/jsbi.mjs:1887:39)
at Function.BigInt (node_modules/@traderjoe-xyz/sdk-core/node_modules/jsbi/tsc-out/jsbi.mjs:56:36)
at parseBigintIsh (node_modules/@traderjoe-xyz/sdk-core/dist/index.js:147:171)
at new _CurrencyAmount (node_modules/@traderjoe-xyz/sdk-core/dist/index.js:484:26)
at new _TokenAmount (node_modules/@traderjoe-xyz/sdk-core/dist/index.js:527:5)
at new _TradeV2 (node_modules/@traderjoe-xyz/sdk-v2/dist/index.js:31221:25)
at node_modules/@traderjoe-xyz/sdk-v2/dist/index.js:31464:16
Thanks for your help,
Cheers
The text was updated successfully, but these errors were encountered:
Hello Traderjoe team,
I'm following the guide to perform a trade from the doc but I'm stuck at the step 6. When I execute :
It returns every time an empty array because an error is caught.
Once we received results, some TradeV2 instances are created and it looks like the error is thrown when the TradeV2 constructor is executed.
Here is the stack error of the compiled files:
Thanks for your help,
Cheers
The text was updated successfully, but these errors were encountered: