Commit 230e4bc5 authored by yann300's avatar yann300

remove visitContracts

parent 6abb3dd4
...@@ -704,9 +704,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -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 = {}) { ...@@ -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 = {}) { ...@@ -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) { ...@@ -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 {
......
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