Skip to content

Commit e410bc4

Browse files
authored
Make get_decoded_payment_request return an InvoiceData type. (#24)
It's always returning InvoiceData under the hood anyway and the PaymentRequestData type isn't very helpful to callers.
2 parents ab9da90 + 727433b commit e410bc4

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lightspark/lightspark_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from lightspark.objects.IncomingPayment import from_json as IncomingPayment_from_json
3333
from lightspark.objects.Invoice import Invoice
3434
from lightspark.objects.Invoice import from_json as Invoice_from_json
35+
from lightspark.objects.InvoiceData import InvoiceData
3536
from lightspark.objects.InvoiceData import from_json as InvoiceData_from_json
3637
from lightspark.objects.InvoiceType import InvoiceType
3738
from lightspark.objects.LightningFeeEstimateOutput import (
@@ -44,7 +45,6 @@
4445
from lightspark.objects.OutgoingPayment import OutgoingPayment
4546
from lightspark.objects.OutgoingPayment import from_json as OutgoingPayment_from_json
4647
from lightspark.objects.PaymentDirection import PaymentDirection
47-
from lightspark.objects.PaymentRequestData import PaymentRequestData
4848
from lightspark.objects.Permission import Permission
4949
from lightspark.objects.RegionCode import RegionCode
5050
from lightspark.objects.RiskRating import RiskRating
@@ -376,9 +376,7 @@ def get_current_account(
376376
)
377377
return Account_from_json(self._requester, json["current_account"])
378378

379-
def get_decoded_payment_request(
380-
self, encoded_payment_request: str
381-
) -> PaymentRequestData:
379+
def get_decoded_payment_request(self, encoded_payment_request: str) -> InvoiceData:
382380
logger.info(
383381
"Decoding payment request starting with %s...",
384382
encoded_payment_request[0:10],

0 commit comments

Comments
 (0)