Fix false mpp payment handling of unsupported backends (#547)

* fix mpp spec and backend support check

* refactor validation in ledger

* remove weird error

* fix mpp melt model
This commit is contained in:
callebtc
2024-06-16 17:16:10 +02:00
committed by GitHub
parent 2fae0ba2e2
commit 75987beaf1
4 changed files with 103 additions and 36 deletions

View File

@@ -376,8 +376,8 @@ class LndRestWallet(LightningBackend):
) -> PaymentQuoteResponse:
# get amount from melt_quote or from bolt11
amount = (
Amount(Unit[melt_quote.unit], melt_quote.amount)
if melt_quote.amount
Amount(Unit[melt_quote.unit], melt_quote.mpp_amount)
if melt_quote.is_mpp
else None
)