test passing, rebased

This commit is contained in:
Matias Alejo Garcia 2015-08-04 15:18:12 -03:00
parent cfbf184502
commit 3122e9ba7c
2 changed files with 26 additions and 2 deletions

View File

@ -331,7 +331,6 @@ WalletService.prototype._notify = function(type, data, opts, cb) {
* @param {string} opts.xPubKey - Extended Public Key for this copayer.
* @param {string} opts.requestPubKey - Public Key used to check requests from this copayer.
* @param {string} opts.copayerSignature - S(name|xPubKey|requestPubKey). Used by other copayers to verify the that the copayer joining knows the wallet secret.
* @param {string} opts.isTemporaryRequestKey - requestPubKey will be marked as 'temporary' (only used for Copay migration)
*/
WalletService.prototype.joinWallet = function(opts, cb) {
var self = this;
@ -366,7 +365,6 @@ WalletService.prototype.joinWallet = function(opts, cb) {
xPubKey: opts.xPubKey,
requestPubKey: opts.requestPubKey,
signature: opts.copayerSignature,
isTemporaryRequestKey: !!opts.isTemporaryRequestKey,
});
self.storage.fetchCopayerLookup(copayer.id, function(err, res) {

View File

@ -1404,6 +1404,32 @@ describe('Wallet service', function() {
});
});
describe.only('Multiple request Pub Keys', function() {
var server, wallet;
beforeEach(function(done) {
helpers.createAndJoinWallet(2, 2, function(s, w) {
server = s;
wallet = w;
done();
});
});
it('#addCopayerRequestKey', function(done) {
helpers.stubUtxos(server, wallet, [1, 'u2', 3], function() {
server.getBalance({}, function(err, balance) {
should.not.exist(err);
should.exist(balance);
balance.totalAmount.should.equal(helpers.toSatoshi(6));
done();
});
});
});
});
describe('#getBalance', function() {
var server, wallet;
beforeEach(function(done) {