Skip to content

Commit

Permalink
fix: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
nada-deriv committed Jun 12, 2024
2 parents 7d72e98 + 0daa7a0 commit be57cd0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 13 deletions.
13 changes: 9 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
File renamed without changes.
30 changes: 22 additions & 8 deletions src/components/DerivIframe/DerivIframe.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
const DerivIframe = () => (
<iframe
id='localstorage-sync'
sandbox='allow-same-origin allow-scripts'
src='../../../../localstorage-sync.html'
style={{ display: 'none', visibility: 'hidden' }}
/>
);
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 (
<iframe
id='localstorage-sync'
sandbox='allow-same-origin allow-scripts'
src={`${origin}/localstorage-sync.html`}
style={{ display: 'none', visibility: 'hidden' }}
/>
);
};

export default DerivIframe;
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default defineConfig({
},
},
plugins: [react(), svgr()],
publicDir: 'public',
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
Expand Down

0 comments on commit be57cd0

Please sign in to comment.