diff --git a/integrationtests/tests/tests.rs b/integrationtests/tests/tests.rs index b9895f5f..66db5f88 100644 --- a/integrationtests/tests/tests.rs +++ b/integrationtests/tests/tests.rs @@ -142,6 +142,13 @@ pub fn test_integration() -> anyhow::Result<()> { assert_eq!(10, result_send.unwrap().total_amount()); let balance = wallet.get_balance().await.expect("Could not get balance"); assert_eq!(5_000, balance); + + // get info + let info = wallet + .get_mint_info() + .await + .expect("Could not get mint info"); + assert!(!info.nuts.nut4.disabled); }); Ok(()) diff --git a/moksha-core/src/fixtures/nutshell_mint_info.json b/moksha-core/src/fixtures/nutshell_mint_info.json index ee1f9ebe..2dd356fc 100644 --- a/moksha-core/src/fixtures/nutshell_mint_info.json +++ b/moksha-core/src/fixtures/nutshell_mint_info.json @@ -11,7 +11,7 @@ ], "motd": "Message to users", "nuts": { - "4": { "methods": [["bolt11", "sat"]] }, + "4": { "methods": [["bolt11", "sat"]], "disabled": false }, "5": { "methods": [["bolt11", "sat"]], "disabled": false }, "7": { "supported": true }, "8": { "supported": true }, diff --git a/moksha-core/src/primitives.rs b/moksha-core/src/primitives.rs index 0bc30cf5..8c9ba7c8 100644 --- a/moksha-core/src/primitives.rs +++ b/moksha-core/src/primitives.rs @@ -424,12 +424,14 @@ pub struct Nuts { #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, ToSchema)] pub struct Nut4 { pub methods: Vec<(PaymentMethod, CurrencyUnit)>, + pub disabled: bool, } impl Default for Nut4 { fn default() -> Self { Self { methods: vec![(PaymentMethod::Bolt11, CurrencyUnit::Sat)], + disabled: false, } } }