mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 10:34:20 +01:00
Ngutech21-fix-get-quote-api (#397)
* fix: v1 mint-quote api in router * fix get mint quote * test new endpoints --------- Co-authored-by: ngutech21 <ngutech21@pm.me>
This commit is contained in:
@@ -183,6 +183,14 @@ async def test_mint_quote(ledger: Ledger):
|
||||
invoice = bolt11.decode(result["request"])
|
||||
assert invoice.amount_msat == 100 * 1000
|
||||
|
||||
# get mint quote again from api
|
||||
response = httpx.get(
|
||||
f"{BASE_URL}/v1/mint/quote/bolt11/{result['quote']}",
|
||||
)
|
||||
assert response.status_code == 200, f"{response.url} {response.status_code}"
|
||||
result2 = response.json()
|
||||
assert result2["quote"] == result["quote"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.skipif(
|
||||
@@ -236,6 +244,14 @@ async def test_melt_quote_internal(ledger: Ledger, wallet: Wallet):
|
||||
# TODO: internal invoice, fee should be 0
|
||||
assert result["fee_reserve"] == 0
|
||||
|
||||
# get melt quote again from api
|
||||
response = httpx.get(
|
||||
f"{BASE_URL}/v1/melt/quote/bolt11/{result['quote']}",
|
||||
)
|
||||
assert response.status_code == 200, f"{response.url} {response.status_code}"
|
||||
result2 = response.json()
|
||||
assert result2["quote"] == result["quote"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.skipif(
|
||||
|
||||
Reference in New Issue
Block a user