mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +00:00
fix withdrawal data ordering
This commit is contained in:
parent
4d3b1ec938
commit
2d6b6e7427
|
@ -456,7 +456,8 @@ func (e *Exchange) QueryWithdrawHistory(ctx context.Context, asset string, since
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, d := range withdraws {
|
for i := len(withdraws) - 1 ; i >= 0 ; i-- {
|
||||||
|
d := withdraws[i]
|
||||||
if _, ok := txIDs[d.TxID]; ok {
|
if _, ok := txIDs[d.TxID]; ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -490,6 +491,7 @@ func (e *Exchange) QueryWithdrawHistory(ctx context.Context, asset string, since
|
||||||
AddressTag: "",
|
AddressTag: "",
|
||||||
TransactionID: d.TxID,
|
TransactionID: d.TxID,
|
||||||
TransactionFee: util.MustParseFloat(d.Fee),
|
TransactionFee: util.MustParseFloat(d.Fee),
|
||||||
|
TransactionFeeCurrency: d.FeeCurrency,
|
||||||
// WithdrawOrderID: d.WithdrawOrderID,
|
// WithdrawOrderID: d.WithdrawOrderID,
|
||||||
// Network: d.Network,
|
// Network: d.Network,
|
||||||
Status: status,
|
Status: status,
|
||||||
|
@ -503,7 +505,6 @@ func (e *Exchange) QueryWithdrawHistory(ctx context.Context, asset string, since
|
||||||
} else {
|
} else {
|
||||||
startTime = time.Unix(withdraws[len(withdraws)-1].UpdatedAt, 0)
|
startTime = time.Unix(withdraws[len(withdraws)-1].UpdatedAt, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return allWithdraws, nil
|
return allWithdraws, nil
|
||||||
|
|
Loading…
Reference in New Issue
Block a user