File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1- import querystring from 'querystring' ;
21import pump from 'pump' ;
32import { WindowPostMessageStream } from '@metamask/post-message-stream' ;
43import ObjectMultiplex from 'obj-multiplex' ;
@@ -363,10 +362,10 @@ function blockedDomainCheck() {
363362 */
364363function redirectToPhishingWarning ( data = { } ) {
365364 console . debug ( 'MetaMask: Routing to Phishing Warning page.' ) ;
365+ const { hostname, href } = window . location ;
366+ const { newIssueUrl } = data ;
366367 const baseUrl = process . env . PHISHING_WARNING_PAGE_URL ;
367- window . location . href = `${ baseUrl } #${ querystring . stringify ( {
368- hostname : window . location . hostname ,
369- href : window . location . href ,
370- newIssueUrl : data . newIssueUrl ,
371- } ) } `;
368+
369+ const querystring = new URLSearchParams ( { hostname, href, newIssueUrl } ) ;
370+ window . location . href = `${ baseUrl } #${ querystring } ` ;
372371}
You can’t perform that action at this time.
0 commit comments