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.
35 lines
1.1 KiB
35 lines
1.1 KiB
#!/usr/bin/env node
|
|
|
|
var _ = require('lodash');
|
|
var program = require('commander');
|
|
var Client = require('../lib/client');
|
|
var utils = require('./cli-utils');
|
|
program = utils.configureCommander(program);
|
|
|
|
program
|
|
.parse(process.argv);
|
|
|
|
utils.getClient(program, function (client) {
|
|
client.getStatus(function(err, x) {
|
|
utils.die(err);
|
|
|
|
if (x.wallet.n == 1) {
|
|
console.log('Confirmations only work on shared wallets');
|
|
process.exit(1);
|
|
}
|
|
console.log('\n To be sure that no copayer has joined this wallet more than once, you can asked them for their confirmation number. They can get theirs by running the bit-confirm command.');
|
|
console.log('\n * Copayer confirmation IDs:');
|
|
|
|
var myConfirmationId;
|
|
_.each(x.wallet.copayers, function(x) {
|
|
var confirmationId = utils.confirmationId(x);
|
|
if (x.id != client.credentials.copayerId)
|
|
console.log('\t\t* %s : %s', x.name, confirmationId);
|
|
else
|
|
myConfirmationId = confirmationId;
|
|
});
|
|
|
|
console.log('\t\t---');
|
|
console.log('\t\tYour confirmation ID: %s', myConfirmationId);
|
|
});
|
|
});
|
|
|