Skip to content

Commit

Permalink
Fixed holder network name and contract overflow on tx
Browse files Browse the repository at this point in the history
  • Loading branch information
Malak67 committed Oct 23, 2023
1 parent 76f4815 commit 99afb52
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
4 changes: 4 additions & 0 deletions services/explorer/src/components/DataRow/DataRow.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ const useStyles = makeStyles(
width: '100%',
},
},
wrapText: {
whiteSpace: 'normal',
overflowWrap: 'break-word',
},
};
},
{ name: 'DataRow' }
Expand Down
9 changes: 7 additions & 2 deletions services/explorer/src/components/DataRow/DataRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import useStyles from './DataRow.styles';
export const DataRow: React.FC<{
title: string;
data: JSX.Element | string;
wrap?: boolean;
}> = (props) => {
const { title, data } = props;
const { title, data, wrap } = props;
const classes = useStyles();

return (
Expand All @@ -22,7 +23,11 @@ export const DataRow: React.FC<{
>
{title}:
</Typography>
<Box className={classes.dataContainer}>{data}</Box>
<Box
className={`${classes.dataContainer} ${wrap ? classes.wrapText : ''}`}
>
{data}
</Box>
</Box>
)
);
Expand Down
5 changes: 4 additions & 1 deletion services/explorer/src/pages/Holders/Holders.effects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { useExplorerLoader, useExplorerNetwork } from '../../hooks';
import { toHolderTableRow } from './HolderRow';
import { BigNumber } from 'ethers';
import { Network } from '../../utils';

const cols: ColumnData[] = [
{ path: 'rank', name: 'Rank' },
Expand Down Expand Up @@ -104,7 +105,9 @@ export const useHoldersEffects = (): {
};

const title = `Holders`;
const description = `Current holders on Taraxa ${currentNetwork}`;
const description = `Current holders on Taraxa ${
currentNetwork === Network.DEVNET ? Network.MAINNET : currentNetwork
}`;

return {
title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ const TransactionDataContainer = (): JSX.Element => {
<DataRow title='Nonce' data={`${transactionData?.nonce}`} />
{transactionData?.inputData &&
transactionData?.inputData !== '0x' && (
<DataRow title='Data' data={`${transactionData.inputData}`} />
<DataRow
title='Data'
data={`${transactionData.inputData}`}
wrap
/>
)}
{(getTransactionType(transactionData) ===
TransactionType.Contract_Call ||
Expand Down

0 comments on commit 99afb52

Please sign in to comment.