diff --git a/src/AddressTransactionByNonce.tsx b/src/AddressTransactionByNonce.tsx index 9e1763b..d752138 100644 --- a/src/AddressTransactionByNonce.tsx +++ b/src/AddressTransactionByNonce.tsx @@ -26,7 +26,12 @@ const AddressTransactionByNonce: React.FC = ({ ); const navigate = useNavigate(); - if (checksummedAddress !== undefined && isNaN(nonce)) { + if (checksummedAddress === undefined) { + return ; + } + + // Garbage nonce + if (isNaN(nonce)) { return ( = ({ ); } - if (checksummedAddress !== undefined && !isNaN(nonce) && txHash === null) { + + // Valid nonce, but no tx found + if (!txHash) { return ( = ({ ); } - if (txHash) { - navigate(transactionURL(txHash), { replace: true }); - } + + // Success; replace and render filler + navigate(transactionURL(txHash), { replace: true }); return ; };