make format

This commit is contained in:
callebtc
2022-10-07 22:49:05 +02:00
parent 5d95045906
commit a265c93cd5
3 changed files with 10 additions and 4 deletions

View File

@@ -194,7 +194,9 @@ class Ledger:
raise Exception("tokens already issued for this invoice.")
total_requested = sum([amount for amount in amounts])
if total_requested > invoice.amount:
raise Exception(f"Requested amount too high: {total_requested}. Invoice amount: {invoice.amount}")
raise Exception(
f"Requested amount too high: {total_requested}. Invoice amount: {invoice.amount}"
)
status = await WALLET.get_invoice_status(payment_hash)
if status.paid:
await update_lightning_invoice(payment_hash, issued=True, db=self.db)

View File

@@ -41,7 +41,11 @@ async def request_mint(amount: int = 0):
@router.post("/mint")
async def mint(payloads: MintRequest, payment_hash: Union[str, None] = None):
async def mint(
payloads: MintRequest,
bolt11: Union[str, None] = None,
payment_hash: Union[str, None] = None,
):
"""
Requests the minting of tokens belonging to a paid payment request.

View File

@@ -208,7 +208,7 @@ class LedgerAPI:
)
resp.raise_for_status()
return_dict = resp.json()
return return_dict
async def check_fees(self, payment_request: str):
@@ -230,7 +230,7 @@ class LedgerAPI:
json=payload.dict(),
)
resp.raise_for_status()
return_dict = resp.json()
return return_dict