Typedef component

This commit is contained in:
Willian Mitsuda 2021-11-06 05:04:50 -03:00
parent fd3173c3a6
commit 9954c8ac02
2 changed files with 9 additions and 9 deletions

View File

@ -6,7 +6,7 @@ import { TransactionData } from "../../types";
import { ResolvedAddresses } from "../../api/address-resolver";
type AddressDecoderProps = {
r: any;
r: string;
txData: TransactionData;
resolvedAddresses?: ResolvedAddresses | undefined;
};
@ -17,17 +17,17 @@ const AddressDecoder: React.FC<AddressDecoderProps> = ({
resolvedAddresses,
}) => (
<div className="flex items-baseline space-x-2 -ml-1 mr-3">
<AddressHighlighter address={r.toString()}>
<AddressHighlighter address={r}>
<DecoratedAddressLink
address={r.toString()}
miner={r.toString() === txData.confirmedData?.miner}
txFrom={r.toString() === txData.from}
txTo={r.toString() === txData.to}
address={r}
miner={r === txData.confirmedData?.miner}
txFrom={r === txData.from}
txTo={r === txData.to}
resolvedAddresses={resolvedAddresses}
/>
</AddressHighlighter>
<Copy value={r.toString()} />
<Copy value={r} />
</div>
);
export default React.memo(AddressDecoder);
export default AddressDecoder;

View File

@ -76,7 +76,7 @@ const DecodedParamRow: React.FC<DecodedParamRowProps> = ({
<Uint256Decoder r={r} />
) : paramType.baseType === "address" ? (
<AddressDecoder
r={r}
r={r.toString()}
txData={txData}
resolvedAddresses={resolvedAddresses}
/>