Merge pull request #263 from isocolsky/client_version

Store client version
This commit is contained in:
Matias Alejo Garcia 2015-06-29 09:09:08 -03:00
commit 415d759fd0
2 changed files with 5 additions and 2 deletions

View File

@ -158,6 +158,7 @@ WalletService.getInstanceWithAuth = function(opts, cb) {
server.copayerId = opts.copayerId;
server.walletId = copayer.walletId;
server.clientVersion = opts.clientVersion;
return cb(null, server);
});
};

View File

@ -632,9 +632,7 @@ describe('Wallet service', function() {
describe('#getInstanceWithAuth', function() {
it('should get server instance for existing copayer', function(done) {
helpers.createAndJoinWallet(1, 2, function(s, wallet) {
var xpriv = TestData.copayers[0].xPrivKey;
var priv = TestData.copayers[0].privKey_1H_0;
@ -645,8 +643,12 @@ describe('Wallet service', function() {
copayerId: wallet.copayers[0].id,
message: 'hello world',
signature: sig,
clientVersion: 'bwc-0.0.1',
}, function(err, server) {
should.not.exist(err);
server.walletId.should.equal(wallet.id);
server.copayerId.should.equal(wallet.copayers[0].id);
server.clientVersion.should.equal('bwc-0.0.1');
done();
});
});