Replace by TransactionAddress component

This commit is contained in:
Willian Mitsuda 2021-11-18 16:01:11 -03:00
parent 454f785878
commit 2e586789a4
2 changed files with 6 additions and 12 deletions

View File

@ -1,19 +1,18 @@
import React from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAngleRight } from "@fortawesome/free-solid-svg-icons/faAngleRight";
import TransactionAddress from "./TransactionAddress";
import AddressHighlighter from "./AddressHighlighter";
import DecoratedAddressLink from "./DecoratedAddressLink";
import { TransactionData, InternalOperation } from "../types";
import { InternalOperation } from "../types";
import { ResolvedAddresses } from "../api/address-resolver";
type InternalCreateProps = {
txData: TransactionData;
internalOp: InternalOperation;
resolvedAddresses: ResolvedAddresses | undefined;
};
const InternalCreate: React.FC<InternalCreateProps> = ({
txData,
internalOp,
resolvedAddresses,
}) => (
@ -33,14 +32,10 @@ const InternalCreate: React.FC<InternalCreateProps> = ({
</div>
<span className="flex items-baseline text-gray-400">
(Creator:{" "}
<AddressHighlighter address={internalOp.from}>
<DecoratedAddressLink
<TransactionAddress
address={internalOp.from}
txFrom={internalOp.from === txData.from}
txTo={internalOp.from === txData.to}
resolvedAddresses={resolvedAddresses}
/>
</AddressHighlighter>
)
</span>
</div>

View File

@ -31,7 +31,6 @@ const InternalTransactionOperation: React.FC<InternalTransactionOperationProps>
{(internalOp.type === OperationType.CREATE ||
internalOp.type === OperationType.CREATE2) && (
<InternalCreate
txData={txData}
internalOp={internalOp}
resolvedAddresses={resolvedAddresses}
/>