diff --git a/js/src/util/solidity.js b/js/src/util/solidity.js index f09213ac5..72e8e6d81 100644 --- a/js/src/util/solidity.js +++ b/js/src/util/solidity.js @@ -19,7 +19,7 @@ import solc from 'solc/browser-wrapper'; export default class SolidityUtils { static compile (data, compiler) { - const { sourcecode, build, optimized = 1 } = data; + const { sourcecode, build, optimize } = data; const start = Date.now(); console.log('[solidity] compiling...'); @@ -28,7 +28,7 @@ export default class SolidityUtils { '': sourcecode }; - const compiled = compiler.compile({ sources: input }, optimized); + const compiled = compiler.compile({ sources: input }, optimize ? 1 : 0); const time = Math.round((Date.now() - start) / 100) / 10; console.log(`[solidity] done compiling in ${time}s`); diff --git a/js/src/views/WriteContract/writeContract.css b/js/src/views/WriteContract/writeContract.css index feed8616e..c5cefcf7a 100644 --- a/js/src/views/WriteContract/writeContract.css +++ b/js/src/views/WriteContract/writeContract.css @@ -26,6 +26,16 @@ color: #ccc; } +.toggles { + display: flex; + flex-direction: row; + margin: 1em 0 0; + + > * { + flex: 1; + } +} + .container { padding: 1em 0; display: flex; diff --git a/js/src/views/WriteContract/writeContract.js b/js/src/views/WriteContract/writeContract.js index 5266fb625..c95c09c04 100644 --- a/js/src/views/WriteContract/writeContract.js +++ b/js/src/views/WriteContract/writeContract.js @@ -16,7 +16,7 @@ import React, { PropTypes, Component } from 'react'; import { observer } from 'mobx-react'; -import { MenuItem } from 'material-ui'; +import { MenuItem, Toggle } from 'material-ui'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import CircularProgress from 'material-ui/CircularProgress'; @@ -283,6 +283,24 @@ class WriteContract extends Component { : null } +