From a265c93cd5d877f565a933e4d628e3830bf71e86 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Fri, 7 Oct 2022 22:49:05 +0200 Subject: [PATCH] make format --- cashu/mint/ledger.py | 4 +++- cashu/mint/router.py | 6 +++++- cashu/wallet/wallet.py | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cashu/mint/ledger.py b/cashu/mint/ledger.py index 26f6ee1..6895bf5 100644 --- a/cashu/mint/ledger.py +++ b/cashu/mint/ledger.py @@ -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) diff --git a/cashu/mint/router.py b/cashu/mint/router.py index fec009f..9974826 100644 --- a/cashu/mint/router.py +++ b/cashu/mint/router.py @@ -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. diff --git a/cashu/wallet/wallet.py b/cashu/wallet/wallet.py index b32421a..fc1fb84 100644 --- a/cashu/wallet/wallet.py +++ b/cashu/wallet/wallet.py @@ -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