Remove safeguards and fix small bugs to allow running otterscan against testnets; testing on goerli
This commit is contained in:
parent
fd96c4e854
commit
76182a4efe
|
@ -67,8 +67,12 @@ const Block: React.FC = () => {
|
|||
|
||||
const _block = provider.formatter.block(_rawBlock);
|
||||
const extBlock: ExtendedBlock = {
|
||||
blockReward: provider.formatter.bigNumber(_rawIssuance.blockReward),
|
||||
unclesReward: provider.formatter.bigNumber(_rawIssuance.uncleReward),
|
||||
blockReward: provider.formatter.bigNumber(
|
||||
_rawIssuance.blockReward ?? 0
|
||||
),
|
||||
unclesReward: provider.formatter.bigNumber(
|
||||
_rawIssuance.uncleReward ?? 0
|
||||
),
|
||||
feeReward: fees,
|
||||
size: provider.formatter.number(_rawBlock.size),
|
||||
sha3Uncles: _rawBlock.sha3Uncles,
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
import React, { useState, useRef } from "react";
|
||||
import React, { useState, useRef, useContext } from "react";
|
||||
import { Link, useHistory } from "react-router-dom";
|
||||
import useKeyboardShortcut from "use-keyboard-shortcut";
|
||||
import PriceBox from "./PriceBox";
|
||||
import { RuntimeContext } from "./useRuntime";
|
||||
|
||||
const Title: React.FC = () => {
|
||||
const { provider } = useContext(RuntimeContext);
|
||||
const [search, setSearch] = useState<string>();
|
||||
const [canSubmit, setCanSubmit] = useState<boolean>(false);
|
||||
const history = useHistory();
|
||||
|
@ -43,7 +45,7 @@ const Title: React.FC = () => {
|
|||
</div>
|
||||
</Link>
|
||||
<div className="flex items-baseline space-x-3">
|
||||
<PriceBox />
|
||||
{provider?.network.chainId === 1 && <PriceBox />}
|
||||
<form
|
||||
className="flex"
|
||||
onSubmit={handleSubmit}
|
||||
|
|
|
@ -33,10 +33,7 @@ export const useProvider = (
|
|||
setConnStatus(ConnectionStatus.CONNECTING);
|
||||
|
||||
const tryToConnect = async () => {
|
||||
const provider = new ethers.providers.JsonRpcProvider(
|
||||
erigonURL,
|
||||
"mainnet"
|
||||
);
|
||||
const provider = new ethers.providers.JsonRpcProvider(erigonURL);
|
||||
|
||||
// Check if it is at least a regular ETH node
|
||||
let blockNumber: number = 0;
|
||||
|
|
Loading…
Reference in New Issue