Skip to content

Commit

Permalink
fix regtest mint external
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Dec 13, 2024
1 parent 85f9ab8 commit 807d243
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_mint_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ async def test_mint_internal(wallet1: Wallet, ledger: Ledger):
@pytest.mark.asyncio
@pytest.mark.skipif(is_fake, reason="only works with Regtest")
async def test_mint_external(wallet1: Wallet, ledger: Ledger):
quote = await ledger.mint_quote(PostMintQuoteRequest(amount=128, unit="sat"))
assert not quote.paid, "mint quote should not be paid"
assert quote.unpaid
quote = await wallet1.request_mint(128)

mint_quote = await ledger.get_mint_quote(quote.quote)
assert not mint_quote.paid, "mint quote already paid"
Expand All @@ -184,7 +182,9 @@ async def test_mint_external(wallet1: Wallet, ledger: Ledger):
len(output_amounts)
)
outputs, rs = wallet1._construct_outputs(output_amounts, secrets, rs)
await ledger.mint(outputs=outputs, quote_id=quote.quote)
assert quote.privkey
signature = nut20.sign_mint_quote(quote.quote, outputs, quote.privkey)
await ledger.mint(outputs=outputs, quote_id=quote.quote, signature=signature)

mint_quote_after_payment = await ledger.get_mint_quote(quote.quote)
assert mint_quote_after_payment.issued, "mint quote should be issued"
Expand Down

0 comments on commit 807d243

Please sign in to comment.