@vpdev2/metakyc 1.0.72 → 1.0.73
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/client/http-client.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -329,13 +329,12 @@ class nr {
|
|
|
329
329
|
(a) => Promise.reject(a)
|
|
330
330
|
), this.axiosInstance.interceptors.response.use(
|
|
331
331
|
async (a) => {
|
|
332
|
-
|
|
333
|
-
if (this.isEncryptionActive() && ((r = a.headers) == null ? void 0 : r["x-sdk-encrypted"]) === "1")
|
|
332
|
+
if (this.isEncryptionActive() && a.data && typeof a.data == "object" && typeof a.data.iv == "string" && typeof a.data.data == "string" && !a.data.result)
|
|
334
333
|
try {
|
|
335
|
-
const
|
|
336
|
-
a.data = JSON.parse(
|
|
337
|
-
} catch (
|
|
338
|
-
Y.debug(`Failed to decrypt response: ${(
|
|
334
|
+
const r = a.data, n = await ar(this.config.encryptionKey, r);
|
|
335
|
+
a.data = JSON.parse(n);
|
|
336
|
+
} catch (r) {
|
|
337
|
+
Y.debug(`Failed to decrypt response: ${(r == null ? void 0 : r.message) || r} — passing through as-is`), console.warn("[SDK-ENC] Decrypt failed:", (r == null ? void 0 : r.message) || r);
|
|
339
338
|
}
|
|
340
339
|
return a;
|
|
341
340
|
},
|
|
@@ -6975,7 +6974,7 @@ function oe(e, t) {
|
|
|
6975
6974
|
const r = Xr.exec(a);
|
|
6976
6975
|
return r ? t(r[1]) : e;
|
|
6977
6976
|
}
|
|
6978
|
-
const Yt = "1.0.
|
|
6977
|
+
const Yt = "1.0.73", Ni = _t(null), ci = `metakyc-translations-${Yt}-`, Zr = ({
|
|
6979
6978
|
locale: e,
|
|
6980
6979
|
fetchTranslations: t,
|
|
6981
6980
|
children: a
|