diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c72880..fe9f1c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# v1.4.1 + +- Fix deserializing nullable lists + # v1.4.0 - Adding UMA protocol support diff --git a/lightspark/objects/IncomingPayment.py b/lightspark/objects/IncomingPayment.py index 338e300..1e30734 100644 --- a/lightspark/objects/IncomingPayment.py +++ b/lightspark/objects/IncomingPayment.py @@ -184,5 +184,7 @@ def from_json(requester: Requester, obj: Mapping[str, Any]) -> IncomingPayment: lambda e: PostTransactionData_from_json(requester, e), obj["incoming_payment_uma_post_transaction_data"], ) - ), + ) + if obj["incoming_payment_uma_post_transaction_data"] + else None, ) diff --git a/lightspark/objects/LightningTransaction.py b/lightspark/objects/LightningTransaction.py index 04d1b2f..4013870 100644 --- a/lightspark/objects/LightningTransaction.py +++ b/lightspark/objects/LightningTransaction.py @@ -352,7 +352,9 @@ def from_json(requester: Requester, obj: Mapping[str, Any]) -> LightningTransact lambda e: PostTransactionData_from_json(requester, e), obj["incoming_payment_uma_post_transaction_data"], ) - ), + ) + if obj["incoming_payment_uma_post_transaction_data"] + else None, ) if obj["__typename"] == "OutgoingPayment": # pylint: disable=import-outside-toplevel @@ -393,7 +395,9 @@ def from_json(requester: Requester, obj: Mapping[str, Any]) -> LightningTransact lambda e: PostTransactionData_from_json(requester, e), obj["outgoing_payment_uma_post_transaction_data"], ) - ), + ) + if obj["outgoing_payment_uma_post_transaction_data"] + else None, ) if obj["__typename"] == "RoutingTransaction": # pylint: disable=import-outside-toplevel diff --git a/lightspark/objects/OutgoingPayment.py b/lightspark/objects/OutgoingPayment.py index d495cf3..5a74d93 100644 --- a/lightspark/objects/OutgoingPayment.py +++ b/lightspark/objects/OutgoingPayment.py @@ -367,5 +367,7 @@ def from_json(requester: Requester, obj: Mapping[str, Any]) -> OutgoingPayment: lambda e: PostTransactionData_from_json(requester, e), obj["outgoing_payment_uma_post_transaction_data"], ) - ), + ) + if obj["outgoing_payment_uma_post_transaction_data"] + else None, ) diff --git a/lightspark/objects/Transaction.py b/lightspark/objects/Transaction.py index 72850e8..7b11733 100644 --- a/lightspark/objects/Transaction.py +++ b/lightspark/objects/Transaction.py @@ -573,7 +573,9 @@ def from_json(requester: Requester, obj: Mapping[str, Any]) -> Transaction: lambda e: PostTransactionData_from_json(requester, e), obj["incoming_payment_uma_post_transaction_data"], ) - ), + ) + if obj["incoming_payment_uma_post_transaction_data"] + else None, ) if obj["__typename"] == "OutgoingPayment": # pylint: disable=import-outside-toplevel @@ -614,7 +616,9 @@ def from_json(requester: Requester, obj: Mapping[str, Any]) -> Transaction: lambda e: PostTransactionData_from_json(requester, e), obj["outgoing_payment_uma_post_transaction_data"], ) - ), + ) + if obj["outgoing_payment_uma_post_transaction_data"] + else None, ) if obj["__typename"] == "RoutingTransaction": # pylint: disable=import-outside-toplevel diff --git a/lightspark/version.py b/lightspark/version.py index 3e8d9f9..bf25615 100644 --- a/lightspark/version.py +++ b/lightspark/version.py @@ -1 +1 @@ -__version__ = "1.4.0" +__version__ = "1.4.1"