From 70649af09713abdf1eac9e012dd63ae6202bde9d Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Tue, 19 Oct 2021 05:23:48 -0300 Subject: [PATCH] Fix wrong message when cant decode input --- src/transaction/Details.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index 0418456..4746cc5 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -75,7 +75,10 @@ const Details: React.FC = ({ const fourBytes = txData.to !== null ? rawInputTo4Bytes(txData.data) : "0x"; const fourBytesEntry = use4Bytes(fourBytes); const fourBytesTxDesc = useMemo(() => { - if (!txData || !fourBytesEntry?.signature) { + if (!fourBytesEntry) { + return fourBytesEntry; + } + if (!txData || !fourBytesEntry.signature) { return undefined; } const sig = fourBytesEntry?.signature; @@ -355,7 +358,7 @@ const Details: React.FC = ({ ) : resolvedTxDesc === undefined ? ( <>Waiting for data... ) : resolvedTxDesc === null ? ( - <>No decoded data + <>Can't decode data ) : (