mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Remove usage of querystring from contentscript (#15112)
This commit is contained in:
parent
17e7df7cd8
commit
c66c8aba63
@ -1,4 +1,3 @@
|
||||
import querystring from 'querystring';
|
||||
import pump from 'pump';
|
||||
import { WindowPostMessageStream } from '@metamask/post-message-stream';
|
||||
import ObjectMultiplex from 'obj-multiplex';
|
||||
@ -363,10 +362,10 @@ function blockedDomainCheck() {
|
||||
*/
|
||||
function redirectToPhishingWarning(data = {}) {
|
||||
console.debug('MetaMask: Routing to Phishing Warning page.');
|
||||
const { hostname, href } = window.location;
|
||||
const { newIssueUrl } = data;
|
||||
const baseUrl = process.env.PHISHING_WARNING_PAGE_URL;
|
||||
window.location.href = `${baseUrl}#${querystring.stringify({
|
||||
hostname: window.location.hostname,
|
||||
href: window.location.href,
|
||||
newIssueUrl: data.newIssueUrl,
|
||||
})}`;
|
||||
|
||||
const querystring = new URLSearchParams({ hostname, href, newIssueUrl });
|
||||
window.location.href = `${baseUrl}#${querystring}`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user