chore: remove useless

This commit is contained in:
2026-01-08 12:46:58 +08:00
parent 3e58b62e1f
commit 35c57c3c7a

View File

@@ -349,9 +349,6 @@ func ParseTransaction(update *SubscribeUpdateTransaction, loader *AddressTables,
case dflowProgramID:
txRes, err := parseDFlowInstruction(versioned, i)
parsed = appendParsed(now, parsed, txRes, err, txHash, "dflow", dflowProgramString)
case terminalProgramID:
txRes, err := parseTerminalInstruction(versioned, i)
parsed = appendParsed(now, parsed, txRes, err, txHash, "padre", terminalProgramIDString)
}
}
@@ -1653,25 +1650,6 @@ func parseFjszInstruction(tx *versionedTransaction, instructionIndex int) (*TxSi
}, nil
}
func parseTerminalInstruction(tx *versionedTransaction, instructionIndex int) (*TxSignal, error) {
msg := tx.Message
if instructionIndex >= len(msg.Instructions) {
return nil, fmt.Errorf("instruction index out of bounds")
}
instruction := msg.Instructions[instructionIndex]
if len(instruction.Data) == 0 {
return nil, fmt.Errorf("data is empty")
}
if matchMethod(instruction.Data, terminalBuyTokensIX) {
return parseTermBuy(tx, &instruction)
} else if matchMethod(instruction.Data, terminalSellTokensIX) {
return parseTermSell(tx, &instruction)
}
return nil, nil
}
func matchMethod(data []byte, methods []byte) bool {
if len(data) < len(methods) {
return false