mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-21 19:14:19 +01:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user