From b8171ab09fbc7457728b2fc5d93d66b89160e850 Mon Sep 17 00:00:00 2001 From: Cesar Rodas Date: Fri, 6 Dec 2024 12:56:21 -0300 Subject: [PATCH] Fixed bug with Default as described in https://github.com/cashubtc/cdk/pull/473#discussion_r1871032297 --- crates/cdk/src/nuts/nut17/mod.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/crates/cdk/src/nuts/nut17/mod.rs b/crates/cdk/src/nuts/nut17/mod.rs index a7b0698c..296a30e5 100644 --- a/crates/cdk/src/nuts/nut17/mod.rs +++ b/crates/cdk/src/nuts/nut17/mod.rs @@ -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, } -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 { @@ -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(), } } }