I'm developing a program with Jupiter Api and gagliardetto/solana-go. It always returns invalid transaction: Transaction failed to sanitize accounts offsets correctly when I submit the transaction. And both two of the Privatekeys(the payer key and the base(order id) key) are used to sign the transaction.
// deserialize the transaction
const transactionBuf = Buffer.from(tx, "base64");
var transaction = VersionedTransaction.deserialize(transactionBuf);
// sign the transaction using the required key
// for create order, wallet and base key are required.
transaction.sign([wallet.payer, base]);
I'm developing a program with Jupiter Api and gagliardetto/solana-go. It always returns invalid transaction: Transaction failed to sanitize accounts offsets correctly when I submit the transaction. And both two of the Privatekeys(the payer key and the base(order id) key) are used to sign the transaction.
My code like below:
Doc from Jupiter are like:
Deserialize and sign the transaction
Execute the transaction