remove visitContracts

pull/1/head
yann300 7 years ago
parent 6abb3dd46f
commit 230e4bc5bf
  1. 3
      src/app.js
  2. 4
      src/app/tabs/compile-tab.js
  3. 2
      src/app/tabs/run-tab.js

@ -704,9 +704,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
document.querySelector(`.${css.dragbar2}`).style.right = delta + 'px' document.querySelector(`.${css.dragbar2}`).style.right = delta + 'px'
onResize() onResize()
}, },
visitContracts: (cb) => {
compiler.visitContracts(cb)
},
switchFile: function (path) { switchFile: function (path) {
fileManager.switchFile(path) fileManager.switchFile(path)
}, },

@ -156,7 +156,7 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
} }
if (!error) { if (!error) {
if (data.contracts) { if (data.contracts) {
appAPI.visitContracts((contract) => { opts.compiler.visitContracts((contract) => {
opts.renderer.error(contract.name, $(errorContainer), {type: 'success'}) opts.renderer.error(contract.name, $(errorContainer), {type: 'success'})
}) })
} }
@ -190,7 +190,7 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
contractNames.innerHTML = '' contractNames.innerHTML = ''
if (success) { if (success) {
contractNames.removeAttribute('disabled') contractNames.removeAttribute('disabled')
appAPI.visitContracts((contract) => { opts.compiler.visitContracts((contract) => {
contractsDetails[contract.name] = parseContracts(contract.name, contract.object, opts.compiler.getSource(contract.file)) contractsDetails[contract.name] = parseContracts(contract.name, contract.object, opts.compiler.getSource(contract.file))
var contractName = yo` var contractName = yo`
<option> <option>

@ -417,7 +417,7 @@ function contractDropdown (events, appAPI, appEvents, opts, self) {
contractNames.innerHTML = '' contractNames.innerHTML = ''
if (success) { if (success) {
selectContractNames.removeAttribute('disabled') selectContractNames.removeAttribute('disabled')
appAPI.visitContracts((contract) => { opts.compiler.visitContracts((contract) => {
contractNames.appendChild(yo`<option>${contract.name}</option>`) contractNames.appendChild(yo`<option>${contract.name}</option>`)
}) })
} else { } else {

Loading…
Cancel
Save