Mint: add expiry to quotes, closes #385 (#429)

* add expiry to quotes, closes #385

* fix wallet deprecated mock with expiry

* expiry is an optional field
This commit is contained in:
callebtc
2024-02-16 11:40:46 +01:00
committed by GitHub
parent ecad95715f
commit 3f090c1691
6 changed files with 13 additions and 6 deletions

View File

@@ -182,6 +182,7 @@ async def test_mint_quote(ledger: Ledger):
assert result["request"]
invoice = bolt11.decode(result["request"])
assert invoice.amount_msat == 100 * 1000
assert result["expiry"] == invoice.expiry
# get mint quote again from api
response = httpx.get(
@@ -243,6 +244,8 @@ async def test_melt_quote_internal(ledger: Ledger, wallet: Wallet):
assert result["amount"] == 64
# TODO: internal invoice, fee should be 0
assert result["fee_reserve"] == 0
invoice_obj = bolt11.decode(request)
assert result["expiry"] == invoice_obj.expiry
# get melt quote again from api
response = httpx.get(