Skip to content

Commit

Permalink
Add platform
Browse files Browse the repository at this point in the history
  • Loading branch information
gemcoder21 committed Aug 8, 2023
1 parent aef1533 commit 3c320dd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ pub mod fiat_quote;
pub mod fiat_assets;
pub mod fiat_provider;
pub mod fiat_quote_request;
pub mod platform;
17 changes: 17 additions & 0 deletions primitives/src/platform.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use serde::{Serialize, Deserialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Platform {
IOS,
Android,
}

impl Platform {
pub fn as_str(&self) -> &'static str {
match self {
Platform::IOS => "ios",
Platform::Android => "android",
}
}
}

0 comments on commit 3c320dd

Please sign in to comment.