eigen_client_fireblocks/
status.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug, Clone)]
pub enum Status {
    #[serde(rename = "APPROVED")]
    Approved,
    #[serde(rename = "SUBMITTED")]
    Submitted,
    #[serde(rename = "PENDING_AML_SCREENING")]
    PendingScreening,
    #[serde(rename = "PENDING_AUTHORIZATION")]
    PendingAuthorization,
    #[serde(rename = "QUEUED")]
    Queued,
    #[serde(rename = "PENDING_SIGNATURE")]
    PendingSignature,
    #[serde(rename = "PENDING_3RD_PARTY_MANUAL_APPROVAL")]
    PendingEmailApproval,
    #[serde(rename = "PENDING_3RD_PARTY")]
    Pending3rdParity,
    #[serde(rename = "BROADCASTING")]
    Broadcasting,
    #[serde(rename = "CONFIRMING")]
    Confirming,
    #[serde(rename = "COMPLETED")]
    Completed,
    #[serde(rename = "CANCELLING")]
    Cancelling,
    #[serde(rename = "CANCELLED")]
    Cancelled,
    #[serde(rename = "BLOCKED")]
    Blocked,
    #[serde(rename = "REJECTED")]
    Rejected,
    #[serde(rename = "FAILED")]
    Failed,
}

impl Status {
    pub fn as_str(&self) -> &'static str {
        match self {
            Status::Approved => "APPROVED",
            Status::Submitted => "SUBMITTED",
            Status::PendingScreening => "PENDING_AML_SCREENING",
            Status::PendingAuthorization => "PENDING_AUTHORIZATION",
            Status::Queued => "QUEUED",
            Status::PendingSignature => "PENDING_SIGNATURE",
            Status::PendingEmailApproval => "PENDING_3RD_PARTY_MANUAL_APPROVAL",
            Status::Pending3rdParity => "PENDING_3RD_PARTY",
            Status::Broadcasting => "BROADCASTING",
            Status::Confirming => "CONFIRMING",
            Status::Completed => "COMPLETED",
            Status::Cancelling => "CANCELLING",
            Status::Cancelled => "CANCELLED",
            Status::Blocked => "BLOCKED",
            Status::Rejected => "REJECTED",
            Status::Failed => "FAILED",
        }
    }
}