Skip to content

Commit

Permalink
Explorer: Fix crash on failed anchor account parsing (solana-labs#29760)
Browse files Browse the repository at this point in the history
Fix crash on failed anchor account parsing
  • Loading branch information
nvsriram authored Jan 18, 2023
1 parent 9f2910e commit df92d8f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion explorer/src/components/account/AnchorAccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit df92d8f

Please sign in to comment.