diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 2918f50772c..31e431c530e 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -316,6 +316,7 @@ class CompileTab extends ViewPlugin { publish (storage) { if (this.selectedContract) { var contract = this.data.contractsDetails[this.selectedContract] + if (contract.metadata === undefined || contract.metadata.length === 0) { modalDialogCustom.alert('This contract may be abstract, may not implement an abstract parent\'s methods completely or not invoke an inherited contract\'s constructor correctly.') } else { @@ -331,7 +332,7 @@ class CompileTab extends ViewPlugin { var result = yo`
${value.output.url}
${result}`) + modalDialogCustom.alert(`Published ${contract.name}'s Metadata`, yo`Metadata of "${contract.name.toLowerCase()}" was published successfully.
${result}`) } }, (item) => { // triggered each time there's a new verified publish (means hash correspond) this.fileProvider.addExternal('swarm/' + item.hash, item.content) @@ -348,7 +349,7 @@ class CompileTab extends ViewPlugin { var result = yo`
${value.output.url}
${result}`) + modalDialogCustom.alert(`Published ${contract.name}'s Metadata`, yo`Metadata of "${contract.name.toLowerCase()}" was published successfully.
${result}`) } }, (item) => { // triggered each time there's a new verified publish (means hash correspond) this.fileProvider.addExternal('ipfs/' + item.hash, item.content) diff --git a/src/app/ui/modal-dialog-custom.js b/src/app/ui/modal-dialog-custom.js index 93b139e88a4..d1e4bca67a6 100644 --- a/src/app/ui/modal-dialog-custom.js +++ b/src/app/ui/modal-dialog-custom.js @@ -3,8 +3,9 @@ var yo = require('yo-yo') var css = require('./styles/modal-dialog-custom-styles') module.exports = { - alert: function (text) { - return modal('', yo`