client sends no amount

This commit is contained in:
callebtc
2022-10-05 21:35:58 +02:00
parent 6599215934
commit 953af045d0
2 changed files with 5 additions and 5 deletions

View File

@@ -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()

View File

@@ -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: