|
|
@ -3,28 +3,28 @@ |
|
|
|
var _ = require('lodash'); |
|
|
|
var program = require('commander'); |
|
|
|
var Client = require('../lib/client'); |
|
|
|
var utils = require('./cli-utils'); |
|
|
|
var utils = require('./cli-utils'); |
|
|
|
|
|
|
|
program |
|
|
|
.version('0.0.1') |
|
|
|
.option('-c,--config [file]', 'Wallet config filename') |
|
|
|
.option('-v,--verbose', 'be verbose') |
|
|
|
.usage('[options] <txpid>') |
|
|
|
.parse(process.argv); |
|
|
|
.version('0.0.1') |
|
|
|
.option('-c,--config [file]', 'Wallet config filename') |
|
|
|
.option('-v,--verbose', 'be verbose') |
|
|
|
.usage('[options] <txpid>') |
|
|
|
.parse(process.argv); |
|
|
|
|
|
|
|
var args = program.args; |
|
|
|
if (!args[0]) |
|
|
|
program.help(); |
|
|
|
|
|
|
|
var txpid = args[0]; |
|
|
|
var client = utils.getClient(program); |
|
|
|
var txpid = args[0]; |
|
|
|
var client = utils.getClient(program); |
|
|
|
|
|
|
|
client.getTxProposals({}, function(err, txps) { |
|
|
|
utils.die(err); |
|
|
|
client.getTxProposals({}, function(err, txps) { |
|
|
|
utils.die(err); |
|
|
|
|
|
|
|
var txp = utils.findOneTxProposal(txps, txpid); |
|
|
|
client.broadcastTxProposal(txp, function(err, txid) { |
|
|
|
utils.die(err); |
|
|
|
console.log('TX Broadcasted: ',txid); |
|
|
|
}); |
|
|
|
}); |
|
|
|
var txp = utils.findOneTxProposal(txps, txpid); |
|
|
|
client.broadcastTxProposal(txp, function(err, txid) { |
|
|
|
utils.die(err); |
|
|
|
console.log('TX Broadcasted: ', txid); |
|
|
|
}); |
|
|
|
}); |
|
|
|