sign/reject with args (if only one txp)

This commit is contained in:
Matias Alejo Garcia 2015-02-15 19:06:11 -03:00
parent 1a8eaf0c7f
commit 7c1860117e
5 changed files with 21 additions and 25 deletions

0
bit-wallet/bit-broadcast Normal file → Executable file
View File

View File

@ -13,9 +13,7 @@ program
.parse(process.argv); .parse(process.argv);
var args = program.args; var args = program.args;
if (!args[0]) var txpid = args[0] || '';
program.help();
var txpid = args[0];
var reason = args[1] || ''; var reason = args[1] || '';
var client = utils.getClient(program); var client = utils.getClient(program);

View File

@ -12,10 +12,7 @@ program
.parse(process.argv); .parse(process.argv);
var args = program.args; var args = program.args;
if (!args[0]) var txpid = args[0] || '';
program.help();
var txpid = args[0];
var client = utils.getClient(program); var client = utils.getClient(program);
client.getTxProposals({}, function(err, txps) { client.getTxProposals({}, function(err, txps) {

View File

@ -105,7 +105,7 @@ TxProposal.prototype._getBitcoreTx = function() {
}; };
TxProposal.prototype.getNetworkName = function() { TxProposal.prototype.getNetworkName = function() {
return Bitcore.Address(this.toAddress).toObject().networkName; return Bitcore.Address(this.toAddress).toObject().network;
}; };
TxProposal.prototype.getRawTx = function() { TxProposal.prototype.getRawTx = function() {

View File

@ -317,6 +317,7 @@ CopayServer.prototype._getBlockExplorer = function(provider, network) {
url = 'https://test-insight.bitpay.com:443' url = 'https://test-insight.bitpay.com:443'
break; break;
} }
console.log('[server.js.320:url:]',url); //TODO
return new Explorers.Insight(url, network); return new Explorers.Insight(url, network);
break; break;
} }
@ -698,7 +699,7 @@ CopayServer.prototype.broadcastTx = function(opts, cb) {
txid: txid txid: txid
}); });
return cb(null, txp); return cb(null, txid);
}); });
}); });
}); });