I am trying to get the swap results before making a swap using from Raydium V2 SDK
const swapResult = CurveCalculator.swap( inputAmount, baseIn ? baseReserve : quoteReserve, baseIn ? quoteReserve : baseReserve, new BN(feeConfigs[0].tradeFeeRate) );
But it keeps failing with
Error: destinationAmountSwapped is zero