Merge pull request #60 from harmony-one/feature/54-contract-read-fix

fix: improve validation
pull/63/head
potvik 3 years ago committed by GitHub
commit 19e26368f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/pages/AddressPage/ContractDetails/ConnectWallets.tsx
  2. 7
      src/pages/AddressPage/ContractDetails/index.tsx

@ -70,10 +70,13 @@ export const Wallet = (params: {
});
}, []);
const validChainId = chainId === 1666600000 || chainId === 1666700000;
const isMainNet =
process.env.REACT_APP_RPC_URL_SHARD0 === "https://api.s0.t.hmny.io/";
const validChainId = isMainNet
? chainId === 1666600000
: chainId === 1666700000;
return (
<Box margin={{ bottom: "medium" }}>
{metamaskAddress ? (

@ -155,7 +155,12 @@ export const VerifiedContractDetails = (props: {
let abiString = "";
const validChainId = chainId === 1666600000 || chainId === 1666700000;
const isMainNet =
process.env.REACT_APP_RPC_URL_SHARD0 === "https://api.s0.t.hmny.io/";
const validChainId = isMainNet
? chainId === 1666600000
: chainId === 1666700000;
try {
abiString = JSON.stringify(props.sourceCode.abi, null, 4);

Loading…
Cancel
Save