lint is king

pull/1/head
Iuri Matias 7 years ago
parent 5a2a9a1a34
commit 5b03403b4a
  1. 7
      src/app.js
  2. 4
      src/app/tabs/run-tab.js
  3. 6
      src/execution-context.js

@ -784,9 +784,9 @@ function run () {
runCompiler() runCompiler()
if (queryParams.get().context) { if (queryParams.get().context) {
let context = queryParams.get().context; let context = queryParams.get().context
let endPointUrl = queryParams.get().endPointUrl; let endPointUrl = queryParams.get().endPointUrl
executionContext.setContext(context, endpointurl, executionContext.setContext(context, endPointUrl,
() => { () => {
modalDialogCustom.confirm(null, 'Are you sure you want to connect to an ethereum node?', () => { modalDialogCustom.confirm(null, 'Are you sure you want to connect to an ethereum node?', () => {
if (!endPointUrl) { if (!endPointUrl) {
@ -796,7 +796,6 @@ function run () {
executionContext.setProviderFromEndpoint(target, context) executionContext.setProviderFromEndpoint(target, context)
}, () => {}) }, () => {})
}, () => {}) }, () => {})
}, },
(alertMsg) => { (alertMsg) => {
modalDialogCustom.alert(alertMsg) modalDialogCustom.alert(alertMsg)

@ -247,9 +247,8 @@ function runTab (container, appAPI, appEvents, opts) {
} }
selectExEnv.addEventListener('change', function (event) { selectExEnv.addEventListener('change', function (event) {
let context = selectExEnv.options[selectExEnv.selectedIndex].value; let context = selectExEnv.options[selectExEnv.selectedIndex].value
executionContext.executionContextChange(context, null, () => { executionContext.executionContextChange(context, null, () => {
modalDialogCustom.confirm(null, 'Are you sure you want to connect to an ethereum node?', () => { modalDialogCustom.confirm(null, 'Are you sure you want to connect to an ethereum node?', () => {
modalDialogCustom.prompt(null, 'Web3 Provider Endpoint', 'http://localhost:8545', (target) => { modalDialogCustom.prompt(null, 'Web3 Provider Endpoint', 'http://localhost:8545', (target) => {
executionContext.setProviderFromEndpoint(target, context, (alertMsg) => { executionContext.setProviderFromEndpoint(target, context, (alertMsg) => {
@ -260,7 +259,6 @@ function runTab (container, appAPI, appEvents, opts) {
}) })
}, setFinalContext) }, setFinalContext)
}, setFinalContext) }, setFinalContext)
}, (alertMsg) => { }, (alertMsg) => {
modalDialogCustom.alert(alertMsg) modalDialogCustom.alert(alertMsg)
}, setFinalContext) }, setFinalContext)

@ -166,7 +166,7 @@ function ExecutionContext () {
var alertMsg = 'No injected Web3 provider found. ' var alertMsg = 'No injected Web3 provider found. '
alertMsg += 'Make sure your provider (e.g. MetaMask) is active and running ' alertMsg += 'Make sure your provider (e.g. MetaMask) is active and running '
alertMsg += '(when recently activated you may have to reload the page).' alertMsg += '(when recently activated you may have to reload the page).'
infoCb(alertMsg); infoCb(alertMsg)
return cb() return cb()
} else { } else {
executionContext = context executionContext = context
@ -177,7 +177,7 @@ function ExecutionContext () {
} }
if (context === 'web3') { if (context === 'web3') {
confirmCb(cb); confirmCb(cb)
} }
} }
@ -221,7 +221,7 @@ function ExecutionContext () {
cb(alertMsg) cb(alertMsg)
} }
} }
this.setProviderFromEndpoint = setProviderFromEndpoint; this.setProviderFromEndpoint = setProviderFromEndpoint
} }
module.exports = new ExecutionContext() module.exports = new ExecutionContext()

Loading…
Cancel
Save