From b279d96ebe549f2c2da953f90d6b1de9851b8f5a Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Fri, 10 Sep 2021 04:31:24 -0300 Subject: [PATCH] Improve sourcify sync indicators --- src/AddressTransactions.tsx | 33 +++++++++++++++++++++++++-------- src/address/Contracts.tsx | 5 ++++- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/AddressTransactions.tsx b/src/AddressTransactions.tsx index 371ff92..041f339 100644 --- a/src/AddressTransactions.tsx +++ b/src/AddressTransactions.tsx @@ -1,10 +1,4 @@ -import React, { - useState, - useEffect, - useMemo, - useContext, - Fragment, -} from "react"; +import React, { useState, useEffect, useMemo, useContext } from "react"; import { useParams, useLocation, @@ -17,6 +11,10 @@ import { getAddress, isAddress } from "@ethersproject/address"; import { Tab } from "@headlessui/react"; import queryString from "query-string"; import Blockies from "react-blockies"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faCircleNotch } from "@fortawesome/free-solid-svg-icons/faCircleNotch"; +import { faCheckCircle } from "@fortawesome/free-regular-svg-icons/faCheckCircle"; +import { faQuestionCircle } from "@fortawesome/free-regular-svg-icons/faQuestionCircle"; import StandardFrame from "./StandardFrame"; import StandardSubtitle from "./StandardSubtitle"; import Copy from "./components/Copy"; @@ -222,7 +220,26 @@ const AddressTransactions: React.FC = () => { Overview - Contract + + Contract{" "} + {rawMetadata === undefined ? ( + + + + ) : rawMetadata === null ? ( + + + + ) : ( + + + + )} + diff --git a/src/address/Contracts.tsx b/src/address/Contracts.tsx index 8e73a23..470da58 100644 --- a/src/address/Contracts.tsx +++ b/src/address/Contracts.tsx @@ -76,7 +76,10 @@ const Contracts: React.FC = ({ )}
{rawMetadata === null && ( - Couldn't find contract metadata in Sourcify repository. + + Address is not a contract or couldn't find contract metadata in + Sourcify repository. + )} {rawMetadata !== undefined && rawMetadata !== null && (