Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unused code to overwrite filenames for Sentry error reporting #6945

Merged
merged 6 commits into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions app/util/sentryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,6 @@ function simplifyErrorMessages(report) {
});
}

function rewriteReportUrls(report) {
// update request url
report.request.url = toMetamaskUrl();
// update exception stack trace
if (report.exception && report.exception.values) {
report.exception.values.forEach((item) => {
if (item.stacktrace) {
item.stacktrace.frames.forEach((frame) => {
frame.filename = toMetamaskUrl(frame.filename);
});
}
});
}
}

function removeDeviceTimezone(report) {
if (report.contexts && report.contexts.device)
report.contexts.device.timezone = null;
Expand All @@ -96,11 +81,6 @@ function removeDeviceName(report) {
report.contexts.device.name = null;
}

function toMetamaskUrl() {
const metamaskUrl = `metamask-mobile`;
return metamaskUrl;
}

function rewriteReport(report) {
try {
// simplify certain complex error messages (e.g. Ethjs)
Expand All @@ -112,8 +92,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
Loading