From e31b30c595f2a04222b701c392a3cadc6b6d518d Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Thu, 7 May 2020 09:22:04 +0800 Subject: [PATCH] Fix bad system instruction type handling --- explorer/src/utils/tx.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/explorer/src/utils/tx.ts b/explorer/src/utils/tx.ts index cd99934ade..797a9d588b 100644 --- a/explorer/src/utils/tx.ts +++ b/explorer/src/utils/tx.ts @@ -58,9 +58,9 @@ export function decodeTransfer( ix: TransactionInstruction ): TransferParams | null { if (!ix.programId.equals(SystemProgram.programId)) return null; - if (SystemInstruction.decodeInstructionType(ix) !== "Transfer") return null; try { + if (SystemInstruction.decodeInstructionType(ix) !== "Transfer") return null; return SystemInstruction.decodeTransfer(ix); } catch (err) { console.error(ix, err); @@ -72,9 +72,9 @@ export function decodeCreate( ix: TransactionInstruction ): CreateAccountParams | null { if (!ix.programId.equals(SystemProgram.programId)) return null; - if (SystemInstruction.decodeInstructionType(ix) !== "Create") return null; try { + if (SystemInstruction.decodeInstructionType(ix) !== "Create") return null; return SystemInstruction.decodeCreateAccount(ix); } catch (err) { console.error(ix, err);