mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-23 19:54:18 +01:00
fees were not returned if the fees were zero (#345)
This commit is contained in:
@@ -482,7 +482,7 @@ class Ledger(LedgerVerification, LedgerSpendingConditions):
|
|||||||
|
|
||||||
# prepare change to compensate wallet for overpaid fees
|
# prepare change to compensate wallet for overpaid fees
|
||||||
return_promises: List[BlindedSignature] = []
|
return_promises: List[BlindedSignature] = []
|
||||||
if outputs and fee_msat:
|
if outputs and fee_msat is not None:
|
||||||
return_promises = await self._generate_change_promises(
|
return_promises = await self._generate_change_promises(
|
||||||
total_provided=total_provided,
|
total_provided=total_provided,
|
||||||
invoice_amount=invoice_amount,
|
invoice_amount=invoice_amount,
|
||||||
|
|||||||
@@ -227,7 +227,8 @@ async def test_melt(wallet1: Wallet):
|
|||||||
await wallet1.pay_lightning(
|
await wallet1.pay_lightning(
|
||||||
send_proofs, invoice=invoice.pr, fee_reserve_sat=fee_reserve_sat
|
send_proofs, invoice=invoice.pr, fee_reserve_sat=fee_reserve_sat
|
||||||
)
|
)
|
||||||
assert wallet1.balance == 128 - total_amount
|
# the payment was without fees so we need to remove it from the total amount
|
||||||
|
assert wallet1.balance == 128 - (total_amount - fee_reserve_sat)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
|||||||
Reference in New Issue
Block a user