[FIX] NUT-15 mpp amount in millisats (#703)

* fix lndrest

* fix clnrest

* fix clnrest and lndrest

* lnd grpc fix

* wallet

* convert amount to millisats in CLI pay invoice

* fix tests

* format

* fix kw arg in regtest test

* fix payment quote validation check

* clean comment

* avoid overwriting variable

* deprecated response with amount

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
lollerfirst
2025-03-05 23:47:03 +01:00
committed by GitHub
parent 8555c020d4
commit f72a3f260f
8 changed files with 27 additions and 33 deletions

View File

@@ -263,7 +263,10 @@ async def pay(
await wallet.load_mint()
await print_balance(ctx)
payment_hash = bolt11.decode(invoice).payment_hash
quote = await wallet.melt_quote(invoice, amount)
if amount:
# we assume `amount` to be in sats
amount_mpp_msat = amount * 1000
quote = await wallet.melt_quote(invoice, amount_mpp_msat)
logger.debug(f"Quote: {quote}")
total_amount = quote.amount + quote.fee_reserve
# estimate ecash fee for the coinselected proofs