lint is king

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

@ -784,19 +784,18 @@ function run () {
runCompiler()
if (queryParams.get().context) {
let context = queryParams.get().context;
let endPointUrl = queryParams.get().endPointUrl;
executionContext.setContext(context, endpointurl,
let context = queryParams.get().context
let endPointUrl = queryParams.get().endPointUrl
executionContext.setContext(context, endPointUrl,
() => {
modalDialogCustom.confirm(null, 'Are you sure you want to connect to an ethereum node?', () => {
if (!endPointUrl) {
endPointUrl = 'http://localhost:8545'
}
modalDialogCustom.prompt(null, 'Web3 Provider Endpoint', endPointUrl, (target) => {
executionContext.setProviderFromEndpoint(target, context)
}, () => {})
if (!endPointUrl) {
endPointUrl = 'http://localhost:8545'
}
modalDialogCustom.prompt(null, 'Web3 Provider Endpoint', endPointUrl, (target) => {
executionContext.setProviderFromEndpoint(target, context)
}, () => {})
}, () => {})
},
(alertMsg) => {
modalDialogCustom.alert(alertMsg)

@ -239,7 +239,7 @@ function runTab (container, appAPI, appEvents, opts) {
// DROPDOWN
var selectExEnv = el.querySelector('#selectExEnvOptions')
function setFinalContext() {
function setFinalContext () {
// set the final context. Cause it is possible that this is not the one we've originaly selected
selectExEnv.value = executionContext.getProvider()
fillAccountsList(appAPI, el)
@ -247,20 +247,18 @@ function runTab (container, appAPI, appEvents, opts) {
}
selectExEnv.addEventListener('change', function (event) {
let context = selectExEnv.options[selectExEnv.selectedIndex].value;
let context = selectExEnv.options[selectExEnv.selectedIndex].value
executionContext.executionContextChange(context, null, () => {
modalDialogCustom.confirm(null, 'Are you sure you want to connect to an ethereum node?', () => {
modalDialogCustom.prompt(null, 'Web3 Provider Endpoint', 'http://localhost:8545', (target) => {
executionContext.setProviderFromEndpoint(target, context, (alertMsg) => {
if (alertMsg) {
modalDialogCustom.alert(alertMsg)
}
setFinalContext()
})
}, setFinalContext)
modalDialogCustom.prompt(null, 'Web3 Provider Endpoint', 'http://localhost:8545', (target) => {
executionContext.setProviderFromEndpoint(target, context, (alertMsg) => {
if (alertMsg) {
modalDialogCustom.alert(alertMsg)
}
setFinalContext()
})
}, setFinalContext)
}, setFinalContext)
}, (alertMsg) => {
modalDialogCustom.alert(alertMsg)
}, setFinalContext)

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

Loading…
Cancel
Save