fix: Explicitly convert lndrest fee_msat to int (#3116)

This commit is contained in:
iwarp 2025-04-17 08:48:06 +02:00 committed by GitHub
parent e686ecda51
commit b48489ef32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,7 +266,12 @@ class LndRestWallet(Wallet):
if payment is not None and payment.get("status"):
return PaymentStatus(
paid=statuses[payment["status"]],
fee_msat=payment.get("fee_msat"),
# API returns fee_msat as string, explicitly convert to int
fee_msat=(
int(payment["fee_msat"])
if payment.get("fee_msat")
else None
),
preimage=payment.get("payment_preimage"),
)
else: