From 1ab77bb819e972015fbce45e9c7c793ce85f6e36 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sat, 17 Jul 2021 15:00:08 -0300 Subject: [PATCH 01/15] Extract custom hook; simplify code --- src/Transaction.tsx | 36 ++++-------------------------------- src/nodeFunctions.ts | 21 +++++++++++++++++++++ src/useErigonHooks.ts | 25 +++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 32 deletions(-) create mode 100644 src/nodeFunctions.ts create mode 100644 src/useErigonHooks.ts diff --git a/src/Transaction.tsx b/src/Transaction.tsx index 3f450e9..773901e 100644 --- a/src/Transaction.tsx +++ b/src/Transaction.tsx @@ -1,10 +1,4 @@ -import React, { - useState, - useEffect, - useCallback, - useMemo, - useContext, -} from "react"; +import React, { useState, useEffect, useMemo, useContext } from "react"; import { Route, Switch, useParams } from "react-router-dom"; import { BigNumber, ethers } from "ethers"; import StandardFrame from "./StandardFrame"; @@ -13,9 +7,10 @@ import Tab from "./components/Tab"; import Details from "./transaction/Details"; import Logs from "./transaction/Logs"; import erc20 from "./erc20.json"; -import { TokenMetas, TokenTransfer, TransactionData, Transfer } from "./types"; +import { TokenMetas, TokenTransfer, TransactionData } from "./types"; import { RuntimeContext } from "./useRuntime"; import { SelectionContext, useSelection } from "./useSelection"; +import { useInternalTransfers } from "./useErigonHooks"; const TRANSFER_TOPIC = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"; @@ -110,7 +105,7 @@ const Transaction: React.FC = () => { readBlock(); }, [provider, txhash]); - const [transfers, setTransfers] = useState(); + const transfers = useInternalTransfers(provider, txData); const sendsEthToMiner = useMemo(() => { if (!txData || !transfers) { return false; @@ -124,29 +119,6 @@ const Transaction: React.FC = () => { return false; }, [txData, transfers]); - const traceTransfers = useCallback(async () => { - if (!provider || !txData) { - return; - } - - const r = await provider.send("ots_getTransactionTransfers", [ - txData.transactionHash, - ]); - const _transfers: Transfer[] = []; - for (const t of r) { - _transfers.push({ - from: ethers.utils.getAddress(t.from), - to: ethers.utils.getAddress(t.to), - value: t.value, - }); - } - - setTransfers(_transfers); - }, [provider, txData]); - useEffect(() => { - traceTransfers(); - }, [traceTransfers]); - const selectionCtx = useSelection(); return ( diff --git a/src/nodeFunctions.ts b/src/nodeFunctions.ts new file mode 100644 index 0000000..9ddd788 --- /dev/null +++ b/src/nodeFunctions.ts @@ -0,0 +1,21 @@ +import { ethers } from "ethers"; +import { TransactionData, Transfer } from "./types"; + +export const getTransactionTransfers = async ( + provider: ethers.providers.JsonRpcProvider, + txData: TransactionData +) => { + const r = await provider.send("ots_getTransactionTransfers", [ + txData.transactionHash, + ]); + + const _transfers: Transfer[] = []; + for (const t of r) { + _transfers.push({ + from: ethers.utils.getAddress(t.from), + to: ethers.utils.getAddress(t.to), + value: t.value, + }); + } + return _transfers; +}; diff --git a/src/useErigonHooks.ts b/src/useErigonHooks.ts new file mode 100644 index 0000000..2d3aa9b --- /dev/null +++ b/src/useErigonHooks.ts @@ -0,0 +1,25 @@ +import { ethers } from "ethers"; +import { useState, useEffect } from "react"; +import { getTransactionTransfers } from "./nodeFunctions"; +import { TransactionData, Transfer } from "./types"; + +export const useInternalTransfers = ( + provider: ethers.providers.JsonRpcProvider | undefined, + txData: TransactionData | undefined +) => { + const [transfers, setTransfers] = useState(); + + useEffect(() => { + const traceTransfers = async () => { + if (!provider || !txData) { + return; + } + + const _transfers = await getTransactionTransfers(provider, txData); + setTransfers(_transfers); + }; + traceTransfers(); + }, [provider, txData]); + + return transfers; +}; From 683da61778e8101ad107fbe4a50a3d480472ee99 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sat, 17 Jul 2021 15:58:33 -0300 Subject: [PATCH 02/15] Initial tracking ot self-destructs --- src/Transaction.tsx | 15 +++-- src/components/InternalSelfDestruct.tsx | 82 +++++++++++++++++++++++++ src/nodeFunctions.ts | 23 ++++++- src/params.ts | 2 +- src/transaction/Details.tsx | 26 +++++--- src/types.ts | 5 ++ src/useErigonHooks.ts | 22 +++++-- 7 files changed, 152 insertions(+), 23 deletions(-) create mode 100644 src/components/InternalSelfDestruct.tsx diff --git a/src/Transaction.tsx b/src/Transaction.tsx index 773901e..96b7bf9 100644 --- a/src/Transaction.tsx +++ b/src/Transaction.tsx @@ -105,19 +105,24 @@ const Transaction: React.FC = () => { readBlock(); }, [provider, txhash]); - const transfers = useInternalTransfers(provider, txData); + const intTransfers = useInternalTransfers(provider, txData); const sendsEthToMiner = useMemo(() => { - if (!txData || !transfers) { + if (!txData || !intTransfers) { return false; } - for (const t of transfers) { + for (const t of intTransfers.transfers) { + if (t.to === txData.miner) { + return true; + } + } + for (const t of intTransfers.selfDestructs) { if (t.to === txData.miner) { return true; } } return false; - }, [txData, transfers]); + }, [txData, intTransfers]); const selectionCtx = useSelection(); @@ -136,7 +141,7 @@ const Transaction: React.FC = () => {
diff --git a/src/components/InternalSelfDestruct.tsx b/src/components/InternalSelfDestruct.tsx new file mode 100644 index 0000000..862eac8 --- /dev/null +++ b/src/components/InternalSelfDestruct.tsx @@ -0,0 +1,82 @@ +import React from "react"; +import { ethers } from "ethers"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { + faAngleRight, + faBomb, + faCoins, +} from "@fortawesome/free-solid-svg-icons"; +import AddressHighlighter from "./AddressHighlighter"; +import AddressLink from "./AddressLink"; +import { TransactionData, Transfer } from "../types"; + +type InternalSelfDestructProps = { + txData: TransactionData; + transfer: Transfer; +}; + +const InternalSelfDestruct: React.FC = ({ + txData, + transfer, +}) => { + const fromMiner = + txData.miner !== undefined && transfer.from === txData.miner; + const toMiner = txData.miner !== undefined && transfer.to === txData.miner; + + return ( + <> +
+ + + + {" "} + SELF DESTRUCT + + Contract +
+ +
+ {fromMiner && ( + + + + )} + +
+
+
+
+ {!transfer.value.isZero() && ( +
+ + TRANSFER + + {ethers.utils.formatEther(transfer.value)} Ether +
+ To + +
+ {toMiner && ( + + + + )} + +
+
+
+
+ )} + + ); +}; + +export default React.memo(InternalSelfDestruct); diff --git a/src/nodeFunctions.ts b/src/nodeFunctions.ts index 9ddd788..b3ff583 100644 --- a/src/nodeFunctions.ts +++ b/src/nodeFunctions.ts @@ -5,12 +5,31 @@ export const getTransactionTransfers = async ( provider: ethers.providers.JsonRpcProvider, txData: TransactionData ) => { - const r = await provider.send("ots_getTransactionTransfers", [ + const rawTransfers = await provider.send("ots_getTransactionTransfers", [ txData.transactionHash, ]); const _transfers: Transfer[] = []; - for (const t of r) { + for (const t of rawTransfers) { + _transfers.push({ + from: ethers.utils.getAddress(t.from), + to: ethers.utils.getAddress(t.to), + value: t.value, + }); + } + return _transfers; +}; + +export const getTransactionSelfDestructs = async ( + provider: ethers.providers.JsonRpcProvider, + txData: TransactionData +) => { + const rawTransfers = await provider.send("ots_getTransactionSelfDestructs", [ + txData.transactionHash, + ]); + + const _transfers: Transfer[] = []; + for (const t of rawTransfers) { _transfers.push({ from: ethers.utils.getAddress(t.from), to: ethers.utils.getAddress(t.to), diff --git a/src/params.ts b/src/params.ts index 75d31c3..2bfd757 100644 --- a/src/params.ts +++ b/src/params.ts @@ -1,3 +1,3 @@ -export const MIN_API_LEVEL = 1; +export const MIN_API_LEVEL = 2; export const PAGE_SIZE = 25; diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index f5022da..614c32f 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -13,21 +13,22 @@ import AddressOrENSName from "../components/AddressOrENSName"; import Copy from "../components/Copy"; import Timestamp from "../components/Timestamp"; import InternalTransfer from "../components/InternalTransfer"; +import InternalSelfDestruct from "../components/InternalSelfDestruct"; import MethodName from "../components/MethodName"; import GasValue from "../components/GasValue"; import FormattedBalance from "../components/FormattedBalance"; import TokenTransferItem from "../TokenTransferItem"; -import { TransactionData, Transfer } from "../types"; +import { InternalTransfers, TransactionData } from "../types"; type DetailsProps = { txData: TransactionData; - transfers?: Transfer[]; + internalTransfers?: InternalTransfers; sendsEthToMiner: boolean; }; const Details: React.FC = ({ txData, - transfers, + internalTransfers, sendsEthToMiner, }) => ( @@ -76,12 +77,19 @@ const Details: React.FC = ({ - {transfers && ( -
- {transfers.map((t, i) => ( - - ))} -
+ {internalTransfers && ( + <> +
+ {internalTransfers.transfers.map((t, i) => ( + + ))} +
+
+ {internalTransfers.selfDestructs.map((t, i) => ( + + ))} +
+ )} diff --git a/src/types.ts b/src/types.ts index 9ee8d3d..2e572bd 100644 --- a/src/types.ts +++ b/src/types.ts @@ -68,6 +68,11 @@ export type Transfer = { value: BigNumber; }; +export type InternalTransfers = { + transfers: Transfer[]; + selfDestructs: Transfer[]; +}; + export type TokenTransfer = { token: string; from: string; diff --git a/src/useErigonHooks.ts b/src/useErigonHooks.ts index 2d3aa9b..589ec34 100644 --- a/src/useErigonHooks.ts +++ b/src/useErigonHooks.ts @@ -1,13 +1,16 @@ import { ethers } from "ethers"; import { useState, useEffect } from "react"; -import { getTransactionTransfers } from "./nodeFunctions"; -import { TransactionData, Transfer } from "./types"; +import { + getTransactionSelfDestructs, + getTransactionTransfers, +} from "./nodeFunctions"; +import { InternalTransfers, TransactionData } from "./types"; export const useInternalTransfers = ( provider: ethers.providers.JsonRpcProvider | undefined, txData: TransactionData | undefined -) => { - const [transfers, setTransfers] = useState(); +): InternalTransfers | undefined => { + const [intTransfers, setIntTransfers] = useState(); useEffect(() => { const traceTransfers = async () => { @@ -16,10 +19,17 @@ export const useInternalTransfers = ( } const _transfers = await getTransactionTransfers(provider, txData); - setTransfers(_transfers); + const _selfDestructs = await getTransactionSelfDestructs( + provider, + txData + ); + for (const s of _selfDestructs) { + s.value = provider.formatter.bigNumber(s.value); + } + setIntTransfers({ transfers: _transfers, selfDestructs: _selfDestructs }); }; traceTransfers(); }, [provider, txData]); - return transfers; + return intTransfers; }; From 2494fa4adced8614a50c74db30e9b80557306691 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Mon, 19 Jul 2021 00:38:38 -0300 Subject: [PATCH 03/15] Pull up all decoration logic from AddressOrENSName to DecoratedAddressLink --- src/Block.tsx | 7 +-- src/TokenTransferItem.tsx | 16 ++++--- src/components/AddressOrENSName.tsx | 17 ++----- src/components/DecoratedAddressLink.tsx | 62 +++++++++++++++++++++++++ src/components/InternalTransfer.tsx | 6 +-- src/search/TransactionItem.tsx | 10 ++-- src/transaction/Details.tsx | 12 +++-- src/types.ts | 8 ++++ 8 files changed, 103 insertions(+), 35 deletions(-) create mode 100644 src/components/DecoratedAddressLink.tsx diff --git a/src/Block.tsx b/src/Block.tsx index 963f2f9..c1578a8 100644 --- a/src/Block.tsx +++ b/src/Block.tsx @@ -13,7 +13,7 @@ import NavButton from "./components/NavButton"; import Timestamp from "./components/Timestamp"; import GasValue from "./components/GasValue"; import BlockLink from "./components/BlockLink"; -import AddressOrENSName from "./components/AddressOrENSName"; +import DecoratedAddressLink from "./components/DecoratedAddressLink"; import TransactionValue from "./components/TransactionValue"; import HexValue from "./components/HexValue"; import { RuntimeContext } from "./useRuntime"; @@ -159,10 +159,7 @@ const Block: React.FC = () => { in this block - + diff --git a/src/TokenTransferItem.tsx b/src/TokenTransferItem.tsx index 4b1fc62..dc6fd45 100644 --- a/src/TokenTransferItem.tsx +++ b/src/TokenTransferItem.tsx @@ -2,11 +2,10 @@ import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCaretRight } from "@fortawesome/free-solid-svg-icons"; import AddressHighlighter from "./components/AddressHighlighter"; -import AddressOrENSName from "./components/AddressOrENSName"; -import AddressLink from "./components/AddressLink"; +import DecoratedAddressLink from "./components/DecoratedAddressLink"; import TokenLogo from "./components/TokenLogo"; import FormattedBalance from "./components/FormattedBalance"; -import { TokenMetas, TokenTransfer } from "./types"; +import { AddressContext, TokenMetas, TokenTransfer } from "./types"; type TokenTransferItemProps = { t: TokenTransfer; @@ -25,13 +24,16 @@ const TokenTransferItem: React.FC = ({
From - +
To - +
@@ -48,7 +50,7 @@ const TokenTransferItem: React.FC = ({
- = ({ /> ) : ( - + )}
diff --git a/src/components/AddressOrENSName.tsx b/src/components/AddressOrENSName.tsx index ce1ec8a..6e871aa 100644 --- a/src/components/AddressOrENSName.tsx +++ b/src/components/AddressOrENSName.tsx @@ -1,6 +1,4 @@ import React from "react"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faCoins } from "@fortawesome/free-solid-svg-icons"; import Address from "./Address"; import AddressLink from "./AddressLink"; import ENSName from "./ENSName"; @@ -10,21 +8,16 @@ type AddressOrENSNameProps = { address: string; ensName?: string; selectedAddress?: string; - minerAddress?: string; + text?: string; }; const AddressOrENSName: React.FC = ({ address, ensName, selectedAddress, - minerAddress, + text, }) => ( -
- {minerAddress !== undefined && minerAddress === address && ( - - - - )} + <> {address === selectedAddress ? ( <> {ensName ? ( @@ -38,11 +31,11 @@ const AddressOrENSName: React.FC = ({ {ensName ? ( ) : ( - + )} )} -
+ ); export default React.memo(AddressOrENSName); diff --git a/src/components/DecoratedAddressLink.tsx b/src/components/DecoratedAddressLink.tsx new file mode 100644 index 0000000..7f897b2 --- /dev/null +++ b/src/components/DecoratedAddressLink.tsx @@ -0,0 +1,62 @@ +import React from "react"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { + faMoneyBillAlt, + faBurn, + faCoins, +} from "@fortawesome/free-solid-svg-icons"; +import AddressOrENSName from "./AddressOrENSName"; +import { AddressContext, ZERO_ADDRESS } from "../types"; + +type DecoratedAddressLinkProps = { + address: string; + ensName?: string; + selectedAddress?: string; + text?: string; + addressCtx?: AddressContext; + miner?: boolean; +}; + +const DecoratedAddresssLink: React.FC = ({ + address, + ensName, + selectedAddress, + text, + addressCtx, + miner, +}) => { + const mint = addressCtx === AddressContext.FROM && address === ZERO_ADDRESS; + const burn = addressCtx === AddressContext.TO && address === ZERO_ADDRESS; + + return ( +
+ {mint && ( + + + + )} + {burn && ( + + + + )} + {miner && ( + + + + )} + +
+ ); +}; + +export default React.memo(DecoratedAddresssLink); diff --git a/src/components/InternalTransfer.tsx b/src/components/InternalTransfer.tsx index c135a43..64e8953 100644 --- a/src/components/InternalTransfer.tsx +++ b/src/components/InternalTransfer.tsx @@ -3,7 +3,7 @@ import { ethers } from "ethers"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faAngleRight, faCoins } from "@fortawesome/free-solid-svg-icons"; import AddressHighlighter from "./AddressHighlighter"; -import AddressLink from "./AddressLink"; +import DecoratedAddressLink from "./DecoratedAddressLink"; import { TransactionData, Transfer } from "../types"; type InternalTransferProps = { @@ -38,7 +38,7 @@ const InternalTransfer: React.FC = ({ )} - + @@ -55,7 +55,7 @@ const InternalTransfer: React.FC = ({ )} - + diff --git a/src/search/TransactionItem.tsx b/src/search/TransactionItem.tsx index 3829010..6d78f7e 100644 --- a/src/search/TransactionItem.tsx +++ b/src/search/TransactionItem.tsx @@ -4,7 +4,7 @@ import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons"; import MethodName from "../components/MethodName"; import BlockLink from "../components/BlockLink"; import TransactionLink from "../components/TransactionLink"; -import AddressOrENSName from "../components/AddressOrENSName"; +import DecoratedAddressLink from "../components/DecoratedAddressLink"; import TimestampAge from "../components/TimestampAge"; import AddressHighlighter from "../components/AddressHighlighter"; import TransactionDirection, { @@ -71,11 +71,11 @@ const TransactionItem: React.FC = ({ {tx.from && ( - )} @@ -91,11 +91,11 @@ const TransactionItem: React.FC = ({ {tx.to && ( - )} diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index 614c32f..ec24229 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -9,7 +9,7 @@ import ContentFrame from "../ContentFrame"; import InfoRow from "../components/InfoRow"; import BlockLink from "../components/BlockLink"; import AddressHighlighter from "../components/AddressHighlighter"; -import AddressOrENSName from "../components/AddressOrENSName"; +import DecoratedAddressLink from "../components/DecoratedAddressLink"; import Copy from "../components/Copy"; import Timestamp from "../components/Timestamp"; import InternalTransfer from "../components/InternalTransfer"; @@ -65,7 +65,10 @@ const Details: React.FC = ({
- +
@@ -73,7 +76,10 @@ const Details: React.FC = ({
- +
diff --git a/src/types.ts b/src/types.ts index 2e572bd..94301e5 100644 --- a/src/types.ts +++ b/src/types.ts @@ -57,6 +57,14 @@ export type TransactionData = { logs: ethers.providers.Log[]; }; +// The VOID... +export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; + +export enum AddressContext { + FROM, + TO, +} + export type From = { current: string; depth: number; From 18530798811a2ea41d650dbac102be32c503f4ab Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Mon, 19 Jul 2021 00:50:32 -0300 Subject: [PATCH 04/15] Custom text/hover colors for burn/mint addresses --- src/components/AddressLink.tsx | 11 +++++++++-- src/components/AddressOrENSName.tsx | 14 ++++++++++++-- src/components/DecoratedAddressLink.tsx | 7 ++++--- src/components/ENSNameLink.tsx | 11 +++++++++-- 4 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/components/AddressLink.tsx b/src/components/AddressLink.tsx index 36acac6..abddf99 100644 --- a/src/components/AddressLink.tsx +++ b/src/components/AddressLink.tsx @@ -4,11 +4,18 @@ import { NavLink } from "react-router-dom"; type AddressLinkProps = { address: string; text?: string; + dontOverrideColors?: boolean; }; -const AddressLink: React.FC = ({ address, text }) => ( +const AddressLink: React.FC = ({ + address, + text, + dontOverrideColors, +}) => (

diff --git a/src/components/AddressOrENSName.tsx b/src/components/AddressOrENSName.tsx index 6e871aa..9cb2f9e 100644 --- a/src/components/AddressOrENSName.tsx +++ b/src/components/AddressOrENSName.tsx @@ -9,6 +9,7 @@ type AddressOrENSNameProps = { ensName?: string; selectedAddress?: string; text?: string; + dontOverrideColors?: boolean; }; const AddressOrENSName: React.FC = ({ @@ -16,6 +17,7 @@ const AddressOrENSName: React.FC = ({ ensName, selectedAddress, text, + dontOverrideColors, }) => ( <> {address === selectedAddress ? ( @@ -29,9 +31,17 @@ const AddressOrENSName: React.FC = ({ ) : ( <> {ensName ? ( - + ) : ( - + )} )} diff --git a/src/components/DecoratedAddressLink.tsx b/src/components/DecoratedAddressLink.tsx index 7f897b2..2579848 100644 --- a/src/components/DecoratedAddressLink.tsx +++ b/src/components/DecoratedAddressLink.tsx @@ -30,9 +30,9 @@ const DecoratedAddresssLink: React.FC = ({ return (

{mint && ( @@ -54,6 +54,7 @@ const DecoratedAddresssLink: React.FC = ({ ensName={ensName} selectedAddress={selectedAddress} text={text} + dontOverrideColors={mint || burn} />
); diff --git a/src/components/ENSNameLink.tsx b/src/components/ENSNameLink.tsx index a111139..ae8f6f8 100644 --- a/src/components/ENSNameLink.tsx +++ b/src/components/ENSNameLink.tsx @@ -5,11 +5,18 @@ import ENSLogo from "./ensLogo.svg"; type ENSNameLinkProps = { name: string; address: string; + dontOverrideColors?: boolean; }; -const ENSNameLink: React.FC = ({ name, address }) => ( +const ENSNameLink: React.FC = ({ + name, + address, + dontOverrideColors, +}) => ( From 71e35129baabef311b361bbe87f789712963e80b Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Mon, 19 Jul 2021 00:55:21 -0300 Subject: [PATCH 05/15] Add bg hover color to token transfer list --- src/TokenTransferItem.tsx | 2 +- src/transaction/Details.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TokenTransferItem.tsx b/src/TokenTransferItem.tsx index dc6fd45..286d43f 100644 --- a/src/TokenTransferItem.tsx +++ b/src/TokenTransferItem.tsx @@ -16,7 +16,7 @@ const TokenTransferItem: React.FC = ({ t, tokenMetas, }) => ( -
+
diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index ec24229..1863b33 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -103,7 +103,7 @@ const Details: React.FC = ({ {txData.tokenTransfers.length > 0 && ( -
+
{txData.tokenTransfers.map((t, i) => ( ))} From 261847bec1a05052bb336255d178544f50a90081 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Mon, 19 Jul 2021 01:03:32 -0300 Subject: [PATCH 06/15] Change p for span to avoid block filling the entire row --- src/components/Address.tsx | 2 +- src/components/AddressLink.tsx | 4 ++-- src/components/ENSName.tsx | 2 +- src/components/ENSNameLink.tsx | 2 +- src/transaction/Logs.tsx | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Address.tsx b/src/components/Address.tsx index d757ed3..d7694e5 100644 --- a/src/components/Address.tsx +++ b/src/components/Address.tsx @@ -6,7 +6,7 @@ type AddressProps = { const Address: React.FC = ({ address }) => ( -

{address}

+ {address}
); diff --git a/src/components/AddressLink.tsx b/src/components/AddressLink.tsx index abddf99..a8fd5c3 100644 --- a/src/components/AddressLink.tsx +++ b/src/components/AddressLink.tsx @@ -18,9 +18,9 @@ const AddressLink: React.FC = ({ } font-address truncate`} to={`/address/${address}`} > -

+ {text ?? address} -

+ ); diff --git a/src/components/ENSName.tsx b/src/components/ENSName.tsx index 035c4ed..7bc8032 100644 --- a/src/components/ENSName.tsx +++ b/src/components/ENSName.tsx @@ -18,7 +18,7 @@ const ENSName: React.FC = ({ name, address }) => ( width={12} height={12} /> -

{name}

+ {name}
); diff --git a/src/components/ENSNameLink.tsx b/src/components/ENSNameLink.tsx index ae8f6f8..c1da646 100644 --- a/src/components/ENSNameLink.tsx +++ b/src/components/ENSNameLink.tsx @@ -27,7 +27,7 @@ const ENSNameLink: React.FC = ({ width={12} height={12} /> -

{name}

+ {name} ); diff --git a/src/transaction/Logs.tsx b/src/transaction/Logs.tsx index eda12be..d8cb868 100644 --- a/src/transaction/Logs.tsx +++ b/src/transaction/Logs.tsx @@ -1,6 +1,6 @@ import React from "react"; import ContentFrame from "../ContentFrame"; -import AddressLink from "../components/AddressLink"; +import AddressOrENSName from "../components/AddressOrENSName"; import { TransactionData } from "../types"; type LogsProps = { @@ -22,7 +22,7 @@ const Logs: React.FC = ({ txData }) => (
Address
- +
{l.topics.map((t, i) => ( From 6bf905d33ae423de9f207cd6bb2d5b9e61bb5680 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Mon, 19 Jul 2021 03:15:43 -0300 Subject: [PATCH 07/15] Fix missing readonly attribute on textarea --- src/transaction/Logs.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transaction/Logs.tsx b/src/transaction/Logs.tsx index d8cb868..bf101fb 100644 --- a/src/transaction/Logs.tsx +++ b/src/transaction/Logs.tsx @@ -45,6 +45,7 @@ const Logs: React.FC = ({ txData }) => (