Skip to content

Commit

Permalink
chore(readability): improve condition readability
Browse files Browse the repository at this point in the history
  • Loading branch information
clovisdasilvaneto committed Sep 26, 2024
1 parent c7880da commit 0480fd3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <MethodDetails data={txData.dataDecoded} addressInfoIndex={txData.addressInfoIndex} />
} else if (txData.hexData) {
// When no decoded data, display raw hex data
Expand Down

0 comments on commit 0480fd3

Please sign in to comment.