@lightsparkdev/lightspark-sdk 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lightsparkdev/lightspark-sdk
2
2
 
3
+ ## 1.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 338e641: Fix a bug in parsing a successful uma payment
8
+
3
9
  ## 1.3.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -1949,7 +1949,7 @@ var import_core9 = require("@lightsparkdev/core");
1949
1949
  // package.json
1950
1950
  var package_default = {
1951
1951
  name: "@lightsparkdev/lightspark-sdk",
1952
- version: "1.3.0",
1952
+ version: "1.3.1",
1953
1953
  description: "Lightspark JS SDK",
1954
1954
  author: "Lightspark Inc.",
1955
1955
  keywords: [
@@ -12212,13 +12212,13 @@ var LightsparkClient = class {
12212
12212
  variables,
12213
12213
  payerNodeId
12214
12214
  );
12215
- if (response.pay_invoice?.payment.outgoing_payment_failure_message) {
12215
+ if (response.pay_uma_invoice?.payment.outgoing_payment_failure_message) {
12216
12216
  throw new import_core9.LightsparkException(
12217
12217
  "PaymentError",
12218
- response.pay_invoice?.payment.outgoing_payment_failure_message.rich_text_text
12218
+ response.pay_uma_invoice?.payment.outgoing_payment_failure_message.rich_text_text
12219
12219
  );
12220
12220
  }
12221
- return response.pay_uma_invoice && OutgoingPaymentFromJson(response.pay_invoice.payment);
12221
+ return response.pay_uma_invoice && OutgoingPaymentFromJson(response.pay_uma_invoice.payment);
12222
12222
  }
12223
12223
  /**
12224
12224
  * Waits for a transaction to have a completed status, and returns the
package/dist/index.js CHANGED
@@ -144,7 +144,7 @@ import {
144
144
  // package.json
145
145
  var package_default = {
146
146
  name: "@lightsparkdev/lightspark-sdk",
147
- version: "1.3.0",
147
+ version: "1.3.1",
148
148
  description: "Lightspark JS SDK",
149
149
  author: "Lightspark Inc.",
150
150
  keywords: [
@@ -1743,13 +1743,13 @@ var LightsparkClient = class {
1743
1743
  variables,
1744
1744
  payerNodeId
1745
1745
  );
1746
- if (response.pay_invoice?.payment.outgoing_payment_failure_message) {
1746
+ if (response.pay_uma_invoice?.payment.outgoing_payment_failure_message) {
1747
1747
  throw new LightsparkException(
1748
1748
  "PaymentError",
1749
- response.pay_invoice?.payment.outgoing_payment_failure_message.rich_text_text
1749
+ response.pay_uma_invoice?.payment.outgoing_payment_failure_message.rich_text_text
1750
1750
  );
1751
1751
  }
1752
- return response.pay_uma_invoice && OutgoingPaymentFromJson(response.pay_invoice.payment);
1752
+ return response.pay_uma_invoice && OutgoingPaymentFromJson(response.pay_uma_invoice.payment);
1753
1753
  }
1754
1754
  /**
1755
1755
  * Waits for a transaction to have a completed status, and returns the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/lightspark-sdk",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
package/src/client.ts CHANGED
@@ -827,16 +827,16 @@ class LightsparkClient {
827
827
  variables,
828
828
  payerNodeId,
829
829
  );
830
- if (response.pay_invoice?.payment.outgoing_payment_failure_message) {
830
+ if (response.pay_uma_invoice?.payment.outgoing_payment_failure_message) {
831
831
  throw new LightsparkException(
832
832
  "PaymentError",
833
- response.pay_invoice?.payment.outgoing_payment_failure_message
833
+ response.pay_uma_invoice?.payment.outgoing_payment_failure_message
834
834
  .rich_text_text,
835
835
  );
836
836
  }
837
837
  return (
838
838
  response.pay_uma_invoice &&
839
- OutgoingPaymentFromJson(response.pay_invoice.payment)
839
+ OutgoingPaymentFromJson(response.pay_uma_invoice.payment)
840
840
  );
841
841
  }
842
842