Skip to content

Commit

Permalink
fix: temporary remove disabled-flag for nut4 (revert)
Browse files Browse the repository at this point in the history
fixes #235
This reverts commit 0e0316b.
  • Loading branch information
ngutech21 committed Feb 19, 2024
1 parent c47eb9c commit 7d25de6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions integrationtests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down
2 changes: 1 addition & 1 deletion moksha-core/src/fixtures/nutshell_mint_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 2 additions & 0 deletions moksha-core/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
}
Expand Down

0 comments on commit 7d25de6

Please sign in to comment.