fix accounts len check
This commit is contained in:
@@ -741,6 +741,9 @@ func metaoraPoolRemoveLiquidity(tx *Tx, instruction Instruction, innerInstructio
|
||||
}
|
||||
|
||||
func metaoraPoolSwap(tx *Tx, instruction Instruction, innerInstructions InnerInstructions, offset [2]uint) ([]Swap, [2]uint, error) {
|
||||
if len(instruction.Accounts) < 13 {
|
||||
return nil, increaseOffset(offset), fmt.Errorf("not enough accounts for swap instruction")
|
||||
}
|
||||
swapOffset := offset
|
||||
var args metaoraPoolSwapArgs
|
||||
if err := agbinary.NewBorshDecoder(instruction.Data[8:]).Decode(&args); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user