From 05aee02a433530d8fe37af9556e5641ebd702ec6 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Mon, 8 Nov 2021 14:55:41 -0300 Subject: [PATCH] Disable utf8 display when impossible to decode --- src/transaction/decoder/InputDecoder.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/transaction/decoder/InputDecoder.tsx b/src/transaction/decoder/InputDecoder.tsx index 2aee0ba..e3d041c 100644 --- a/src/transaction/decoder/InputDecoder.tsx +++ b/src/transaction/decoder/InputDecoder.tsx @@ -30,9 +30,8 @@ const InputDecoder: React.FC = ({ try { return toUtf8String(data); } catch (err) { - console.warn("Error while converting input data to string"); - console.warn(err); - return ""; + // Silently ignore on purpose + return undefined; } }, [data]); @@ -41,7 +40,7 @@ const InputDecoder: React.FC = ({ Decoded Raw - UTF-8 + UTF-8