From 97f6ae89fe5ea641e28e2846eaa656786c08ae8e Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Tue, 1 Feb 2022 16:01:23 -0300 Subject: [PATCH] Fix display of error message while loading tx by nonce --- src/AddressTransactionByNonce.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/AddressTransactionByNonce.tsx b/src/AddressTransactionByNonce.tsx index 21324f6..e804f84 100644 --- a/src/AddressTransactionByNonce.tsx +++ b/src/AddressTransactionByNonce.tsx @@ -57,7 +57,11 @@ const AddressTransactionByNonce: React.FC = ({ const navigate = useNavigate(); // Loading... - if (checksummedAddress === undefined || nonce === undefined) { + if ( + checksummedAddress === undefined || + nonce === undefined || + txHash === undefined + ) { return ; } @@ -83,7 +87,7 @@ const AddressTransactionByNonce: React.FC = ({ } // Valid nonce, but no tx found - if (!txHash) { + if (txHash === null) { return (