diff --git a/package-lock.json b/package-lock.json
index c01b7b03..95fedb04 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,7 +12,7 @@
"@deriv-com/api-hooks": "^1.1.1",
"@deriv-com/translations": "^1.2.4",
"@deriv-com/ui": "^1.28.0",
- "@deriv-com/utils": "latest",
+ "@deriv-com/utils": "^0.0.25",
"@deriv/deriv-api": "^1.0.15",
"@deriv/quill-design": "^1.2.24",
"@deriv/quill-icons": "^1.22.10",
@@ -2620,6 +2620,11 @@
"@rollup/rollup-linux-x64-gnu": "^4.18.0"
}
},
+ "node_modules/@deriv-com/api-hooks/node_modules/@deriv-com/utils": {
+ "version": "0.0.24",
+ "resolved": "https://registry.npmjs.org/@deriv-com/utils/-/utils-0.0.24.tgz",
+ "integrity": "sha512-dK9H6GfI/DB7eRTjZS3+K9cEg3gZlCJV+zmDL27OpRHSyddrw2Z//PuMq3WZxtXTGuHt3g7TLDUP7PdvXL8DdA=="
+ },
"node_modules/@deriv-com/eslint-config-deriv": {
"version": "2.1.0-beta.3",
"resolved": "https://registry.npmjs.org/@deriv-com/eslint-config-deriv/-/eslint-config-deriv-2.1.0-beta.3.tgz",
@@ -2683,9 +2688,9 @@
}
},
"node_modules/@deriv-com/utils": {
- "version": "0.0.24",
- "resolved": "https://registry.npmjs.org/@deriv-com/utils/-/utils-0.0.24.tgz",
- "integrity": "sha512-dK9H6GfI/DB7eRTjZS3+K9cEg3gZlCJV+zmDL27OpRHSyddrw2Z//PuMq3WZxtXTGuHt3g7TLDUP7PdvXL8DdA=="
+ "version": "0.0.25",
+ "resolved": "https://registry.npmjs.org/@deriv-com/utils/-/utils-0.0.25.tgz",
+ "integrity": "sha512-zIJLDHgc8Aja+u8YDZ0FVNbMX8DQB3T+ioRzwIj8SevEo/VDEke1IUMxJe5PXCHYNs7ml2mB/mXSfLOr7KGqdA=="
},
"node_modules/@deriv/api-types": {
"version": "1.0.801",
diff --git a/package.json b/package.json
index b92b9524..6c72525b 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
"@deriv-com/api-hooks": "^1.1.1",
"@deriv-com/translations": "^1.2.4",
"@deriv-com/ui": "^1.28.0",
- "@deriv-com/utils": "latest",
+ "@deriv-com/utils": "^0.0.25",
"@deriv/deriv-api": "^1.0.15",
"@deriv/quill-design": "^1.2.24",
"@deriv/quill-icons": "^1.22.10",
diff --git a/localstorage-sync.html b/public/localstorage-sync.html
similarity index 100%
rename from localstorage-sync.html
rename to public/localstorage-sync.html
diff --git a/src/components/DerivIframe/DerivIframe.tsx b/src/components/DerivIframe/DerivIframe.tsx
index 5da42b5d..8b56f3f1 100644
--- a/src/components/DerivIframe/DerivIframe.tsx
+++ b/src/components/DerivIframe/DerivIframe.tsx
@@ -1,10 +1,24 @@
-const DerivIframe = () => (
-
-);
+import { URLConstants } from '@deriv-com/utils';
+
+const DerivIframe = () => {
+ const getAllowedLocalStorageOrigin = () => {
+ if (/^staging-p2p\.deriv\.com$/i.test(window.location.hostname)) {
+ return URLConstants.derivP2pStaging;
+ }
+
+ return URLConstants.derivP2pProduction;
+ };
+
+ const origin = getAllowedLocalStorageOrigin();
+
+ return (
+
+ );
+};
export default DerivIframe;
diff --git a/vite.config.ts b/vite.config.ts
index f8bc18c8..5737718b 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -23,6 +23,7 @@ export default defineConfig({
},
},
plugins: [react(), svgr()],
+ publicDir: 'public',
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),