Skip to content

Commit

Permalink
fix: use nutshell 0.15.2 in itests and adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Mar 31, 2024
1 parent 0941671 commit 4ba6b23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ services:
- itest

nutshell:
image: ngutech21/nutshell:latest
image: cashubtc/nutshell:0.15.2
container_name: nutshell
ports:
- "2228:3338"
Expand Down
2 changes: 1 addition & 1 deletion integrationtests/tests/tests_lnd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async fn test_btc_onchain_mint_melt() -> anyhow::Result<()> {

let btc_address = btc_client.get_new_address()?;

let melt_amount = 3_000;
let melt_amount = 21_000;
let melt_quotes = wallet
.get_melt_quote_btconchain(btc_address.clone(), melt_amount)
.await?;
Expand Down
7 changes: 5 additions & 2 deletions integrationtests/tests/tests_nutshell_compatibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,20 @@ pub async fn test_nutshell_compatibility() -> anyhow::Result<()> {
let balance = wallet.get_balance().await?;
assert_eq!(6_000, balance);

// pay ln-invoice
// pay ln-invoice (10_000 invoice + 10 sats fee_reserve / 9 sats get returned)
let invoice_1000 = read_fixture("invoice_1000.txt")?;
let quote = wallet
.get_melt_quote_bolt11(invoice_1000.clone(), CurrencyUnit::Sat)
.await?;
assert_eq!(10, quote.fee_reserve);
let result_pay_invoice = wallet.pay_invoice(&quote, invoice_1000).await;

if result_pay_invoice.is_err() {
println!("error in pay_invoice{:?}", result_pay_invoice);
}
assert!(result_pay_invoice.is_ok());
assert_eq!(9, result_pay_invoice?.1);
let balance = wallet.get_balance().await?;
assert_eq!(5_000, balance);
assert_eq!(4_999, balance);
Ok(())
}

0 comments on commit 4ba6b23

Please sign in to comment.