mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
max: fix withdraw state convert by calling convertWithdrawStatusV2
v3 api does not return status field
This commit is contained in:
parent
ffb2c14f1d
commit
25b0b5ded5
|
@ -361,7 +361,7 @@ func convertWithdrawStatusV3(status max.WithdrawStatus) types.WithdrawStatus {
|
|||
return types.WithdrawStatus(status)
|
||||
}
|
||||
|
||||
func convertWithdrawStatus(state max.WithdrawState) types.WithdrawStatus {
|
||||
func convertWithdrawStatusV2(state max.WithdrawState) types.WithdrawStatus {
|
||||
switch state {
|
||||
|
||||
case max.WithdrawStateSent, max.WithdrawStateSubmitting, max.WithdrawStatePending, "accepted", "approved":
|
||||
|
|
|
@ -865,8 +865,7 @@ func (e *Exchange) QueryWithdrawHistory(
|
|||
continue
|
||||
}
|
||||
|
||||
// we can convert this later
|
||||
status := convertWithdrawStatusV3(d.Status)
|
||||
status := convertWithdrawStatusV2(d.State)
|
||||
|
||||
txIDs[d.TxID] = struct{}{}
|
||||
withdraw := types.Withdraw{
|
||||
|
|
|
@ -194,7 +194,7 @@ type Withdraw struct {
|
|||
// "sygna_verifying"
|
||||
State WithdrawState `json:"state"`
|
||||
|
||||
Status WithdrawStatus `json:"status,omitempty"`
|
||||
// Status WithdrawStatus `json:"status,omitempty"`
|
||||
|
||||
CreatedAt types.MillisecondTimestamp `json:"created_at"`
|
||||
UpdatedAt types.MillisecondTimestamp `json:"updated_at"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user