show message if debugging on kovan (#1149)

fix https://github.com/ethereum/remix-project/issues/459
pull/5370/head
yann300 4 years ago committed by GitHub
parent ae8c292fde
commit 2ba70d9d19
  1. 13
      libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx

@ -166,6 +166,19 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
}
const web3 = await debuggerModule.getDebugWeb3()
try {
if (await web3.eth.net.getId() === 42) {
setState(prevState => {
return {
...prevState,
validationError: 'The Kovan network is unfortunately not supported.'
}
})
return
}
} catch (e) {
console.error(e)
}
let currentReceipt
try {
currentReceipt = await web3.eth.getTransactionReceipt(txNumber)

Loading…
Cancel
Save