diff --git a/src/components/SelectionHighlighter.tsx b/src/components/SelectionHighlighter.tsx index 40a3431..bebd606 100644 --- a/src/components/SelectionHighlighter.tsx +++ b/src/components/SelectionHighlighter.tsx @@ -18,6 +18,7 @@ export const genericSelector = selection.content === content; export const addressSelector: ContentSelector = genericSelector("address"); +export const valueSelector: ContentSelector = genericSelector("value"); export const functionSigSelector: ContentSelector = genericSelector("functionSig"); diff --git a/src/transaction/decoder/DecodedParamRow.tsx b/src/transaction/decoder/DecodedParamRow.tsx index 78467d3..3ad47cc 100644 --- a/src/transaction/decoder/DecodedParamRow.tsx +++ b/src/transaction/decoder/DecodedParamRow.tsx @@ -9,6 +9,9 @@ import AddressDecoder from "./AddressDecoder"; import BooleanDecoder from "./BooleanDecoder"; import BytesDecoder from "./BytesDecoder"; import { ResolvedAddresses } from "../../api/address-resolver"; +import SelectionHighlighter, { + valueSelector, +} from "../../components/SelectionHighlighter"; type DecodedParamRowProps = { prefix?: ReactNode; @@ -68,24 +71,30 @@ const DecodedParamRow: React.FC = ({ {help && showHelp &&
{help}
} {paramType.type} - - {paramType.baseType === "uint256" ? ( - - ) : paramType.baseType === "address" ? ( - - ) : paramType.baseType === "bool" ? ( - - ) : paramType.baseType === "bytes" ? ( - - ) : paramType.baseType === "tuple" || - paramType.baseType === "array" ? ( - <> - ) : ( - r.toString() - )} + + + {paramType.baseType === "uint256" ? ( + + ) : paramType.baseType === "address" ? ( + + ) : paramType.baseType === "bool" ? ( + + ) : paramType.baseType === "bytes" ? ( + + ) : paramType.baseType === "tuple" || + paramType.baseType === "array" ? ( + <> + ) : ( + r.toString() + )} + {paramType.baseType === "tuple" &&