cleanup and comments (#163)

This commit is contained in:
calle
2023-04-16 15:51:22 +02:00
committed by GitHub
parent e7d7659767
commit 8f2a0d6c72
3 changed files with 34 additions and 13 deletions

View File

@@ -126,7 +126,7 @@ async def pay(ctx: Context, invoice: str, yes: bool):
if wallet.available_balance < total_amount:
print("Error: Balance too low.")
return
_, send_proofs = await wallet.split_to_send(wallet.proofs, total_amount) # type: ignore
_, send_proofs = await wallet.split_to_send(wallet.proofs, total_amount)
await wallet.pay_lightning(send_proofs, invoice)
await wallet.load_proofs()
wallet.status()
@@ -413,7 +413,7 @@ async def receive_cli(
elif all:
reserved_proofs = await get_reserved_proofs(wallet.db)
if len(reserved_proofs):
for (key, value) in groupby(reserved_proofs, key=itemgetter("send_id")): # type: ignore
for key, value in groupby(reserved_proofs, key=itemgetter("send_id")): # type: ignore
proofs = list(value)
token = await wallet.serialize_proofs(proofs)
await receive(ctx, token, lock)