Add selfdestruct decoration
This commit is contained in:
parent
03ce994a5c
commit
163cef6939
|
@ -15,6 +15,7 @@ type DecoratedAddressLinkProps = {
|
||||||
text?: string;
|
text?: string;
|
||||||
addressCtx?: AddressContext;
|
addressCtx?: AddressContext;
|
||||||
miner?: boolean;
|
miner?: boolean;
|
||||||
|
selfDestruct?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const DecoratedAddresssLink: React.FC<DecoratedAddressLinkProps> = ({
|
const DecoratedAddresssLink: React.FC<DecoratedAddressLinkProps> = ({
|
||||||
|
@ -24,6 +25,7 @@ const DecoratedAddresssLink: React.FC<DecoratedAddressLinkProps> = ({
|
||||||
text,
|
text,
|
||||||
addressCtx,
|
addressCtx,
|
||||||
miner,
|
miner,
|
||||||
|
selfDestruct,
|
||||||
}) => {
|
}) => {
|
||||||
const mint = addressCtx === AddressContext.FROM && address === ZERO_ADDRESS;
|
const mint = addressCtx === AddressContext.FROM && address === ZERO_ADDRESS;
|
||||||
const burn = addressCtx === AddressContext.TO && address === ZERO_ADDRESS;
|
const burn = addressCtx === AddressContext.TO && address === ZERO_ADDRESS;
|
||||||
|
@ -32,7 +34,9 @@ const DecoratedAddresssLink: React.FC<DecoratedAddressLinkProps> = ({
|
||||||
<div
|
<div
|
||||||
className={`flex items-baseline space-x-1 ${
|
className={`flex items-baseline space-x-1 ${
|
||||||
mint ? "italic text-green-500 hover:text-green-700" : ""
|
mint ? "italic text-green-500 hover:text-green-700" : ""
|
||||||
} ${burn ? "line-through text-orange-500 hover:text-orange-700" : ""}`}
|
} ${burn ? "line-through text-orange-500 hover:text-orange-700" : ""} ${
|
||||||
|
selfDestruct ? "line-through" : ""
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
{mint && (
|
{mint && (
|
||||||
<span className="text-green-500" title="Mint address">
|
<span className="text-green-500" title="Mint address">
|
||||||
|
|
|
@ -36,11 +36,11 @@ const InternalSelfDestruct: React.FC<InternalSelfDestructProps> = ({
|
||||||
<span>Contract</span>
|
<span>Contract</span>
|
||||||
<div className="flex items-baseline">
|
<div className="flex items-baseline">
|
||||||
<AddressHighlighter address={transfer.from}>
|
<AddressHighlighter address={transfer.from}>
|
||||||
<DecoratedAddressLink address={transfer.from} />
|
<DecoratedAddressLink address={transfer.from} selfDestruct />
|
||||||
</AddressHighlighter>
|
</AddressHighlighter>
|
||||||
</div>
|
</div>
|
||||||
{network?.chainId === 1 && transfer.to === CHI_ADDRESS && (
|
{network?.chainId === 1 && transfer.to === CHI_ADDRESS && (
|
||||||
<span className="text-gray-400">(CHI Gastoken)</span>
|
<span className="text-gray-400">(Chi Gastoken)</span>
|
||||||
)}
|
)}
|
||||||
{network?.chainId === 1 && transfer.to === GST2_ADDRESS && (
|
{network?.chainId === 1 && transfer.to === GST2_ADDRESS && (
|
||||||
<span className="text-gray-400">(GST2 Gastoken)</span>
|
<span className="text-gray-400">(GST2 Gastoken)</span>
|
||||||
|
|
Loading…
Reference in New Issue