Skip to content

Commit

Permalink
fix: default wrapper config to true
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Aug 7, 2022
1 parent bf75e17 commit 435ebc5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impl Config {

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PriceServerWrapper {
#[serde(default = "bool_true")]
pub enabled: bool,
#[serde(default)]
pub config: PriceServerConfig,
Expand All @@ -52,6 +53,7 @@ impl Default for PriceServerWrapper {

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PriceFeedConfigWrapper {
#[serde(default = "bool_true")]
pub enabled: bool,
#[serde(default)]
pub config: PriceFeedConfig,
Expand All @@ -64,3 +66,7 @@ impl Default for PriceFeedConfigWrapper {
}
}
}

fn bool_true() -> bool {
true
}

0 comments on commit 435ebc5

Please sign in to comment.