Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jpuri committed Jan 9, 2025
1 parent 089727f commit 3f7d798
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { startCase } from 'lodash';

import Address from '../../UI/InfoRow/InfoValue/Address';
import InfoRow from '../../UI/InfoRow';
import DataTree, { DataTreeInput } from './DataTree';
import DataTree from './DataTree';

const createStyles = (depth: number) =>
StyleSheet.create({
Expand Down Expand Up @@ -39,13 +39,9 @@ const DataField = memo(
let fieldDisplay;
if (type === 'address' && isValidHexAddress(value as Hex)) {
fieldDisplay = <Address address={value} chainId={chainId} />;
} else if (typeof value === 'object') {
} else if (typeof value === 'object' && value !== null) {
fieldDisplay = (
<DataTree
data={value as unknown as DataTreeInput}
chainId={chainId}
depth={depth + 1}
/>
<DataTree data={value} chainId={chainId} depth={depth + 1} />
);
} else {
fieldDisplay = <Text>{value}</Text>;
Expand Down

0 comments on commit 3f7d798

Please sign in to comment.