solana-go
solana-go copied to clipboard
invalid transaction: Transaction failed to sanitize accounts offsets correctly
Hello, i'm trying to make swap using jup.ag quote api
tx, err := solana.TransactionFromDecoder(bin.NewBinDecoder(swapTx))
if err != nil {
log.Fatal(err)
}
_, err = tx.Sign(
func(key solana.PublicKey) *solana.PrivateKey {
if account.PublicKey().Equals(key) {
return &account.PrivateKey
}
return nil
},
)
if err != nil {
log.Fatal(err)
}
hash, err := solanaClient.SendTransaction(context.Background(), tx)
if err != nil {
log.Fatal(err)
}
log.Println("swap:", hash)
swapTx is []byte that i got from jup.ag api and when i'm was trying to send tx i got this err:
(*jsonrpc.RPCError)(0xc00002b920)({ Code: (int) -32602, Message: (string) (len=78) "invalid transaction: Transaction failed to sanitize accounts offsets correctly", Data: (interface {}) <nil> })
Did you find any solution?
Same here, do you have any solution?