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