import React, { PropsWithChildren } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faClock } from "@fortawesome/free-solid-svg-icons/faClock"; import { faCheckCircle } from "@fortawesome/free-solid-svg-icons/faCheckCircle"; import { faTimesCircle } from "@fortawesome/free-solid-svg-icons/faTimesCircle"; 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 compatible 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);