fix ignore failed metaora swap

This commit is contained in:
thloyi
2026-04-22 11:16:26 +08:00
parent bb858c643e
commit 273e87b8ad
2 changed files with 28 additions and 2 deletions

View File

@@ -16,8 +16,8 @@ type metaoraPoolInitializePoolData struct {
}
type metaoraPoolSwapArgs struct {
InAmount uint64
MinimumOutAmount uint64
InAmount uint64
MinimumOutAmount uint64
}
var (
@@ -855,6 +855,9 @@ func metaoraPoolSwap(tx *Tx, instruction Instruction, innerInstructions InnerIns
}
}
if !baseFound || !quoteFound {
if args.InAmount == 0 {
return nil, increaseOffset(offset), InstructionIgnoredError
}
return nil, increaseOffset(offset), fmt.Errorf("failed to find meteora pool event in inner instructions")
}