You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
790 B
38 lines
790 B
#!/usr/bin/env node
|
|
|
|
var _ = require('lodash');
|
|
var program = require('commander');
|
|
var Client = require('../lib/client');
|
|
var common = require('./common');
|
|
|
|
program
|
|
.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 cli = new Client({
|
|
filename: program.config
|
|
});
|
|
|
|
cli.getTxProposals({}, function(err, txps) {
|
|
common.die(err);
|
|
|
|
if (program.verbose)
|
|
console.log('* Raw Server Response:\n', txps); //TODO
|
|
|
|
var txp = common.findOneTxProposal(txps, txpid);
|
|
|
|
cli.removeTxProposal(txp, function(err) {
|
|
common.die(err);
|
|
|
|
console.log('Transaction removed.');
|
|
});
|
|
});
|
|
|