Skip to content

Commit

Permalink
Add currency to pub
Browse files Browse the repository at this point in the history
  • Loading branch information
gemcoder21 committed Aug 4, 2023
1 parent 4d03ccb commit c145f5a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions primitives/src/currency.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
use typeshare::typeshare;
use serde::{Serialize, Deserialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
#[typeshare(swift = "Equatable, Codable, CaseIterable")]
pub enum Currency {
MXN,
Expand Down
3 changes: 1 addition & 2 deletions primitives/src/fiat_quote.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use typeshare::typeshare;
use serde::{Serialize, Deserialize};
use crate::fiat_provider::FiatProvider;
Expand All @@ -11,7 +10,7 @@ pub struct FiatQuote {
pub fiat_amount: f64,
pub fiat_currency: String,
pub crypto_amount: f64,
redirect_url: String,
pub redirect_url: String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
Expand Down
10 changes: 5 additions & 5 deletions primitives/src/fiat_quote_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use serde::{Serialize, Deserialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[typeshare()]
#[serde(rename_all = "camelCase")]
struct FiatBuyRequest {
pub struct FiatBuyRequest {
#[typeshare(skip)]
ip_address: String,
fiat_currency: String,
fiat_amount: f64,
wallet_address: String,
pub ip_address: String,
pub fiat_currency: String,
pub fiat_amount: f64,
pub wallet_address: String,
}
1 change: 1 addition & 0 deletions primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub mod name;
pub mod node;
pub mod price;
pub mod config;
pub mod currency;
pub mod asset_id;
pub mod asset_type;
pub mod asset_price;
Expand Down

0 comments on commit c145f5a

Please sign in to comment.