Skip to content

Commit 2f319c0

Browse files
committed
fix wallet-balance coin and fee
1 parent 41d0586 commit 2f319c0

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

packages/bitcore-wallet/bin/wallet-balance

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ utils.getClient(program, {
2222
mustExist: true
2323
}, function(client) {
2424
client.getBalance(opts, function(err, x) {
25+
const coin = client.credentials.coin;
2526
utils.die(err);
26-
console.log('* Wallet balance %s (Locked %s)', utils.renderAmount(x.totalAmount), utils.renderAmount(x.lockedAmount));
27+
console.log('* Wallet balance %s (Locked %s)', utils.renderAmount(x.totalAmount, coin), utils.renderAmount(x.lockedAmount, coin));
2728
});
2829
});

packages/bitcore-wallet/bin/wallet-send

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var Bitcore_ = {
1212
program = utils.configureCommander(program);
1313

1414
program
15-
.option('--fee <fee-per-kb>', 'Fee per kB to use. Default 100bits.')
15+
.option('--fee <fee-policy>', 'Fee policy to use (default "normal") [urgent, priority/normal/economy/superEconomy] ')
1616
.usage('[options] <address> <amount> [note]')
1717
.description('Create a proposal for sending bitcoins to a destination address.\n The amount can be specified in bit, btc or sat (the default).');
1818

@@ -47,21 +47,16 @@ function confirmDiag(amountStr, note, cb) {
4747

4848

4949
function send(client, address, amount, fee, note, uri) {
50-
var amount, feePerKb;
51-
try {
52-
feePerKb = !_.isUndefined(fee) ? utils.parseAmount(fee) : 100e2;
53-
} catch (ex) {
54-
utils.die(ex);
55-
}
56-
50+
var amount;
5751

52+
fee = fee || 'normal';
5853
client.createTxProposal({
5954
outputs: [{
6055
toAddress: address,
6156
amount: amount,
6257
}],
6358
message: note,
64-
feePerKb: feePerKb,
59+
feeLevel: fee,
6560
payProUrl: uri,
6661
}, function(err, txp) {
6762
utils.die(err);

0 commit comments

Comments
 (0)