Closed antiisaint closed 2 months ago
I would also like to mention that this code snippet doesn't work either.
const collateralAmount = await token.getCollateralAmountByTokens({
tokenAmount,
tradeDirection: 'BUY',
});
The error is
dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);
^
TypeError: Cannot read properties of null (reading 'property')
I'm currently running into an issue using the example code provided to buy. The transaction fails to succeed due to this failure
Program Error: "Instruction #4 Failed - The program could not deserialize the given instruction"
Any idea as to why this is occurring? I used different rpcs, yet the same outcome.