disable verify for not supported VM

pull/3818/head
Aniket-Engg 1 year ago committed by Aniket
parent 5716685087
commit 5e195c7957
  1. 5
      apps/etherscan/src/app/views/VerifyView.tsx

@ -41,7 +41,7 @@ export const VerifyView: React.FC<Props> = ({
useEffect(() => {
if (client && client.on) {
client.on("blockchain" as any, 'networkStatus', (result) => {
setNetworkName(`${result.network.name} ${result.network.id !== '-' ? `(Chain id: ${result.network.id})` : ''}`)
setNetworkName(`${result.network.name} ${result.network.id !== '-' ? `(Chain id: ${result.network.id})` : '(Not supported)'}`)
})
}
return () => {
@ -248,7 +248,8 @@ export const VerifyView: React.FC<Props> = ({
!touched.contractName ||
!touched.contractAddress ||
(touched.contractName && errors.contractName) ||
(touched.contractAddress && errors.contractAddress)
(touched.contractAddress && errors.contractAddress) ||
(networkName === 'VM (Not supported)')
? true
: false}
/>

Loading…
Cancel
Save