Skip to content

Commit

Permalink
Fixed bug with Default as described in #473 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
crodas committed Dec 6, 2024
1 parent 392136e commit b8171ab
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions crates/cdk/src/nuts/nut17/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,12 @@ pub struct Params {
}

/// Check state Settings
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[derive(Debug, Default, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct SupportedSettings {
/// Supported methods
pub supported: Vec<SupportedMethods>,
}

impl Default for SupportedSettings {
fn default() -> Self {
SupportedSettings {
supported: vec![SupportedMethods::default()],
}
}
}

/// Supported WS Methods
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct SupportedMethods {
Expand All @@ -67,11 +59,7 @@ impl SupportedMethods {
Self {
method,
unit,
commands: vec![
"bolt11_mint_quote".to_owned(),
"bolt11_melt_quote".to_owned(),
"proof_state".to_owned(),
],
commands: Vec::new(),
}
}
}
Expand Down

0 comments on commit b8171ab

Please sign in to comment.