Skip to content

Commit ee6f106

Browse files
Lightspark Engjklein24
authored andcommitted
Project import generated by Copybara.
GitOrigin-RevId: 86f3d4044cb5da6a0ed20137aff2ab1f81720b18
1 parent 2191f94 commit ee6f106

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

lightspark/lightspark_client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
from lightspark.objects.Entity import Entity
2828
from lightspark.objects.FeeEstimate import FeeEstimate
2929
from lightspark.objects.FeeEstimate import from_json as FeeEstimate_from_json
30+
from lightspark.objects.IncomingPayment import IncomingPayment
31+
from lightspark.objects.IncomingPayment import from_json as IncomingPayment_from_json
3032
from lightspark.objects.Invoice import Invoice
3133
from lightspark.objects.Invoice import from_json as Invoice_from_json
3234
from lightspark.objects.InvoiceData import from_json as InvoiceData_from_json
@@ -227,7 +229,7 @@ def create_test_mode_payment(
227229
local_node_id: str,
228230
encoded_invoice: str,
229231
amount_msats: Optional[int] = None,
230-
) -> OutgoingPayment:
232+
) -> IncomingPayment:
231233
variables: Dict[str, Any] = {
232234
"local_node_id": local_node_id,
233235
"encoded_invoice": encoded_invoice,
@@ -240,8 +242,8 @@ def create_test_mode_payment(
240242
variables,
241243
self.get_signing_key(local_node_id),
242244
)
243-
return OutgoingPayment_from_json(
244-
self._requester, json["create_test_mode_payment"]["payment"]
245+
return IncomingPayment_from_json(
246+
self._requester, json["create_test_mode_payment"]["incoming_payment"]
245247
)
246248

247249
def create_uma_invoice(

lightspark/scripts/create_test_mode_payment.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright ©, 2022-present, Lightspark Group, Inc. - All Rights Reserved
22

3-
from lightspark.objects.OutgoingPayment import FRAGMENT as OutgoingPaymentFragment
3+
from lightspark.objects.IncomingPayment import FRAGMENT as IncomingPaymentFragment
44

55
CREATE_TEST_MODE_PAYMENT_MUTATION = f"""
66
mutation CreateTestModePayment(
@@ -13,11 +13,11 @@
1313
encoded_invoice: $encoded_invoice
1414
amount_msats: $amount_msats
1515
}}) {{
16-
payment {{
17-
...OutgoingPaymentFragment
16+
incoming_payment {{
17+
...IncomingPaymentFragment
1818
}}
1919
}}
2020
}}
2121
22-
{OutgoingPaymentFragment}
22+
{IncomingPaymentFragment}
2323
"""

0 commit comments

Comments
 (0)