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