hotfix: don't report to sentry for custom clusters on token account section (#16597)
This commit is contained in:
parent
a4474f1d94
commit
c63a208488
|
@ -10,7 +10,7 @@ import { create } from "superstruct";
|
||||||
import { TableCardBody } from "components/common/TableCardBody";
|
import { TableCardBody } from "components/common/TableCardBody";
|
||||||
import { Address } from "components/common/Address";
|
import { Address } from "components/common/Address";
|
||||||
import { UnknownAccountCard } from "./UnknownAccountCard";
|
import { UnknownAccountCard } from "./UnknownAccountCard";
|
||||||
import { useCluster } from "providers/cluster";
|
import { Cluster, useCluster } from "providers/cluster";
|
||||||
import { normalizeTokenAmount } from "utils";
|
import { normalizeTokenAmount } from "utils";
|
||||||
import { addressLabel } from "utils/tx";
|
import { addressLabel } from "utils/tx";
|
||||||
import { reportError } from "utils/sentry";
|
import { reportError } from "utils/sentry";
|
||||||
|
@ -38,6 +38,8 @@ export function TokenAccountSection({
|
||||||
account: Account;
|
account: Account;
|
||||||
tokenAccount: TokenAccount;
|
tokenAccount: TokenAccount;
|
||||||
}) {
|
}) {
|
||||||
|
const { cluster } = useCluster();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
switch (tokenAccount.type) {
|
switch (tokenAccount.type) {
|
||||||
case "mint": {
|
case "mint": {
|
||||||
|
@ -54,9 +56,11 @@ export function TokenAccountSection({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
reportError(err, {
|
if (cluster !== Cluster.Custom) {
|
||||||
address: account.pubkey.toBase58(),
|
reportError(err, {
|
||||||
});
|
address: account.pubkey.toBase58(),
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return <UnknownAccountCard account={account} />;
|
return <UnknownAccountCard account={account} />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue