fix cancel a connection to a web3 provider

pull/5370/head
yann300 3 years ago
parent c3ca6aebd6
commit 27dafb5428
  1. 4
      apps/remix-ide/src/app/tabs/abstract-provider.tsx

@ -72,8 +72,10 @@ export abstract class AbstractProvider extends Plugin {
})()
} catch (e) {
// the modal has been canceled/hide
const result = data.method === 'net_listening' ? 'canceled' : []
resolve({ jsonrpc: '2.0', result: result, id: data.id })
return
}
}
this.provider = new ethers.providers.JsonRpcProvider(value)
this.sendAsyncInternal(data, resolve, reject)
} else {

Loading…
Cancel
Save