Skip to content

Commit

Permalink
Add currency optional for AssetPricesRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
gemcoder21 committed Aug 3, 2023
1 parent 0adfbf4 commit 7eb5732
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions primitives/src/asset_price.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use typeshare::typeshare;
use serde::{Serialize, Deserialize};

#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[typeshare]
#[serde(rename_all = "camelCase")]
pub struct AssetPrice {
Expand All @@ -10,19 +10,19 @@ pub struct AssetPrice {
pub price_change_percentage_24h: f64,
}

#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[typeshare]
#[serde(rename_all = "camelCase")]
pub struct AssetPrices {
pub currency: String,
pub prices: Vec<AssetPrice>,
}

#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[typeshare(swift = "Equatable")]
#[serde(rename_all = "camelCase")]
pub struct AssetPricesRequest {
pub currency: String,
pub currency: Option<String>,
pub asset_ids: Vec<String>,
}

0 comments on commit 7eb5732

Please sign in to comment.