From b419efab6585861e110ee73e5aeb50616f0c8cdf Mon Sep 17 00:00:00 2001 From: Radu Mojic Date: Fri, 9 Aug 2024 13:35:23 +0300 Subject: [PATCH] don't show the logs panel if no logs in tx or in results --- .../components/TransactionInfo/TransactionInfo.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/TransactionDetails/components/TransactionInfo/TransactionInfo.tsx b/src/pages/TransactionDetails/components/TransactionInfo/TransactionInfo.tsx index 96c747f1e..3e8c859e5 100644 --- a/src/pages/TransactionDetails/components/TransactionInfo/TransactionInfo.tsx +++ b/src/pages/TransactionDetails/components/TransactionInfo/TransactionInfo.tsx @@ -135,8 +135,11 @@ export const TransactionInfo = ({ }); const visibleOperations = getVisibleOperations(transaction); - const showLogs = - transaction.logs || (transaction.results && transaction.results.length > 0); + const hasTxResultsLogs = + transaction.results && + transaction.results.length > 0 && + transaction.results.some((ressult) => ressult.logs); + const showLogs = transaction.logs || hasTxResultsLogs; const totalTxTokenUsdValue = getTotalTxTokenUsdValue(transaction); const showTotalTxTokenUsdValue =