fallback to vm if provider disconnect

pull/5370/head
yann300 3 years ago
parent f6d537d385
commit a6a0d3d5bc
  1. 3
      apps/remix-ide/src/app/tabs/abstract-provider.tsx

@ -128,6 +128,9 @@ export abstract class AbstractProvider extends Plugin {
const result = await this.provider.send(data.method, data.params) const result = await this.provider.send(data.method, data.params)
resolve({ jsonrpc: '2.0', result, id: data.id }) resolve({ jsonrpc: '2.0', result, id: data.id })
} catch (error) { } catch (error) {
if (error && error.message && error.message.includes('net_version') && error.message.includes('SERVER_ERROR')) {
this.switchAway(true)
}
reject(error) reject(error)
} }
} else { } else {

Loading…
Cancel
Save