Skip to content

Commit

Permalink
None is PENDING
Browse files Browse the repository at this point in the history
  • Loading branch information
lollerfirst committed Sep 12, 2024
1 parent 0cba761 commit 012178c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cashu/lightning/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 012178c

Please sign in to comment.