Add alert/help msg for injected provider not found when wanting to switch context

pull/1/head
holgerd77 7 years ago
parent 44390f5429
commit 77a74b3a94
  1. 3
      src/execution-context.js

@ -138,6 +138,9 @@ function ExecutionContext () {
if (context === 'injected') { if (context === 'injected') {
if (injectedProvider === undefined) { if (injectedProvider === undefined) {
var alertMsg = 'No injected Web3 provider found. '
alertMsg += 'Make sure your provider (e.g. MetaMask) is active and running.'
modalDialogCustom.alert(alertMsg)
cb() cb()
} else { } else {
executionContext = context executionContext = context

Loading…
Cancel
Save