Fix selfdestruct display

This commit is contained in:
Willian Mitsuda 2021-11-22 14:16:33 -03:00
parent e640d11a16
commit 637ff5c9d8
1 changed files with 37 additions and 40 deletions

View File

@ -2,7 +2,6 @@ import React, { useState } from "react";
import { Switch } from "@headlessui/react"; import { Switch } from "@headlessui/react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faBomb } from "@fortawesome/free-solid-svg-icons/faBomb"; import { faBomb } from "@fortawesome/free-solid-svg-icons/faBomb";
import { faArrowRight } from "@fortawesome/free-solid-svg-icons/faArrowRight";
import TransactionAddress from "../components/TransactionAddress"; import TransactionAddress from "../components/TransactionAddress";
import FormattedBalance from "../components/FormattedBalance"; import FormattedBalance from "../components/FormattedBalance";
import FunctionSignature from "./FunctionSignature"; import FunctionSignature from "./FunctionSignature";
@ -48,16 +47,12 @@ const TraceInput: React.FC<TraceInputProps> = ({
> >
<div className="flex items-baseline"> <div className="flex items-baseline">
<span className="text-xs text-gray-400 lowercase">{t.type}</span> <span className="text-xs text-gray-400 lowercase">{t.type}</span>
{t.type === "SELFDESTRUCT" && ( {t.type === "SELFDESTRUCT" ? (
<>
<span className="pl-2 text-red-800" title="Self destruct"> <span className="pl-2 text-red-800" title="Self destruct">
<FontAwesomeIcon icon={faBomb} size="1x" /> <FontAwesomeIcon icon={faBomb} size="1x" />
</span> </span>
<span className="pl-px pr-2 text-xs text-gray-400 lowercase"> ) : (
<FontAwesomeIcon icon={faArrowRight} size="1x" /> <>
</span>
</>
)}
<span> <span>
<TransactionAddress <TransactionAddress
address={t.to} address={t.to}
@ -92,6 +87,8 @@ const TraceInput: React.FC<TraceInputProps> = ({
</span> </span>
</> </>
)} )}
</>
)}
</div> </div>
{hasParams && expanded && ( {hasParams && expanded && (
<> <>