Commit af63ecb2 authored by ioedeveloper's avatar ioedeveloper

Modify autoCompile check and url param value

parent 2e42ac11
......@@ -71,7 +71,7 @@ module.exports = {
'Should load using URL compiler params': function (browser: NightwatchBrowser) {
browser
.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()
.pause(5000)
.clickLaunchIcon('solidity')
......
......@@ -74,9 +74,9 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
return {
...prevState,
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,
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,
evmVersion: (evmVersion !== null) && (evmVersion !== 'null') && (evmVersion !== undefined) && (evmVersion !== 'undefined') ? evmVersion : 'default'
}
......@@ -408,7 +408,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const checked = e.target.checked
api.setConfiguration('autoCompile', checked)
state.autoCompile && compile()
checked && compile()
setState(prevState => {
return { ...prevState, autoCompile: checked }
})
......
......@@ -16,7 +16,7 @@ export class CompileTab extends Plugin {
public runs
public evmVersion: string
public compilerImport
public eventz
public event
constructor (public api, public contentImport) {
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