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.

32 lines
745 B

10 years ago
#!/usr/bin/env node
var _ = require('lodash');
var program = require('commander');
10 years ago
var Client = require('../lib/client');
10 years ago
var utils = require('./cli-utils');
var utils = require('./cli-utils');
program = utils.configureCommander(program);
10 years ago
program
.usage('[options] <txpid>')
.parse(process.argv);
var args = program.args;
var txpid = args[0] || '';
10 years ago
utils.getClient(program, function (client) {
client.getTxProposals({}, function(err, txps) {
utils.die(err);
10 years ago
if (program.verbose)
console.log('* Raw Server Response:\n', txps); //TODO
10 years ago
var txp = utils.findOneTxProposal(txps, txpid);
client.removeTxProposal(txp, function(err) {
utils.die(err);
10 years ago
console.log('Transaction removed.');
});
10 years ago
});
});