mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
max: remove legacy emptyTime
This commit is contained in:
parent
5d65b817ef
commit
e03ba63e44
|
@ -824,8 +824,7 @@ func (e *Exchange) QueryWithdrawHistory(
|
|||
limit := 1000
|
||||
txIDs := map[string]struct{}{}
|
||||
|
||||
emptyTime := time.Time{}
|
||||
if startTime == emptyTime {
|
||||
if startTime.IsZero() {
|
||||
startTime, err = e.getLaunchDate()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -867,7 +866,7 @@ func (e *Exchange) QueryWithdrawHistory(
|
|||
}
|
||||
|
||||
// we can convert this later
|
||||
status := convertWithdrawStatus(d.State)
|
||||
status := convertWithdrawStatusV3(d.Status)
|
||||
|
||||
txIDs[d.TxID] = struct{}{}
|
||||
withdraw := types.Withdraw{
|
||||
|
@ -881,11 +880,10 @@ func (e *Exchange) QueryWithdrawHistory(
|
|||
TransactionFee: d.Fee,
|
||||
TransactionFeeCurrency: d.FeeCurrency,
|
||||
Network: d.NetworkProtocol,
|
||||
// WithdrawOrderID: d.WithdrawOrderID,
|
||||
// Network: d.Network,
|
||||
Status: status,
|
||||
OriginalStatus: string(d.State),
|
||||
Status: status,
|
||||
OriginalStatus: string(d.State),
|
||||
}
|
||||
|
||||
allWithdraws = append(allWithdraws, withdraw)
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ func (s *Strategy) detectActiveWithdraw(
|
|||
|
||||
for _, withdraw := range withdraws {
|
||||
switch withdraw.Status {
|
||||
case types.WithdrawStatusProcessing, types.WithdrawStatusSent, types.WithdrawStatusAwaitingApproval:
|
||||
case types.WithdrawStatusSent, types.WithdrawStatusProcessing, types.WithdrawStatusAwaitingApproval:
|
||||
return &withdraw, nil
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user