mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
make format
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user