Skip to content

Commit

Permalink
do not pay with wallet but with ledger
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Apr 3, 2024
1 parent 5817b59 commit 9bb4b1b
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions tests/test_mint_regtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ async def test_regtest_pending_quote(wallet: Wallet, ledger: Ledger):
quote = await wallet.get_pay_amount_with_fees(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(
proofs=send_proofs,
invoice=invoice_payment_request,
fee_reserve_sat=quote.fee_reserve,
quote_id=quote.quote,
)
)
asyncio.create_task(ledger.melt(proofs=send_proofs, quote=quote.quote))
# asyncio.create_task(
# wallet.pay_lightning(
# proofs=send_proofs,
# invoice=invoice_payment_request,
# fee_reserve_sat=quote.fee_reserve,
# quote_id=quote.quote,
# )
# )
await asyncio.sleep(SLEEP_TIME)

# expect that melt quote is still pending
Expand All @@ -68,9 +69,6 @@ async def test_regtest_pending_quote(wallet: Wallet, ledger: Ledger):
settle_invoice(preimage=preimage)
await asyncio.sleep(SLEEP_TIME)

# run startup routinge
await ledger.startup_ledger()

# expect that proofs are now spent
states = await ledger.check_proofs_state([p.Y for p in send_proofs])
assert all([s.state == SpentState.spent for s in states])
Expand Down

0 comments on commit 9bb4b1b

Please sign in to comment.