mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 18:11:30 +01:00
fix: make bolt11 optional in NodePayment
(#2005)
This commit is contained in:
parent
219838244b
commit
a937e09f85
@ -104,7 +104,7 @@ class NodePayment(BaseModel):
|
||||
fee: Optional[int] = None
|
||||
memo: Optional[str] = None
|
||||
time: int
|
||||
bolt11: str
|
||||
bolt11: Optional[str] = None
|
||||
preimage: Optional[str]
|
||||
payment_hash: str
|
||||
expiry: Optional[float] = None
|
||||
|
@ -271,7 +271,7 @@ class CoreLightningNode(Node):
|
||||
result = await self.ln_rpc("listpays")
|
||||
return [
|
||||
NodePayment(
|
||||
bolt11=pay["bolt11"],
|
||||
bolt11=pay.get("bolt11"),
|
||||
amount=pay["amount_msat"],
|
||||
fee=int(pay["amount_msat"]) - int(pay["amount_sent_msat"]),
|
||||
memo=pay.get("description"),
|
||||
|
Loading…
Reference in New Issue
Block a user