Skip to content

Commit

Permalink
chore: updated iframe url
Browse files Browse the repository at this point in the history
  • Loading branch information
shayan-deriv committed Jun 12, 2024
1 parent 126cd34 commit 861c291
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/DerivIframe/DerivIframe.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import { URLConstants } from '@deriv-com/utils';

const DerivIframe = () => {
const origin = URLConstants.derivP2pProduction;
const getAllowedLocalStorageOrigin = () => {
if (/^staging-p2p\.deriv\.com$/i.test(window.location.hostname)) {
return 'http://staging-p2p.deriv.com';
} else if (/^p2p\.deriv\.com$/i.test(window.location.hostname)) {
return URLConstants.derivP2pProduction;
}
return URLConstants.derivP2pProduction;
};

const origin = getAllowedLocalStorageOrigin();

return (
<iframe
id='localstorage-sync'
Expand Down

0 comments on commit 861c291

Please sign in to comment.