Skip to content

Commit

Permalink
remove compilationMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Mar 29, 2018
1 parent 99f237d commit 980bab6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
}
})
},
compilationMessage: (message, container, options) => {
renderer.error(message, container, options)
},
currentCompiledSourceCode: () => {
if (compiler.lastCompilationResult.source) {
return compiler.lastCompilationResult.source.sources[compiler.lastCompilationResult.source.target]
Expand Down Expand Up @@ -784,7 +781,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
var rhpOpts = {
pluginAPI: new PluginAPI(self, compiler),
udapp: udapp,
compiler: compiler
compiler: compiler,
renderer: renderer
}

self._components.righthandpanel = new RighthandPanel(rhpAPI, rhpEvents, rhpOpts)
Expand Down
12 changes: 6 additions & 6 deletions src/app/tabs/compile-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
var el = yo`
<div class="${css.compileTabView}" id="compileTabView">
${compileContainer}
${contractNames(appAPI, appEvents)}
${contractNames(appAPI, appEvents, opts)}
${errorContainer}
</div>
`
Expand All @@ -124,7 +124,7 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
section CONTRACT DROPDOWN, DETAILS AND PUBLISH
------------------------------------------------ */

function contractNames (appAPI, appEvents) {
function contractNames (appAPI, appEvents, opts) {
var contractsDetails = {}

appEvents.compiler.register('compilationStarted', () => {
Expand All @@ -146,26 +146,26 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
var error = false
if (data['error']) {
error = true
appAPI.compilationMessage(data['error'].formattedMessage, $(errorContainer), {type: data['error'].severity})
opts.renderer.error(data['error'].formattedMessage, $(errorContainer), {type: data['error'].severity})
}
if (data['errors']) {
if (data['errors'].length) error = true
data['errors'].forEach(function (err) {
appAPI.compilationMessage(err.formattedMessage, $(errorContainer), {type: err.severity})
opts.renderer.error(err.formattedMessage, $(errorContainer), {type: err.severity})
})
}
if (!error) {
if (data.contracts) {
appAPI.visitContracts((contract) => {
appAPI.compilationMessage(contract.name, $(errorContainer), {type: 'success'})
opts.renderer.error(contract.name, $(errorContainer), {type: 'success'})
})
}
}
})

appEvents.staticAnalysis.register('staticAnaysisWarning', (count) => {
if (count) {
appAPI.compilationMessage(`Static Analysis raised ${count} warning(s) that requires your attention.`, $(errorContainer), {
opts.renderer.error(`Static Analysis raised ${count} warning(s) that requires your attention.`, $(errorContainer), {
type: 'warning',
click: () => appAPI.switchTab('staticanalysisView')
})
Expand Down

0 comments on commit 980bab6

Please sign in to comment.