wallet print on json deseriliaztion error and batch invalidation of proofs (#430)

This commit is contained in:
callebtc
2024-02-16 12:11:39 +01:00
committed by GitHub
parent 3f090c1691
commit afbde83ae2
2 changed files with 9 additions and 2 deletions

View File

@@ -576,7 +576,9 @@ async def burn(ctx: Context, token: str, all: bool, force: bool, delete: str):
if delete:
await wallet.invalidate(proofs)
else:
await wallet.invalidate(proofs, check_spendable=True)
# batch check proofs
for _proofs in [proofs[i : i + 100] for i in range(0, len(proofs), 100)]:
await wallet.invalidate(_proofs, check_spendable=True)
print_balance(ctx)