Formatting.

pull/1/head
chriseth 9 years ago
parent c6062c5355
commit 23a412dff0
  1. 6
      libs/universal-dapp.js

@ -249,7 +249,7 @@ UniversalDApp.prototype.getCallButton = function(args) {
} }
}); });
else else
$result.replaceWeth(getOutput( $('<span>Contract needs to be linked to a library, this is only supported in the JavaScript VM for now.</span>'))); $result.replaceWith(getOutput( $('<span>Contract needs to be linked to a library, this is only supported in the JavaScript VM for now.</span>')));
return; return;
} else } else
data = args.bytecode + data.slice(8); data = args.bytecode + data.slice(8);
@ -316,7 +316,6 @@ UniversalDApp.prototype.getCallButton = function(args) {
} }
UniversalDApp.prototype.linkBytecode = function(contractName, cb) { UniversalDApp.prototype.linkBytecode = function(contractName, cb) {
console.log("linking " + contractName);
var bytecode = this.getContractByName(contractName).bytecode; var bytecode = this.getContractByName(contractName).bytecode;
if (bytecode.indexOf('_') < 0) if (bytecode.indexOf('_') < 0)
return cb(null, bytecode); return cb(null, bytecode);
@ -341,7 +340,6 @@ console.log("linking " + contractName);
}; };
UniversalDApp.prototype.deployLibrary = function(contractName, cb) { UniversalDApp.prototype.deployLibrary = function(contractName, cb) {
console.log("deploying librari " + contractName);
if (this.getContractByName(contractName).address) if (this.getContractByName(contractName).address)
return cb(null, this.getContractByName(contractName).address); return cb(null, this.getContractByName(contractName).address);
var self = this; var self = this;
@ -352,9 +350,7 @@ console.log("deploying librari " + contractName);
else self.deployLibrary(contractName, cb); else self.deployLibrary(contractName, cb);
}); });
else { else {
console.log(cb);
this.runTx(bytecode, {abi: {constant: false}, bytecode: bytecode}, function(err, result) { this.runTx(bytecode, {abi: {constant: false}, bytecode: bytecode}, function(err, result) {
console.log(cb);
if (err) return cb(err); if (err) return cb(err);
self.getContractByName(contractName).address = result.createdAddress; self.getContractByName(contractName).address = result.createdAddress;
cb(err, result.createdAddress); cb(err, result.createdAddress);

Loading…
Cancel
Save