Skip to content

Commit

Permalink
remove unused function that was initally implemented so extension cou…
Browse files Browse the repository at this point in the history
…ld have a single bundle
  • Loading branch information
sethkfman committed Aug 2, 2023
1 parent b5a9e1a commit e357a34
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions app/util/sentryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit e357a34

Please sign in to comment.