From df92d8ff3d5b21594f61687840b89823b302dd8f Mon Sep 17 00:00:00 2001 From: nvsriram <50625504+nvsriram@users.noreply.github.com> Date: Wed, 18 Jan 2023 13:29:47 -0500 Subject: [PATCH] Explorer: Fix crash on failed anchor account parsing (#29760) Fix crash on failed anchor account parsing --- explorer/src/components/account/AnchorAccountCard.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/explorer/src/components/account/AnchorAccountCard.tsx b/explorer/src/components/account/AnchorAccountCard.tsx index adc3398a04..4a99542261 100644 --- a/explorer/src/components/account/AnchorAccountCard.tsx +++ b/explorer/src/components/account/AnchorAccountCard.tsx @@ -27,7 +27,11 @@ export function AnchorAccountCard({ account }: { account: Account }) { ); if (accountDefTmp) { accountDef = accountDefTmp; - decodedAccountData = coder.decode(accountDef.name, rawData); + try { + decodedAccountData = coder.decode(accountDef.name, rawData); + } catch (err) { + console.log(err); + } } }