mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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 pump from 'pump';
|
||||||
import { WindowPostMessageStream } from '@metamask/post-message-stream';
|
import { WindowPostMessageStream } from '@metamask/post-message-stream';
|
||||||
import ObjectMultiplex from 'obj-multiplex';
|
import ObjectMultiplex from 'obj-multiplex';
|
||||||
@ -363,10 +362,10 @@ function blockedDomainCheck() {
|
|||||||
*/
|
*/
|
||||||
function redirectToPhishingWarning(data = {}) {
|
function redirectToPhishingWarning(data = {}) {
|
||||||
console.debug('MetaMask: Routing to Phishing Warning page.');
|
console.debug('MetaMask: Routing to Phishing Warning page.');
|
||||||
|
const { hostname, href } = window.location;
|
||||||
|
const { newIssueUrl } = data;
|
||||||
const baseUrl = process.env.PHISHING_WARNING_PAGE_URL;
|
const baseUrl = process.env.PHISHING_WARNING_PAGE_URL;
|
||||||
window.location.href = `${baseUrl}#${querystring.stringify({
|
|
||||||
hostname: window.location.hostname,
|
const querystring = new URLSearchParams({ hostname, href, newIssueUrl });
|
||||||
href: window.location.href,
|
window.location.href = `${baseUrl}#${querystring}`;
|
||||||
newIssueUrl: data.newIssueUrl,
|
|
||||||
})}`;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user