From da7654e420fa2b9c45f659173fad7cfb4d0d72fd Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Tue, 21 Nov 2023 19:56:52 -0300 Subject: [PATCH] fix deprecated fees --- tests/test_mint_api_deprecated.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_mint_api_deprecated.py b/tests/test_mint_api_deprecated.py index a181236b..8fdac154 100644 --- a/tests/test_mint_api_deprecated.py +++ b/tests/test_mint_api_deprecated.py @@ -172,3 +172,19 @@ async def test_melt(ledger: Ledger, wallet: Wallet): assert result["change"] # we get back 2 sats because it was an internal invoice assert result["change"][0]["amount"] == 2 + + +@pytest.mark.asyncio +async def test_checkfees(ledger: Ledger, wallet: Wallet): + # internal invoice + invoice = await wallet.request_mint(64) + response = httpx.post( + f"{BASE_URL}/checkfees", + json={ + "pr": invoice.bolt11, + }, + timeout=None, + ) + assert response.status_code == 200, f"{response.url} {response.status_code}" + result = response.json() + assert result["fee"] == 2