From a24a11818299ec714cd04b6fd7db90beed29675d Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 6 Aug 2024 18:08:39 +0800 Subject: [PATCH] xalign: add more withdraw checking logs --- pkg/strategy/xalign/strategy.go | 1 + pkg/types/withdraw.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/strategy/xalign/strategy.go b/pkg/strategy/xalign/strategy.go index 7f5c66e79..40b0a6f01 100644 --- a/pkg/strategy/xalign/strategy.go +++ b/pkg/strategy/xalign/strategy.go @@ -145,6 +145,7 @@ func (s *Strategy) detectActiveWithdraw( } for _, withdraw := range withdraws { + log.Infof("checking withdraw status: %s", withdraw.String()) switch withdraw.Status { case types.WithdrawStatusSent, types.WithdrawStatusProcessing, types.WithdrawStatusAwaitingApproval: return &withdraw, nil diff --git a/pkg/types/withdraw.go b/pkg/types/withdraw.go index ef3e6d788..871ce82c6 100644 --- a/pkg/types/withdraw.go +++ b/pkg/types/withdraw.go @@ -47,7 +47,7 @@ func cutstr(s string, maxLen, head, tail int) string { } func (w Withdraw) String() (o string) { - o = fmt.Sprintf("%s WITHDRAW %8f %s -> ", w.Exchange, w.Amount.Float64(), w.Asset) + o = fmt.Sprintf("%s WITHDRAW %s %s -> ", w.Exchange, w.Amount.String(), w.Asset) if len(w.Network) > 0 && w.Network != w.Asset { o += w.Network + ":" @@ -68,6 +68,7 @@ func (w Withdraw) String() (o string) { o += fmt.Sprintf(" TxID: %s", cutstr(w.TransactionID, 12, 4, 4)) } + o += fmt.Sprintf(" STATUS: %s (%s)", w.Status, w.OriginalStatus) return o }