mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 01:01:56 +00:00
xalign: add more withdraw checking logs
This commit is contained in:
parent
e03ba63e44
commit
a24a118182
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user