diff --git a/pkg/exchange/max/convert.go b/pkg/exchange/max/convert.go index c1fe3dfb8..20b80e397 100644 --- a/pkg/exchange/max/convert.go +++ b/pkg/exchange/max/convert.go @@ -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": diff --git a/pkg/exchange/max/exchange.go b/pkg/exchange/max/exchange.go index 3852aadf5..873eed3ef 100644 --- a/pkg/exchange/max/exchange.go +++ b/pkg/exchange/max/exchange.go @@ -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{ diff --git a/pkg/exchange/max/maxapi/account.go b/pkg/exchange/max/maxapi/account.go index cc0ae7925..be176f923 100644 --- a/pkg/exchange/max/maxapi/account.go +++ b/pkg/exchange/max/maxapi/account.go @@ -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"`