@zerohash-sdk/crypto-withdrawals-react 1.15.15 → 1.15.17

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/dist/index.d.ts CHANGED
@@ -143,6 +143,12 @@ declare interface CryptoWithdrawalsProps {
143
143
  * embeddings ignore it.
144
144
  */
145
145
  appRedirectUrl?: string;
146
+ /**
147
+ * App-scoped URI the native SDK receives the OAuth callback on, such as
148
+ * `connectsdk-oauth://com.partner.app`. Set by the Android SDK shell only.
149
+ * Browser embeddings ignore it.
150
+ */
151
+ oauthCallbackUri?: string;
146
152
  /**
147
153
  * Callback invoked when the crypto withdrawal flow is successfully completed.
148
154
  *
package/dist/index.js CHANGED
@@ -125,7 +125,7 @@ var s = {
125
125
  return E ? (T(E, !1), () => {
126
126
  b = !0, C();
127
127
  }) : m;
128
- }, y = {
128
+ }, y = () => "1.15.17", b = {
129
129
  local: {
130
130
  BASE_URL: "/",
131
131
  DEV: !1,
@@ -152,34 +152,34 @@ var s = {
152
152
  prod: "https://sdk-cdn.zerohash.com",
153
153
  "eu-cert": "https://sdk-cdn.cert.zerohash.eu",
154
154
  "eu-prod": "https://sdk-cdn.zerohash.eu"
155
- }, b = "https://sdk-cdn.gating.0hash.com", x = (e, t, n = {}) => {
156
- let { eu: r = !1, legacyAliases: i = !1, local: a = y.local } = n, o = (n) => `${n}/${e}/${t}`, s = {
155
+ }, x = "https://sdk-cdn.gating.0hash.com", S = (e, t, n = {}) => {
156
+ let { eu: r = !1, legacyAliases: i = !1, local: a = b.local } = n, o = (n) => `${n}/${e}/${t}`, s = {
157
157
  local: o(a),
158
- dev: o(y.dev),
159
- gating: o(b),
160
- cert: o(y.cert),
161
- prod: o(y.prod)
158
+ dev: o(b.dev),
159
+ gating: o(x),
160
+ cert: o(b.cert),
161
+ prod: o(b.prod)
162
162
  };
163
- return i && (s.sandbox = o(y.cert), s.production = o(y.prod)), r && (s["eu-cert"] = o(y["eu-cert"]), s["eu-prod"] = o(y["eu-prod"])), s;
163
+ return i && (s.sandbox = o(b.cert), s.production = o(b.prod)), r && (s["eu-cert"] = o(b["eu-cert"]), s["eu-prod"] = o(b["eu-prod"])), s;
164
164
  };
165
- [...Object.entries(y).filter(([e]) => e !== "local").map(([, e]) => e)], {
165
+ [...Object.entries(b).filter(([e]) => e !== "local").map(([, e]) => e)], {
166
166
  LOADED: "travel_rule_loaded",
167
167
  COMPLETED: "travel_rule_completed"
168
168
  }.LOADED;
169
169
  //#endregion
170
170
  //#region ../../../common/callbacks/dist/shared/models.js
171
- var S;
171
+ var C;
172
172
  (function(e) {
173
173
  e.NETWORK_ERROR = "network_error", e.AUTH_ERROR = "auth_error", e.NOT_FOUND_ERROR = "not_found_error", e.VALIDATION_ERROR = "validation_error", e.SERVER_ERROR = "server_error", e.CLIENT_ERROR = "client_error", e.UNKNOWN_ERROR = "unknown_error";
174
- })(S ||= {});
174
+ })(C ||= {});
175
175
  //#endregion
176
176
  //#region ../../../common/react-sdk-base/dist/script-load-fallback.js
177
- var C = {
177
+ var w = {
178
178
  evergreen: "#00381D",
179
179
  green: "#CCFFD0",
180
180
  offBlack: "#1C1B1C",
181
181
  grayLight: "#EBEBE9"
182
- }, w = ({ onRetry: n, onClose: r }) => t("div", {
182
+ }, T = ({ onRetry: n, onClose: r }) => t("div", {
183
183
  role: "alert",
184
184
  style: {
185
185
  position: "relative",
@@ -192,9 +192,9 @@ var C = {
192
192
  padding: "32px 24px",
193
193
  textAlign: "center",
194
194
  fontFamily: "inherit",
195
- color: C.offBlack,
195
+ color: w.offBlack,
196
196
  background: "#FFFFFF",
197
- border: `1px solid ${C.grayLight}`,
197
+ border: `1px solid ${w.grayLight}`,
198
198
  borderRadius: "12px"
199
199
  },
200
200
  children: [
@@ -208,7 +208,7 @@ var C = {
208
208
  right: "12px",
209
209
  display: "flex",
210
210
  padding: "4px",
211
- color: C.offBlack,
211
+ color: w.offBlack,
212
212
  background: "none",
213
213
  border: "none",
214
214
  cursor: "pointer",
@@ -237,7 +237,7 @@ var C = {
237
237
  "aria-hidden": "true",
238
238
  children: e("path", {
239
239
  d: "M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",
240
- stroke: C.evergreen,
240
+ stroke: w.evergreen,
241
241
  strokeWidth: "1.5",
242
242
  strokeLinecap: "round",
243
243
  strokeLinejoin: "round"
@@ -268,8 +268,8 @@ var C = {
268
268
  fontSize: "14px",
269
269
  fontWeight: 600,
270
270
  fontFamily: "inherit",
271
- color: C.green,
272
- background: C.evergreen,
271
+ color: w.green,
272
+ background: w.evergreen,
273
273
  border: "none",
274
274
  borderRadius: "8px",
275
275
  cursor: "pointer"
@@ -277,12 +277,12 @@ var C = {
277
277
  children: "Try again"
278
278
  })
279
279
  ]
280
- }), T = (e, t) => {
280
+ }), E = (e, t) => {
281
281
  i(() => {
282
282
  let n = e.current;
283
283
  if (n) for (let [e, r] of Object.entries(t)) r !== void 0 && Reflect.set(n, e, r);
284
284
  });
285
- }, E = (e) => {
285
+ }, D = (e) => {
286
286
  let { webComponentTag: t, appName: n, appVersion: a, scriptUrls: c, fallbackScriptUrls: l, collectorUrls: u, env: d, jwt: f, timeoutMs: p } = e, [m, h] = o(!1), [g, _] = o(0);
287
287
  return i(() => (h(!1), v({
288
288
  webComponentTag: t,
@@ -310,34 +310,36 @@ var C = {
310
310
  loadFailed: m,
311
311
  retry: r(() => _((e) => e + 1), [])
312
312
  };
313
- }, D = x("crypto-withdrawals-web", "index.js", { eu: !0 }), O = "zerohash-crypto-withdrawals", k = ({ jwt: t, env: r = "prod", theme: i, appRedirectUrl: o, onCompleted: s, onFailed: c, onError: l, onClose: u, onLoaded: d, onEvent: f, ...p }) => {
314
- let m = a(null);
315
- T(m, {
313
+ }, O = S("crypto-withdrawals-web", "index.js", { eu: !0 }), k = "zerohash-crypto-withdrawals", A = ({ jwt: t, env: r = "prod", theme: i, appRedirectUrl: o, oauthCallbackUri: s, onCompleted: c, onFailed: l, onError: u, onClose: d, onLoaded: f, onEvent: p, ...m }) => {
314
+ let h = a(null);
315
+ E(h, {
316
316
  theme: i,
317
- onCompleted: s,
318
- onFailed: c,
319
- onError: l,
320
- onClose: u,
321
- onLoaded: d,
322
- onEvent: f
317
+ onCompleted: c,
318
+ onFailed: l,
319
+ onError: u,
320
+ onClose: d,
321
+ onLoaded: f,
322
+ onEvent: p
323
323
  });
324
- let { loadFailed: h, retry: g } = E({
325
- webComponentTag: O,
326
- scriptUrls: D,
324
+ let { loadFailed: g, retry: _ } = D({
325
+ webComponentTag: k,
326
+ scriptUrls: O,
327
327
  env: r,
328
328
  jwt: t
329
329
  });
330
- return h ? /* @__PURE__ */ e(w, {
331
- onRetry: g,
332
- onClose: u
333
- }) : n.createElement(O, {
334
- ref: m,
330
+ return g ? /* @__PURE__ */ e(T, {
331
+ onRetry: _,
332
+ onClose: d
333
+ }) : n.createElement(k, {
334
+ ref: h,
335
335
  jwt: t,
336
336
  env: r,
337
+ sdkversion: y(),
337
338
  theme: i,
338
339
  appredirecturl: o,
339
- ...p
340
+ oauthcallbackuri: s,
341
+ ...m
340
342
  });
341
343
  };
342
344
  //#endregion
343
- export { k as CryptoWithdrawals };
345
+ export { A as CryptoWithdrawals };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerohash-sdk/crypto-withdrawals-react",
3
- "version": "1.15.15",
3
+ "version": "1.15.17",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",