From 012178c60601740dbecd2a34263032a57821632a Mon Sep 17 00:00:00 2001 From: lollerfirst Date: Thu, 12 Sep 2024 11:32:31 +0200 Subject: [PATCH] `None` is `PENDING` --- cashu/lightning/base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cashu/lightning/base.py b/cashu/lightning/base.py index 39a0b4bd..f097b80b 100644 --- a/cashu/lightning/base.py +++ b/cashu/lightning/base.py @@ -44,10 +44,12 @@ class PaymentResult(Enum): def __str__(self): return self.name - # We assume `None` is `FAILED` + # We assume `None` is `PENDING` @classmethod def from_paid_flag(cls, paid: Optional[bool]): - if paid is None or paid == False: + if paid is None: + return cls.PENDING + if paid == False: return cls.FAILED elif paid == True: return cls.SETTLED