diff --git a/src/app.js b/src/app.js index cff05fc284..720788e895 100644 --- a/src/app.js +++ b/src/app.js @@ -214,8 +214,13 @@ function run () { }, getValue: (cb) => { try { - var comp = $('#value').val().split(' ') - cb(null, executionContext.web3().toWei(comp[0], comp.slice(1).join(' '))) + var number = document.querySelector('#value').value + var select = document.getElementById('unit') + var index = select.selectedIndex + var selectedUnit = select.querySelectorAll('option')[index].innerHTML + var unit = '' + if (selectedUnit === 'wei') { unit = 'wei' } + cb(null, executionContext.web3().toWei(number, unit)) } catch (e) { cb(e) } diff --git a/src/app/tabs/run-tab.js b/src/app/tabs/run-tab.js index 3aaac2477f..b8c2484aa2 100644 --- a/src/app/tabs/run-tab.js +++ b/src/app/tabs/run-tab.js @@ -45,6 +45,16 @@ var css = csjs` .col2 { ${styles.rightPanel.runTab.input_RunTab} } + .col2_1 { + ${styles.rightPanel.runTab.input_RunTab} + width: 165px; + min-width: 165px; + } + .col2_2 { + ${styles.rightPanel.runTab.dropdown_RunTab} + width: 82px; + min-width: 82px; + } .select { ${styles.rightPanel.runTab.dropdown_RunTab} font-weight: normal; @@ -254,8 +264,8 @@ function contractDropdown (appAPI, appEvents, instanceContainer) { } }) - var atAddressButtonInput = yo`` - var createButtonInput = yo`` + var atAddressButtonInput = yo`` + var createButtonInput = yo`` var selectContractNames = yo`` var el = yo`