From c63a208488e16b14bd1e87bf3ae4a7adff23d582 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 16 Apr 2021 10:09:05 -0700 Subject: [PATCH] hotfix: don't report to sentry for custom clusters on token account section (#16597) --- .../src/components/account/TokenAccountSection.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/explorer/src/components/account/TokenAccountSection.tsx b/explorer/src/components/account/TokenAccountSection.tsx index 73ab01796..551851678 100644 --- a/explorer/src/components/account/TokenAccountSection.tsx +++ b/explorer/src/components/account/TokenAccountSection.tsx @@ -10,7 +10,7 @@ import { create } from "superstruct"; import { TableCardBody } from "components/common/TableCardBody"; import { Address } from "components/common/Address"; import { UnknownAccountCard } from "./UnknownAccountCard"; -import { useCluster } from "providers/cluster"; +import { Cluster, useCluster } from "providers/cluster"; import { normalizeTokenAmount } from "utils"; import { addressLabel } from "utils/tx"; import { reportError } from "utils/sentry"; @@ -38,6 +38,8 @@ export function TokenAccountSection({ account: Account; tokenAccount: TokenAccount; }) { + const { cluster } = useCluster(); + try { switch (tokenAccount.type) { case "mint": { @@ -54,9 +56,11 @@ export function TokenAccountSection({ } } } catch (err) { - reportError(err, { - address: account.pubkey.toBase58(), - }); + if (cluster !== Cluster.Custom) { + reportError(err, { + address: account.pubkey.toBase58(), + }); + } } return ; }