Skip to content

Commit

Permalink
fix(apps/hermes/server): add crypto redemption rate asset type
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-bahjati committed Nov 12, 2024
1 parent 1e692e1 commit 124a271
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/hermes/server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/hermes/server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hermes"
version = "0.7.1"
version = "0.7.2"
description = "Hermes is an agent that provides Verified Prices from the Pythnet Pyth Oracle."
edition = "2021"

Expand Down
14 changes: 11 additions & 3 deletions apps/hermes/server/src/api/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,25 @@ pub struct PriceFeedMetadata {
}

#[derive(Debug, Serialize, Deserialize, PartialEq, ToSchema)]
#[serde(rename_all = "lowercase")]
pub enum AssetType {
Crypto,
FX,
Equity,
Metals,
Metal,
Rates,
#[serde(rename = "Crypto Redemption Rate")]
CryptoRedemptionRate,
}

impl Display for AssetType {
fn fmt(&self, f: &mut Formatter) -> FmtResult {
write!(f, "{:?}", self)
match self {
AssetType::Crypto => write!(f, "Crypto"),
AssetType::FX => write!(f, "FX"),
AssetType::Equity => write!(f, "Equity"),
AssetType::Metal => write!(f, "Metal"),
AssetType::Rates => write!(f, "Rates"),
AssetType::CryptoRedemptionRate => write!(f, "Crypto Redemption Rate"),
}
}
}

0 comments on commit 124a271

Please sign in to comment.