fix EncodeTxBinary

This commit is contained in:
thloyi
2026-04-20 15:09:42 +08:00
parent 7dfe003e5b
commit 51f1511c8f
3 changed files with 94 additions and 10 deletions

View File

@@ -62,6 +62,12 @@ func main() {
swap.BaseAmount.Div(decimal.NewFromInt(1e6)), swap.QuoteAmount.Div(decimal.NewFromInt(1e9)), swap.FixedAmount.String(), swap.LimitAmount.String())
}
}
if len(ptx.Swaps) > 0 {
_, err := parser.EncodeTxBinary(ptx)
if err != nil {
fmt.Printf("success tx : %s, , block: %d, tx: %s, err: %s \n", time.Now().Format("2006-01-02 15:04:05"), ptx.Block, ptx.GetTxHash(), err.Error())
}
}
}
// currentBlock = ptx.Block