Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed May 22, 2024
1 parent 422c030 commit 079251f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions tests/test_mint_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ async def test_startup_regtest_pending_quote_pending(wallet: Wallet, ledger: Led
invoice_payment_request = str(invoice_dict["payment_request"])

# wallet pays the invoice
quote = await wallet.get_pay_amount_with_fees(invoice_payment_request)
quote = await wallet.melt_quote(invoice_payment_request)
total_amount = quote.amount + quote.fee_reserve
_, send_proofs = await wallet.split_to_send(wallet.proofs, total_amount)
asyncio.create_task(
wallet.pay_lightning(
wallet.melt(
proofs=send_proofs,
invoice=invoice_payment_request,
fee_reserve_sat=quote.fee_reserve,
Expand Down Expand Up @@ -294,11 +294,11 @@ async def test_startup_regtest_pending_quote_success(wallet: Wallet, ledger: Led
invoice_payment_request = str(invoice_dict["payment_request"])

# wallet pays the invoice
quote = await wallet.get_pay_amount_with_fees(invoice_payment_request)
quote = await wallet.melt_quote(invoice_payment_request)
total_amount = quote.amount + quote.fee_reserve
_, send_proofs = await wallet.split_to_send(wallet.proofs, total_amount)
asyncio.create_task(
wallet.pay_lightning(
wallet.melt(
proofs=send_proofs,
invoice=invoice_payment_request,
fee_reserve_sat=quote.fee_reserve,
Expand Down Expand Up @@ -344,11 +344,11 @@ async def test_startup_regtest_pending_quote_failure(wallet: Wallet, ledger: Led
preimage_hash = invoice_obj.payment_hash

# wallet pays the invoice
quote = await wallet.get_pay_amount_with_fees(invoice_payment_request)
quote = await wallet.melt_quote(invoice_payment_request)
total_amount = quote.amount + quote.fee_reserve
_, send_proofs = await wallet.split_to_send(wallet.proofs, total_amount)
asyncio.create_task(
wallet.pay_lightning(
wallet.melt(
proofs=send_proofs,
invoice=invoice_payment_request,
fee_reserve_sat=quote.fee_reserve,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_mint_regtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ async def test_regtest_pending_quote(wallet: Wallet, ledger: Ledger):
invoice_payment_request = str(invoice_dict["payment_request"])

# wallet pays the invoice
quote = await wallet.get_pay_amount_with_fees(invoice_payment_request)
quote = await wallet.melt_quote(invoice_payment_request)
total_amount = quote.amount + quote.fee_reserve
_, send_proofs = await wallet.split_to_send(wallet.proofs, total_amount)
asyncio.create_task(ledger.melt(proofs=send_proofs, quote=quote.quote))
# asyncio.create_task(
# wallet.pay_lightning(
# wallet.melt(
# proofs=send_proofs,
# invoice=invoice_payment_request,
# fee_reserve_sat=quote.fee_reserve,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_wallet_regtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ async def test_regtest_pending_quote(wallet: Wallet, ledger: Ledger):
invoice_payment_request = str(invoice_dict["payment_request"])

# wallet pays the invoice
quote = await wallet.get_pay_amount_with_fees(invoice_payment_request)
quote = await wallet.melt_quote(invoice_payment_request)
total_amount = quote.amount + quote.fee_reserve
_, send_proofs = await wallet.split_to_send(wallet.proofs, total_amount)
asyncio.create_task(
wallet.pay_lightning(
wallet.melt(
proofs=send_proofs,
invoice=invoice_payment_request,
fee_reserve_sat=quote.fee_reserve,
Expand Down Expand Up @@ -83,11 +83,11 @@ async def test_regtest_failed_quote(wallet: Wallet, ledger: Ledger):
preimage_hash = invoice_obj.payment_hash

# wallet pays the invoice
quote = await wallet.get_pay_amount_with_fees(invoice_payment_request)
quote = await wallet.melt_quote(invoice_payment_request)
total_amount = quote.amount + quote.fee_reserve
_, send_proofs = await wallet.split_to_send(wallet.proofs, total_amount)
asyncio.create_task(
wallet.pay_lightning(
wallet.melt(
proofs=send_proofs,
invoice=invoice_payment_request,
fee_reserve_sat=quote.fee_reserve,
Expand Down

0 comments on commit 079251f

Please sign in to comment.