@ranty/ranty-sdk 2.8.0-beta.0 → 2.8.0-beta.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.
@@ -7102,10 +7102,10 @@ function nI(r, e, t, s) {
7102
7102
  }
7103
7103
  var Xu = I_(nI);
7104
7104
  r7(Na(), "DD_LOGS", Xu);
7105
- const iI = "@nx-ranty/ranty-sdk", oI = "2.8.0-beta.0", aI = 2, lI = !0, dI = {
7105
+ const iI = "@nx-ranty/ranty-sdk", oI = "2.8.0-beta.1", aI = 2, lI = !0, dI = {
7106
7106
  "": {
7107
7107
  name: "@nx-ranty/ranty-sdk",
7108
- version: "2.8.0-beta.0",
7108
+ version: "2.8.0-beta.1",
7109
7109
  license: "ISC",
7110
7110
  dependencies: {
7111
7111
  "@datadog/browser-logs": "^5.7.0",
@@ -60682,7 +60682,7 @@ let gs = class r extends Ze {
60682
60682
  }
60683
60683
  webSocket() {
60684
60684
  return _e(this, null, function* () {
60685
- var e, t, s;
60685
+ var e;
60686
60686
  if (Qt.getConfig().VITE_ENV !== "sandbox")
60687
60687
  try {
60688
60688
  yield I1(this.stateScof.statePaymentRequest.id), xe.info("webSocket", {
@@ -60690,15 +60690,10 @@ let gs = class r extends Ze {
60690
60690
  tag: "WEBSOCKET",
60691
60691
  origin_sdk: Ws,
60692
60692
  contextObject: {
60693
- payment_request_id: this.stateScofProps.paymentRequestId,
60694
- contextObject: {
60695
- duration_context: fn.endPayment(),
60696
- payment_request_id: (e = this.stateScof.statePaymentRequest) == null ? void 0 : e.id,
60697
- payment_request_status: (t = this.stateScof.statePaymentRequest) == null ? void 0 : t.status
60698
- }
60693
+ payment_request_id: this.stateScofProps.paymentRequestId
60699
60694
  }
60700
60695
  }), yield this.getPaymentRequestAndRedirectToStatus();
60701
- } catch (n) {
60696
+ } catch (t) {
60702
60697
  Ot("WEB_SOCKET_ERROR", "Web socket connection failed."), this.defaultMessageError(), xe.error(
60703
60698
  "webSocket",
60704
60699
  {
@@ -60709,37 +60704,45 @@ let gs = class r extends Ze {
60709
60704
  payment_request_id: this.stateScofProps.paymentRequestId
60710
60705
  }
60711
60706
  },
60712
- n
60707
+ t
60713
60708
  );
60714
60709
  } finally {
60715
- let n = Nn.messages.find((a) => a.status === this.statusMessage);
60716
- const i = this.stateScof.statePaymentRequest, o = i.transactions[0].auth_data.code;
60717
- i.status === Qs.FAILURE_PROCESSED && ((s = i.transactions[0].auth_data) != null && s.code) && (n = hh(o), Ot(n.status, o)), i.status === Qs.SUCCESS_PROCESSED && (n = fh(i.payment_type), Ot(n.status, "")), i.status === Qs.BLOCKED && (n = mh(i.payment_type), Ot(n.status, o)), n && (xe.info("webSocket", {
60710
+ let t = Nn.messages.find((i) => i.status === this.statusMessage);
60711
+ const s = this.stateScof.statePaymentRequest, n = s.transactions[0].auth_data.code;
60712
+ s.status === Qs.FAILURE_PROCESSED && ((e = s.transactions[0].auth_data) != null && e.code) && (t = hh(n), Ot(t.status, n)), s.status === Qs.SUCCESS_PROCESSED && (t = fh(s.payment_type), Ot(t.status, "")), s.status === Qs.BLOCKED && (t = mh(s.payment_type), Ot(t.status, n)), t && (xe.info("webSocket", {
60718
60713
  context: et.CARD_ON_FILE,
60719
60714
  tag: "WEBSOCKET_STATUS",
60720
60715
  origin_sdk: Ws,
60721
60716
  contextObject: {
60722
60717
  payment_request_id: this.stateScofProps.paymentRequestId,
60723
- message: n
60718
+ message: t
60724
60719
  }
60725
- }), this.stateStatus.title = n.title, this.stateStatus.subtitle = n.subtitle, this.stateStatus.icon = n.icon, this.stateStatus.status = n.status, this.stateStatus.name = n.name, this.stateStatus.returnButton = n.returnButton, this.stateStatus.nameReturnButton = n.nameReturnButton), this.createEvent("button-pushed", ct.STATUS);
60720
+ }), this.stateStatus.title = t.title, this.stateStatus.subtitle = t.subtitle, this.stateStatus.icon = t.icon, this.stateStatus.status = t.status, this.stateStatus.name = t.name, this.stateStatus.returnButton = t.returnButton, this.stateStatus.nameReturnButton = t.nameReturnButton), this.createEvent("button-pushed", ct.STATUS);
60726
60721
  }
60727
60722
  });
60728
60723
  }
60729
60724
  getPaymentRequestAndRedirectToStatus() {
60730
60725
  return _e(this, null, function* () {
60726
+ var e, t, s, n, i, o, a;
60731
60727
  try {
60732
- const e = yield m1(this.stateScof.statePaymentRequest.id);
60733
- this.stateScof.statePaymentRequest = e.response, this.statusMessage = e.response.status, xe.info("getPaymentRequestAndRedirectToStatus", {
60728
+ const d = yield m1(this.stateScof.statePaymentRequest.id);
60729
+ this.stateScof.statePaymentRequest = d.response, this.statusMessage = d.response.status, xe.info("paymentDuration", {
60734
60730
  context: et.CARD_ON_FILE,
60735
- tag: "GET_PAYMENT_REQUEST_AND_REDIRECT_TO_STATUS",
60731
+ tag: "PAYMENT_DURATION",
60736
60732
  origin_sdk: Ws,
60737
60733
  contextObject: {
60738
60734
  payment_request_id: this.stateScofProps.paymentRequestId,
60739
- paymentRequest: e.response
60735
+ contextObject: {
60736
+ duration_context: fn.endPayment(),
60737
+ payment_request_id: (e = this.stateScof.statePaymentRequest) == null ? void 0 : e.id,
60738
+ payment_request_status: (t = this.stateScof.statePaymentRequest) == null ? void 0 : t.status,
60739
+ card_name: (n = (s = this.stateScof.statePaymentRequest) == null ? void 0 : s.transactions[0].payment_method) == null ? void 0 : n.name,
60740
+ card_type: (o = (i = this.stateScof.statePaymentRequest) == null ? void 0 : i.transactions[0].payment_method) == null ? void 0 : o.card_type,
60741
+ payment_type: (a = this.stateScof.statePaymentRequest) == null ? void 0 : a.payment_type
60742
+ }
60740
60743
  }
60741
60744
  });
60742
- } catch (e) {
60745
+ } catch (d) {
60743
60746
  Ot("PAYMENT_REQUEST_ERROR", "Payment request failed."), this.statusMessage = "UNKNOWN_ERROR", xe.error(
60744
60747
  "getPaymentRequestAndRedirectToStatus",
60745
60748
  {
@@ -60750,7 +60753,7 @@ let gs = class r extends Ze {
60750
60753
  payment_request_id: this.stateScofProps.paymentRequestId
60751
60754
  }
60752
60755
  },
60753
- e
60756
+ d
60754
60757
  );
60755
60758
  } finally {
60756
60759
  this.stateStatus.isStart = !1, this.stateStatus.isQRPaid = !1;
@@ -79490,7 +79493,7 @@ function(r) {
79490
79493
  */
79491
79494
  function(r) {
79492
79495
  function e() {
79493
- return (ut.canvg ? Promise.resolve(ut.canvg) : import("./index.es-b9e067dd.js")).catch(function(t) {
79496
+ return (ut.canvg ? Promise.resolve(ut.canvg) : import("./index.es-897d0767.js")).catch(function(t) {
79494
79497
  return Promise.reject(new Error("Could not load canvg: " + t));
79495
79498
  }).then(function(t) {
79496
79499
  return t.default ? t.default : t;
@@ -1,4 +1,4 @@
1
- import { c as Ke, _ as za, g as _o } from "./index-a6ae088e.js";
1
+ import { c as Ke, _ as za, g as _o } from "./index-7c104df0.js";
2
2
  var vt = function(a) {
3
3
  return a && a.Math === Math && a;
4
4
  }, V = (
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as s, w as t, f as e, e as o, n as r, p as C, O as m, o as p, q as l, m as d, r as i, C as u, u as y, R as P, j as F, a as S, d as c, D as M, l as O, E as I, v as k, b as x, F as f, k as H, Z as L, a0 as v, N as A, P as D, L as g, x as E, U as w, V as Q, T as h, a1 as B, W as N, X as R, Y as b, i as j, h as q, $ as z, S as G, y as J, t as K, z as T, B as U, G as V, s as W, H as X, I as Y, J as Z, M as $, Q as _, K as aa } from "./index-a6ae088e.js";
1
+ import { A as s, w as t, f as e, e as o, n as r, p as C, O as m, o as p, q as l, m as d, r as i, C as u, u as y, R as P, j as F, a as S, d as c, D as M, l as O, E as I, v as k, b as x, F as f, k as H, Z as L, a0 as v, N as A, P as D, L as g, x as E, U as w, V as Q, T as h, a1 as B, W as N, X as R, Y as b, i as j, h as q, $ as z, S as G, y as J, t as K, z as T, B as U, G as V, s as W, H as X, I as Y, J as Z, M as $, Q as _, K as aa } from "./index-7c104df0.js";
2
2
  export {
3
3
  s as AppHome,
4
4
  t as AppLoading,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranty/ranty-sdk",
3
- "version": "2.8.0-beta.0",
3
+ "version": "2.8.0-beta.1",
4
4
  "description": "Ranty sdk",
5
5
  "main": "dist/index.js",
6
6
  "exports": {