Explorer: Fix crash on failed anchor account parsing (#29760)

Fix crash on failed anchor account parsing
This commit is contained in:
nvsriram 2023-01-18 13:29:47 -05:00 committed by GitHub
parent 9f2910e962
commit df92d8ff3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}
}
}