refactor exchange rates (#1847)
* simplify and cache exchange rate note that exir was removed as a provider * add binance as provider * log exception * add test * add blockchain.com provider
This commit is contained in:
@@ -84,6 +84,19 @@ async def test_create_invoice(client, inkey_headers_to):
|
||||
return invoice
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_invoice_fiat_amount(client, inkey_headers_to):
|
||||
data = await get_random_invoice_data()
|
||||
data["unit"] = "EUR"
|
||||
response = await client.post(
|
||||
"/api/v1/payments", json=data, headers=inkey_headers_to
|
||||
)
|
||||
assert response.status_code == 201
|
||||
invoice = response.json()
|
||||
decode = bolt11.decode(invoice["payment_request"])
|
||||
assert decode.amount_msat != data["amount"] * 1000
|
||||
|
||||
|
||||
# check POST /api/v1/payments: invoice creation for internal payments only
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_internal_invoice(client, inkey_headers_to):
|
||||
|
||||
Reference in New Issue
Block a user