@moonpay/platform-sdk-core 1.14.0 → 1.15.2
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.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ __export(index_exports, {
|
|
|
23
23
|
FRAME_PATHS: () => FRAME_PATHS,
|
|
24
24
|
TRUSTED_FRAME_ORIGIN_PATTERNS: () => TRUSTED_FRAME_ORIGIN_PATTERNS,
|
|
25
25
|
apiFetch: () => apiFetch,
|
|
26
|
+
applyClientTokenParam: () => applyClientTokenParam,
|
|
26
27
|
applyPresentationParam: () => applyPresentationParam,
|
|
27
28
|
applyThemeParam: () => applyThemeParam,
|
|
28
29
|
buildFrameUrl: () => buildFrameUrl,
|
|
@@ -1742,6 +1743,14 @@ function applyPresentationParam(url, presentation) {
|
|
|
1742
1743
|
}
|
|
1743
1744
|
return parsed.href;
|
|
1744
1745
|
}
|
|
1746
|
+
function applyClientTokenParam(url, clientToken) {
|
|
1747
|
+
if (!clientToken) return url;
|
|
1748
|
+
const parsed = new URL(url);
|
|
1749
|
+
if (!parsed.searchParams.has("clientToken")) {
|
|
1750
|
+
parsed.searchParams.set("clientToken", clientToken);
|
|
1751
|
+
}
|
|
1752
|
+
return parsed.href;
|
|
1753
|
+
}
|
|
1745
1754
|
/*! Bundled license information:
|
|
1746
1755
|
|
|
1747
1756
|
@noble/ciphers/esm/utils.js:
|