style: 日志优化

This commit is contained in:
zhiqiang.wang
2023-10-20 19:24:13 +08:00
parent 1159d2c1cf
commit ae4df6b374
+4 -3
View File
@@ -97,14 +97,15 @@ func TradeStart() {
// 解析响应记录
result := gjson.ParseBytes(all)
if result.Get("total").Num <= 0 {
recentTransferTotal := result.Get("total").Num
log.Info(fmt.Sprintf("recent transfer total: %s(%v)", _toAddress, recentTransferTotal))
if recentTransferTotal <= 0 {
// 没有交易记录
continue
}
log.Info(fmt.Sprintf("transfer total: %s(%s)", _toAddress, result.Get("total").String()))
// 遍历交易记录
for _, transfer := range result.Get("data").Array() {
// 计算交易金额