max: fix v3 deposit state conversion

This commit is contained in:
c9s 2024-09-04 11:17:56 +08:00 committed by lychiyu
parent 0b572aa967
commit 38e7f4f98f
2 changed files with 11 additions and 0 deletions

View File

@ -284,6 +284,13 @@ func toGlobalDepositStatus(a max.DepositState) types.DepositStatus {
case max.DepositStateAccepted:
return types.DepositSuccess
case max.DepositStateProcessing: // v3 states
return types.DepositPending
case max.DepositStateDone: // v3 states
return types.DepositSuccess
}
// other states goes to this

View File

@ -116,6 +116,10 @@ const (
DepositStateSuspended DepositState = "suspended"
DepositStateAccepted DepositState = "accepted"
DepositStateChecking DepositState = "checking"
// v3 states
DepositStateProcessing DepositState = "processing"
DepositStateDone DepositState = "done"
)
type Deposit struct {