From e357a3453300e2aaa790161224c2560274ab2016 Mon Sep 17 00:00:00 2001 From: sethkfman Date: Wed, 2 Aug 2023 10:00:13 -0600 Subject: [PATCH] remove unused function that was initally implemented so extension could have a single bundle --- app/util/sentryUtils.js | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/app/util/sentryUtils.js b/app/util/sentryUtils.js index a1556d425db..5cf1f94e4bc 100644 --- a/app/util/sentryUtils.js +++ b/app/util/sentryUtils.js @@ -72,17 +72,6 @@ function simplifyErrorMessages(report) { }); } -/** - * This function updates the request URL in the error report. - * It will take the origin and if there is none the with will provide "metamask-mobile" - * @param {Object} report - */ -function rewriteReportUrls(report) { - // update request url - console.log('rewriteReportUrls', report); - report.request.url = toMetamaskUrl(report.request.url); -} - function removeDeviceTimezone(report) { if (report.contexts && report.contexts.device) report.contexts.device.timezone = null; @@ -93,16 +82,6 @@ function removeDeviceName(report) { report.contexts.device.name = null; } -function toMetamaskUrl(origUrl) { - const filePath = origUrl?.split(location.origin)[1]; - if (!filePath) { - return origUrl; - } - - const metamaskUrl = 'metamask-mobile'; - return metamaskUrl; -} - function rewriteReport(report) { try { // simplify certain complex error messages (e.g. Ethjs) @@ -114,8 +93,6 @@ function rewriteReport(report) { // but putting the code here as well gives public visibility to how we are handling // privacy with respect to sentry. sanitizeAddressesFromErrorMessages(report); - // modify report urls - rewriteReportUrls(report); // remove device timezone removeDeviceTimezone(report); // remove device name