Skip to content

Commit

Permalink
chore: cleanup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AugmentedMode committed Oct 16, 2024
1 parent 40440b1 commit 4e706a8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,19 @@ function start() {
// To know when the event listener has been added, to mitigate an e2e race condition
continueLink.setAttribute('data-testid', 'unsafe-continue-loaded');

// Add event listener for portfolio link (replacement for back-to-safety)
const portfolioLink = document.getElementById('portfolio-link');
if (!portfolioLink) {
throw new Error('Unable to locate portfolio link');
}

portfolioLink.addEventListener('click', async () => {
// Write to phishingSafelistStream as before
phishingSafelistStream.write({
jsonrpc: '2.0',
method: 'backToSafetyPhishingWarning', // Keeping method name consistent
method: 'backToSafetyPhishingWarning',
params: [],
id: createRandomId(),
});

// Redirect to MetaMask portfolio
window.location.href =
'https://portfolio.metamask.io/?metamaskEntry=phishing_page_portfolio_button&marketingEnabled=true';
});
Expand Down

0 comments on commit 4e706a8

Please sign in to comment.