Commit af63ecb2 authored by ioedeveloper's avatar ioedeveloper

Modify autoCompile check and url param value

parent 2e42ac11
...@@ -71,7 +71,7 @@ module.exports = { ...@@ -71,7 +71,7 @@ module.exports = {
'Should load using URL compiler params': function (browser: NightwatchBrowser) { 'Should load using URL compiler params': function (browser: NightwatchBrowser) {
browser browser
.pause(5000) .pause(5000)
.url('http://127.0.0.1:8080/#optimize=true&runs=300&autoCompile&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js') .url('http://127.0.0.1:8080/#optimize=true&runs=300&autoCompile=true&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js')
.refresh() .refresh()
.pause(5000) .pause(5000)
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
......
...@@ -74,9 +74,9 @@ export const CompilerContainer = (props: CompilerContainerProps) => { ...@@ -74,9 +74,9 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
return { return {
...prevState, ...prevState,
hideWarnings: api.getConfiguration('hideWarnings') || false, hideWarnings: api.getConfiguration('hideWarnings') || false,
autoCompile: (autoCompile !== null) && (autoCompile !== undefined) ? autoCompile : api.getConfiguration('autoCompile') || false, autoCompile: typeof autoCompile === 'boolean' ? autoCompile : api.getConfiguration('autoCompile') || false,
includeNightlies: api.getConfiguration('includeNightlies') || false, includeNightlies: api.getConfiguration('includeNightlies') || false,
optimise: (optimize !== null) && (optimize !== undefined) ? optimize : api.getConfiguration('optimise') || false, optimise: typeof optimize === 'boolean' ? optimize : api.getConfiguration('optimise') || false,
runs: (runs !== null) && (runs !== 'null') && (runs !== undefined) && (runs !== 'undefined') ? runs : 200, runs: (runs !== null) && (runs !== 'null') && (runs !== undefined) && (runs !== 'undefined') ? runs : 200,
evmVersion: (evmVersion !== null) && (evmVersion !== 'null') && (evmVersion !== undefined) && (evmVersion !== 'undefined') ? evmVersion : 'default' evmVersion: (evmVersion !== null) && (evmVersion !== 'null') && (evmVersion !== undefined) && (evmVersion !== 'undefined') ? evmVersion : 'default'
} }
...@@ -408,7 +408,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { ...@@ -408,7 +408,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const checked = e.target.checked const checked = e.target.checked
api.setConfiguration('autoCompile', checked) api.setConfiguration('autoCompile', checked)
state.autoCompile && compile() checked && compile()
setState(prevState => { setState(prevState => {
return { ...prevState, autoCompile: checked } return { ...prevState, autoCompile: checked }
}) })
......
...@@ -16,7 +16,7 @@ export class CompileTab extends Plugin { ...@@ -16,7 +16,7 @@ export class CompileTab extends Plugin {
public runs public runs
public evmVersion: string public evmVersion: string
public compilerImport public compilerImport
public eventz public event
constructor (public api, public contentImport) { constructor (public api, public contentImport) {
super(profile) super(profile)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment