Add standard address decorations to log emitter addresses

This commit is contained in:
Willian Mitsuda 2021-09-18 17:57:39 -03:00
parent 101aa5a21f
commit 04fdd74a94
1 changed files with 13 additions and 6 deletions

View File

@ -2,7 +2,9 @@ import React, { Fragment } from "react";
import { Log } from "@ethersproject/abstract-provider"; import { Log } from "@ethersproject/abstract-provider";
import { LogDescription } from "@ethersproject/abi"; import { LogDescription } from "@ethersproject/abi";
import { Tab } from "@headlessui/react"; import { Tab } from "@headlessui/react";
import AddressHighlighter from "../components/AddressHighlighter";
import DecoratedAddressLink from "../components/DecoratedAddressLink"; import DecoratedAddressLink from "../components/DecoratedAddressLink";
import Copy from "../components/Copy";
import ModeTab from "../components/ModeTab"; import ModeTab from "../components/ModeTab";
import DecodedParamsTable from "./DecodedParamsTable"; import DecodedParamsTable from "./DecodedParamsTable";
import DecodedLogSignature from "./DecodedLogSignature"; import DecodedLogSignature from "./DecodedLogSignature";
@ -25,12 +27,17 @@ const LogEntry: React.FC<LogEntryProps> = ({ txData, log, logDesc }) => (
<div className="grid grid-cols-12 gap-x-3 gap-y-5 text-sm"> <div className="grid grid-cols-12 gap-x-3 gap-y-5 text-sm">
<div className="font-bold text-right">Address</div> <div className="font-bold text-right">Address</div>
<div className="col-span-11 mr-auto"> <div className="col-span-11 mr-auto">
<div className="flex items-baseline space-x-2 -ml-1 mr-3">
<AddressHighlighter address={log.address}>
<DecoratedAddressLink <DecoratedAddressLink
address={log.address} address={log.address}
miner={log.address === txData.confirmedData?.miner} miner={log.address === txData.confirmedData?.miner}
txFrom={log.address === txData.from} txFrom={log.address === txData.from}
txTo={log.address === txData.to} txTo={log.address === txData.to}
/> />
</AddressHighlighter>
<Copy value={log.address} />
</div>
</div> </div>
</div> </div>
<Tab.Group> <Tab.Group>