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

Commit

Permalink
Merge pull request #102 from isocolsky/upgrade
Browse files Browse the repository at this point in the history
Upgrade to BWS 0.1.0 & BWU 0.1.0
  • Loading branch information
matiu committed Aug 4, 2015
2 parents 43a883f + f688588 commit b9921c8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bitcore-wallet-client",
"description": "Client for bitcore-wallet-service",
"author": "BitPay Inc",
"version": "0.0.43",
"version": "0.1.0",
"keywords": [
"bitcoin",
"copay",
Expand All @@ -23,7 +23,7 @@
"async": "^0.9.0",
"bitcore": "^0.12.9",
"bitcore-payment-protocol": "^0.11.0",
"bitcore-wallet-utils": "^0.0.20",
"bitcore-wallet-utils": "^0.1.0",
"browser-request": "^0.3.3",
"browserify": "^9.0.3",
"lodash": "^3.3.1",
Expand All @@ -34,12 +34,10 @@
"uglify": "^0.1.1"
},
"devDependencies": {
"bitcore-wallet-service": "0.0.45",
"bitcore-wallet-service": "0.1.0",
"chai": "^1.9.1",
"coveralls": "^2.11.2",
"grunt-jsdoc": "^0.5.8",
"http": "0.0.0",
"https": "^1.0.0",
"istanbul": "*",
"jsdoc": "^3.3.0-beta1",
"mocha": "^1.18.2",
Expand Down
15 changes: 10 additions & 5 deletions test/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,12 @@ describe('client API', function() {
describe('Wallet Creation', function() {
it('should check balance in a 1-1 ', function(done) {
helpers.createAndJoinWallet(clients, 1, 1, function() {
clients[0].getBalance(function(err, x) {
clients[0].getBalance(function(err, balance) {
should.not.exist(err);
balance.totalAmount.should.equal(0);
balance.availableAmount.should.equal(0);
balance.lockedAmount.should.equal(0);
balance.totalBytesToSendMax.should.equal(0);
done();
})
});
Expand Down Expand Up @@ -499,7 +503,7 @@ describe('client API', function() {
clients[0].getFeeLevels('livenet', function(err, levels) {
should.not.exist(err);
should.exist(levels);
_.difference(['emergency', 'priority', 'normal', 'economy'], _.pluck(levels, 'level')).should.be.empty;
_.difference(['priority', 'normal', 'economy'], _.pluck(levels, 'level')).should.be.empty;
done();
});
});
Expand Down Expand Up @@ -558,6 +562,7 @@ describe('client API', function() {
should.not.exist(err);
bal0.totalAmount.should.equal(10 * 1e8);
bal0.lockedAmount.should.equal(0);
bal0.totalBytesToSendMax.should.be.within(300, 400);
clients[1].getBalance(function(err, bal1) {
bal1.totalAmount.should.equal(10 * 1e8);
bal1.lockedAmount.should.equal(0);
Expand Down Expand Up @@ -616,7 +621,7 @@ describe('client API', function() {
x2.creatorName.should.equal('creator');
x2.message.should.equal('hello');
x2.amount.should.equal(30000);
x2.fee.should.equal(10000);
x2.fee.should.equal(3800);
x2.toAddress.should.equal('n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5');
x2.hasUnconfirmedInputs.should.equal(false);
done();
Expand Down Expand Up @@ -690,7 +695,7 @@ describe('client API', function() {
should.not.exist(err);
clients[0].getTx(x.id, function(err, x2) {
should.not.exist(err);
x2.fee.should.equal(2000);
x2.fee.should.equal(1300);
done();
});
});
Expand Down Expand Up @@ -1204,7 +1209,7 @@ describe('client API', function() {
should.not.exist(err);
x2.creatorName.should.equal('creator');
x2.message.should.equal('hello');
x2.fee.should.equal(10000);
x2.fee.should.equal(3300);
x2.outputs[0].toAddress.should.equal('n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5');
x2.outputs[0].amount.should.equal(10000);
x2.outputs[0].message.should.equal('world');
Expand Down

0 comments on commit b9921c8

Please sign in to comment.