Commit d5f6b073 authored by yann300's avatar yann300

fix library deployment

parent 08e13f1f
......@@ -81,7 +81,7 @@ module.exports = {
if (!libraryabi) {
return callback('Library ' + libraryName + ' not found.')
}
this.deployLibrary(libraryabi, udapp, (err, address) => {
this.deployLibrary(libraryName, libraryabi, udapp, (err, address) => {
if (err) {
return callback(err)
}
......@@ -108,7 +108,7 @@ module.exports = {
if (bytecode.indexOf('_') >= 0) {
this.linkBytecode(libraryName, (err, bytecode) => {
if (err) callback(err)
else this.deployLibrary(libraryName, callback)
else this.deployLibrary(libraryName, library, udapp, callback)
})
} else {
udapp.runTx({ data: bytecode, useCall: false }, (err, txResult) => {
......
......@@ -91,7 +91,7 @@ module.exports = {
getContractByName: function (contractName, contracts) {
for (var c in contracts) {
if (contracts[c].name === contractName) {
if (c === contractName) {
return contracts[c]
}
}
......
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