invoices: make sure that OnchainInvoice .exp and .time are not None
related: #6284
This commit is contained in:
@@ -113,9 +113,9 @@ class Invoice(StoredObject):
|
||||
@attr.s
|
||||
class OnchainInvoice(Invoice):
|
||||
message = attr.ib(type=str, kw_only=True)
|
||||
amount_sat = attr.ib(kw_only=True) # type: Union[None, int, str] # in satoshis. can be '!'
|
||||
exp = attr.ib(type=int, kw_only=True)
|
||||
time = attr.ib(type=int, kw_only=True)
|
||||
amount_sat = attr.ib(kw_only=True) # type: Union[int, str] # in satoshis. can be '!'
|
||||
exp = attr.ib(type=int, kw_only=True, validator=attr.validators.instance_of(int))
|
||||
time = attr.ib(type=int, kw_only=True, validator=attr.validators.instance_of(int))
|
||||
id = attr.ib(type=str, kw_only=True)
|
||||
outputs = attr.ib(kw_only=True, converter=_decode_outputs) # type: List[PartialTxOutput]
|
||||
bip70 = attr.ib(type=str, kw_only=True) # type: Optional[str]
|
||||
|
||||
Reference in New Issue
Block a user