From 953af045d074f0fb2c90c8bf7a153372e6c4fc2c Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Wed, 5 Oct 2022 21:35:58 +0200 Subject: [PATCH] client sends no amount --- cashu/wallet/cli.py | 2 +- cashu/wallet/wallet.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cashu/wallet/cli.py b/cashu/wallet/cli.py index 84a9a92..f53eb78 100755 --- a/cashu/wallet/cli.py +++ b/cashu/wallet/cli.py @@ -136,7 +136,7 @@ async def pay(ctx, invoice: str): print("Error: Balance too low.") return _, send_proofs = await wallet.split_to_send(wallet.proofs, amount) - await wallet.pay_lightning(send_proofs, amount, invoice) + await wallet.pay_lightning(send_proofs, invoice) wallet.status() diff --git a/cashu/wallet/wallet.py b/cashu/wallet/wallet.py index 2245837..cfd6a3a 100644 --- a/cashu/wallet/wallet.py +++ b/cashu/wallet/wallet.py @@ -221,8 +221,8 @@ class LedgerAPI: return return_dict - async def pay_lightning(self, proofs: List[Proof], amount: int, invoice: str): - payload = MeltRequest(proofs=proofs, amount=amount, invoice=invoice) + async def pay_lightning(self, proofs: List[Proof], invoice: str): + payload = MeltRequest(proofs=proofs, invoice=invoice) return_dict = requests.post( self.url + "/melt", json=payload.dict(), @@ -294,9 +294,9 @@ class Wallet(LedgerAPI): await invalidate_proof(proof, db=self.db) return frst_proofs, scnd_proofs - async def pay_lightning(self, proofs: List[Proof], amount: int, invoice: str): + async def pay_lightning(self, proofs: List[Proof], invoice: str): """Pays a lightning invoice""" - status = await super().pay_lightning(proofs, amount, invoice) + status = await super().pay_lightning(proofs, invoice) if status["paid"] == True: await self.invalidate(proofs) else: