mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-23 03:34:19 +01:00
Implement dynamic amount of tokens for change (#223)
With the recent update to NUT-08, we can ensure that the amount of blank outputs is always enough to cover any overpaid lightning fees. This change implements this functionality for both the wallet and the mint. The mint updateis backwards-compatible with respect to old wallets.
This commit is contained in:
@@ -115,7 +115,7 @@ async def pay(ctx: Context, invoice: str, yes: bool):
|
||||
print("Error: Balance too low.")
|
||||
return
|
||||
_, send_proofs = await wallet.split_to_send(wallet.proofs, total_amount)
|
||||
await wallet.pay_lightning(send_proofs, invoice)
|
||||
await wallet.pay_lightning(send_proofs, invoice, fee_reserve_sat)
|
||||
await wallet.load_proofs()
|
||||
wallet.status()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user