diff --git a/src/app/(sidebar)/xdr/view/page.tsx b/src/app/(sidebar)/xdr/view/page.tsx index a8a9322b..a10e11c1 100644 --- a/src/app/(sidebar)/xdr/view/page.tsx +++ b/src/app/(sidebar)/xdr/view/page.tsx @@ -81,9 +81,18 @@ export default function ViewXdr() { }; const xdrJsonDecoded = xdrDecodeJson(); - const txn = xdrJsonDecoded?.jsonString - ? TransactionBuilder.fromXDR(xdr.blob, network.passphrase) - : null; + + const txnFromXdr = () => { + try { + return xdrJsonDecoded?.jsonString + ? TransactionBuilder.fromXDR(xdr.blob, network.passphrase) + : null; + } catch (e) { + return null; + } + }; + + const txn = txnFromXdr(); const prettifyJsonString = (jsonString: string): string => { try {