import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faClock, faCheckCircle, faTimesCircle, } from "@fortawesome/free-solid-svg-icons"; import { ConnectionStatus } from "./types"; import { OtterscanConfig } from "./useConfig"; type ConnectionErrorPanelProps = { connStatus: ConnectionStatus; config?: OtterscanConfig; }; const ConnectionErrorPanel: React.FC = ({ connStatus, config, }) => { return (
{config?.erigonURL}
{connStatus === ConnectionStatus.NOT_ETH_NODE && (

Make sure your browser can access the URL above.

If you want to customize the Erigon rpcdaemon endpoint, please follow these{" "} instructions .

)} {connStatus === ConnectionStatus.NOT_ERIGON && ( <> Make sure you rpcdaemon with Otterscan patches is up and running and the erigon_ namespace is enabled according to the{" "} instructions . )} {connStatus === ConnectionStatus.NOT_OTTERSCAN_PATCHED && ( <> Make sure you compiled rpcdaemon with Otterscan patches and enabled ots_ namespace according to the{" "} instructions . )}
); }; type StepProps = { type: "wait" | "ok" | "error"; msg: string; }; const Step: React.FC = React.memo(({ type, msg, children }) => ( <>
{type === "wait" && ( )} {type === "ok" && ( )} {type === "error" && ( )} {msg}
{children &&
{children}
} )); export default React.memo(ConnectionErrorPanel);