stop listening event to avoid memort leak

pull/3638/head
Aniket-Engg 2 years ago committed by Aniket
parent 146ba773c7
commit a5fc32da04
  1. 3
      apps/etherscan/src/app/views/VerifyView.tsx

@ -86,6 +86,7 @@ export const VerifyView: React.FC<Props> = ({
if (client) {
client.on("blockchain" as any, 'networkStatus', (result) => {
setNetworkName(result.network.name)
client.off("blockchain" as any, 'networkStatus')
})
}
return (<form onSubmit={handleSubmit}>
@ -100,7 +101,7 @@ export const VerifyView: React.FC<Props> = ({
disabled={true}
/>
</div>
<div className="form-group">
<label htmlFor="contractName">Contract Name</label>
<Field

Loading…
Cancel
Save