Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Commit 3cc05d1

Browse files
authored
Merge pull request #63 from matiu/v/0.10
V/0.10
2 parents b3ee3d3 + 9f92987 commit 3cc05d1

File tree

4 files changed

+26
-13
lines changed

4 files changed

+26
-13
lines changed

bin/wallet-balance

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@
33
var program = require('commander');
44
var utils = require('./cli-utils');
55
program = utils.configureCommander(program);
6-
76
program
7+
.option('-c, --coin <coin>', 'coin (btc/bch)')
88
.parse(process.argv);
99

1010
var args = program.args;
1111

12+
13+
var opts = {};
14+
if (program.coin) {
15+
opts.coin = program.coin
16+
}
17+
1218
utils.getClient(program, {
1319
mustExist: true
1420
}, function(client) {
15-
client.getBalance({}, function(err, x) {
21+
client.getBalance(opts, function(err, x) {
1622
utils.die(err);
1723
console.log('* Wallet balance %s (Locked %s)', utils.renderAmount(x.totalAmount), utils.renderAmount(x.lockedAmount));
1824
});

bin/wallet-create

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ program = utils.configureCommander(program);
88
program
99
.option('-t, --testnet', 'Create a Testnet Wallet')
1010
.option('-p, --password', 'Encrypt wallet. Will ask password interactively')
11+
.option('-c, --coin <coin>', 'coin (btc/bch)')
1112
.usage('[options] <walletName> <m-n> [copayerName] <passphrase>')
1213
.parse(process.argv);
1314

@@ -19,6 +20,7 @@ var walletName = args[0];
1920
var copayerName = args[2] || process.env.USER;
2021
var passphrase = args[3];
2122
var network = program.testnet ? 'testnet' : 'livenet';
23+
var coin = program.coin ? program.coin : 'btc';
2224

2325
var mn;
2426
try {
@@ -34,6 +36,7 @@ utils.getClient(program, {
3436
network: network,
3537
passphrase: passphrase,
3638
language: 'en',
39+
coin: coin,
3740
});
3841
client.createWallet(walletName, copayerName, mn[0], mn[1], {
3942
network: network

bin/wallet-import

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ utils.getClient(program, {
5050
passphrase: passphrase,
5151
}, function(err) {
5252
if (err)
53-
utils.die('Could not import');
53+
utils.die('Could not import' + err);
5454

5555
utils.saveClient(program, client, function() {
5656
var access = client.canSign() ? 'with signing capability' : 'without signing capability';

package.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "bitcore-wallet",
33
"description": "A CLI Mutisig HD Bitcoin Wallet, demo for Bitcore Wallet Service",
44
"author": "BitPay Inc",
5-
"version": "0.9.0",
5+
"version": "0.10.0",
66
"keywords": [
77
"bitcoin",
88
"copay",
@@ -18,7 +18,7 @@
1818
},
1919
"dependencies": {
2020
"async": "^2.5.0",
21-
"bitcore-wallet-client": "5.4.0",
21+
"bitcore-wallet-client": "6.4.0",
2222
"commander": "^2.6.0",
2323
"lodash": "^3.3.1",
2424
"moment": "^2.9.0",
@@ -37,13 +37,16 @@
3737
"test": "./node_modules/.bin/mocha",
3838
"coveralls": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
3939
},
40-
"contributors": [{
41-
"name": "Ivan Socolsky",
42-
"email": "ivan@gmail.com"
43-
}, {
44-
"name": "Matias Alejo Garcia",
45-
"email": "ematiu@gmail.com"
46-
}],
40+
"contributors": [
41+
{
42+
"name": "Ivan Socolsky",
43+
"email": "ivan@gmail.com"
44+
},
45+
{
46+
"name": "Matias Alejo Garcia",
47+
"email": "ematiu@gmail.com"
48+
}
49+
],
4750
"bin": {
4851
"wallet": "./bin/wallet",
4952
"wallet-address": "./bin/wallet-address",
@@ -67,5 +70,6 @@
6770
"wallet-txproposals": "./bin/wallet-txproposals",
6871
"wallet-mnemonic": "./bin/wallet-mnemonic",
6972
"wallet-derive": "./bin/wallet-derive"
70-
}
73+
},
74+
"licence": "MIT"
7175
}

0 commit comments

Comments
 (0)