|
|
@ -90,10 +90,18 @@ class CompilerMetadata extends Plugin { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// TODO: is only called by dropdownLogic and can be moved there
|
|
|
|
// TODO: is only called by dropdownLogic and can be moved there
|
|
|
|
deployMetadataOf (contractName) { |
|
|
|
deployMetadataOf (contractName, fileLocation) { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
var provider = this.fileManager.currentFileProvider() |
|
|
|
var provider = this.fileManager.currentFileProvider() |
|
|
|
var path = this.fileManager.currentPath() |
|
|
|
let path |
|
|
|
|
|
|
|
if (fileLocation) { |
|
|
|
|
|
|
|
path = fileLocation.split('/') |
|
|
|
|
|
|
|
path.pop() |
|
|
|
|
|
|
|
path = path.join('/') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
path = this.fileManager.currentPath() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (provider && path) { |
|
|
|
if (provider && path) { |
|
|
|
this.blockchain.detectNetwork((err, { id, name } = {}) => { |
|
|
|
this.blockchain.detectNetwork((err, { id, name } = {}) => { |
|
|
|
if (err) { |
|
|
|
if (err) { |
|
|
|