Skip to content

Commit

Permalink
fixes lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
aristidesstaffieri committed Aug 19, 2024
1 parent 5924f68 commit c129cb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion @shared/api/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ export const getAccountIndexerBalances = async (
}

if ("error" in data && (data?.error?.horizon || data?.error?.soroban)) {
const _err = JSON.stringify(data.error);
captureException(
`Failed to fetch account balances - ${response.status}: ${response.statusText}`,
);
Expand Down
4 changes: 3 additions & 1 deletion extension/src/popup/components/ErrorTracking/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Integrations } from "@sentry/tracing";
import { SENTRY_KEY } from "constants/env";
import { settingsDataSharingSelector } from "popup/ducks/settings";
import { scrubPathGkey } from "popup/helpers/formatters";
import packageJson from "../../../../package.json";
import { INDEXER_URL } from "@shared/constants/mercury";
import packageJson from "../../../../package.json";

export const ErrorTracking = () => {
const isDataSharingAllowed = useSelector(settingsDataSharingSelector);
Expand All @@ -30,12 +30,14 @@ export const ErrorTracking = () => {
if (url?.includes(`${INDEXER_URL}/account-history`)) {
const route = "account-history/";
const scrubbedUrl = scrubPathGkey(route, url);
// eslint-disable-next-line no-param-reassign
event.request.url = scrubbedUrl;
}

if (url?.includes(`${INDEXER_URL}/account-balances`)) {
const route = "account-balances/";
const scrubbedUrl = scrubPathGkey(route, url);
// eslint-disable-next-line no-param-reassign
event.request.url = scrubbedUrl;
}

Expand Down
2 changes: 1 addition & 1 deletion extension/src/popup/helpers/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const scrubPathGkey = (route: string, url: string) => {
try {
const [base, slug] = url.split(route);
const end = slug.indexOf("?") === -1 ? slug.length : slug.indexOf("?");
return `${base}${route}` + "REDACTED" + slug.substring(end);
return `${base}${route}${"REDACTED"}${slug.substring(end)}`;
} catch (error) {
return url;
}
Expand Down

0 comments on commit c129cb9

Please sign in to comment.