Skip to content

Commit

Permalink
Fix: tx details - always show method parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Aug 22, 2024
1 parent 95f4fbb commit 39d4170
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/components/common/Table/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
word-break: break-all;
}

.title span:nth-child(2) {
word-break: normal;
}

.gridRow > * {
flex-shrink: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type MethodDetailsProps = {
}
}

export const MethodDetails = ({ data, addressInfoIndex }: MethodDetailsProps): ReactElement | null => {
export const MethodDetails = ({ data, addressInfoIndex }: MethodDetailsProps): ReactElement => {
if (!data.parameters?.length) {
return <Typography color="text.secondary">No parameters</Typography>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ export const DecodedData = ({ txData, toInfo }: Props): ReactElement | null => {

let decodedData = <></>
if (txData.dataDecoded) {
if (amountInWei === '0') {
decodedData = <MethodDetails data={txData.dataDecoded} addressInfoIndex={txData.addressInfoIndex} />
}
decodedData = <MethodDetails data={txData.dataDecoded} addressInfoIndex={txData.addressInfoIndex} />
} else if (txData.hexData) {
// When no decoded data, display raw hex data
decodedData = <HexEncodedData title="Data (hex-encoded)" hexData={txData.hexData} />
Expand Down

0 comments on commit 39d4170

Please sign in to comment.