Browse Source

fix: nut06 supported default to false

thesimplekid 8 months ago
parent
commit
7f585e89b5
2 changed files with 8 additions and 19 deletions
  1. 7 0
      crates/cdk-mintd/src/main.rs
  2. 1 19
      crates/cdk/src/nuts/nut06.rs

+ 7 - 0
crates/cdk-mintd/src/main.rs

@@ -189,6 +189,13 @@ async fn main() -> anyhow::Result<()> {
     let nuts = Nuts::new()
         .nut04(nut04_settings)
         .nut05(nut05_settings)
+        .nut07(true)
+        .nut08(true)
+        .nut09(true)
+        .nut10(true)
+        .nut11(true)
+        .nut12(true)
+        .nut14(true)
         .nut15(mpp_settings);
 
     let mut mint_info = MintInfo::new()

+ 1 - 19
crates/cdk/src/nuts/nut06.rs

@@ -193,10 +193,6 @@ pub struct Nuts {
     #[serde(default)]
     #[serde(rename = "12")]
     pub nut12: SupportedSettings,
-    /// NUT13 Settings
-    #[serde(default)]
-    #[serde(rename = "13")]
-    pub nut13: SupportedSettings,
     /// NUT14 Settings
     #[serde(default)]
     #[serde(rename = "14")]
@@ -277,14 +273,6 @@ impl Nuts {
         }
     }
 
-    /// Nut13 settings
-    pub fn nut13(self, supported: bool) -> Self {
-        Self {
-            nut13: SupportedSettings { supported },
-            ..self
-        }
-    }
-
     /// Nut14 settings
     pub fn nut14(self, supported: bool) -> Self {
         Self {
@@ -305,17 +293,11 @@ impl Nuts {
 }
 
 /// Check state Settings
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Hash, Serialize, Deserialize)]
 pub struct SupportedSettings {
     supported: bool,
 }
 
-impl Default for SupportedSettings {
-    fn default() -> Self {
-        Self { supported: true }
-    }
-}
-
 /// Contact Info
 #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
 pub struct ContactInfo {