diff --git a/src/app/execution/txFormat.js b/src/app/execution/txFormat.js index 3e700803b4..e045852349 100644 --- a/src/app/execution/txFormat.js +++ b/src/app/execution/txFormat.js @@ -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) => { diff --git a/src/app/execution/txHelper.js b/src/app/execution/txHelper.js index a9919f1020..62ea40925e 100644 --- a/src/app/execution/txHelper.js +++ b/src/app/execution/txHelper.js @@ -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] } }