fix: nut06 supported default to false

This commit is contained in:
thesimplekid
2024-07-18 19:24:26 +01:00
parent 37ddaa2e2c
commit 7f585e89b5
2 changed files with 8 additions and 19 deletions

View File

@@ -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()

View File

@@ -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 {