File tree 2 files changed +6
-2
lines changed
src/components/DerivIframe
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 23
23
switch ( message . data . key ) {
24
24
case 'active_loginid' : {
25
25
if ( localStorage . getItem ( message . data . key ) !== message . data . value ) {
26
+ console . log ( 'setting p2p localStorage for active_loginid' ) ;
26
27
localStorage . setItem ( message . data . key , message . data . value ) ;
27
28
}
28
29
break ;
29
30
}
30
31
case 'client.accounts' : {
31
32
if ( localStorage . getItem ( message . data . key ) !== message . data . value ) {
33
+ console . log ( 'setting p2p localStorage for client.accounts' ) ;
32
34
localStorage . setItem ( message . data . key , message . data . value ) ;
33
35
}
34
36
break ;
Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ import { URLConstants } from '@deriv-com/utils';
2
2
3
3
const DerivIframe = ( ) => {
4
4
const getAllowedLocalStorageOrigin = ( ) => {
5
- if ( / ^ s t a g i n g - p 2 p \. d e r i v \. c o m $ / i. test ( window . location . hostname ) ) {
5
+ const hostName = window . location . hostname ;
6
+ if ( / ^ s t a g i n g - p 2 p \. d e r i v \. c o m $ / i. test ( hostName ) ) {
6
7
return URLConstants . derivP2pStaging ;
8
+ } else if ( / ^ l o c a l h o s t $ / i. test ( hostName ) ) {
9
+ return window . location . origin ;
7
10
}
8
-
9
11
return URLConstants . derivP2pProduction ;
10
12
} ;
11
13
You can’t perform that action at this time.
0 commit comments