From 0480fd360ab07e942e2d458003b5be0fa70ec5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=B3vis=20Neto?= Date: Thu, 26 Sep 2024 17:48:57 +0200 Subject: [PATCH] chore(readability): improve condition readability --- .../transactions/TxDetails/TxData/DecodedData/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/transactions/TxDetails/TxData/DecodedData/index.tsx b/src/components/transactions/TxDetails/TxData/DecodedData/index.tsx index 8e86055a0a..37f8735a4d 100644 --- a/src/components/transactions/TxDetails/TxData/DecodedData/index.tsx +++ b/src/components/transactions/TxDetails/TxData/DecodedData/index.tsx @@ -48,9 +48,10 @@ export const DecodedData = ({ txData, toInfo }: Props): ReactElement | null => { ? 'this Safe Account' : addressInfo?.name || toInfo?.name || txData.to.name const avatar = addressInfo?.logoUri || toInfo?.logoUri || txData.to.logoUri + const isFallback = !method && !txData?.dataDecoded?.parameters let decodedData = <> - if (txData.dataDecoded && (method || (!method && txData.dataDecoded.parameters))) { + if (txData.dataDecoded && !isFallback) { decodedData = } else if (txData.hexData) { // When no decoded data, display raw hex data