update pkr signature

This commit is contained in:
Matias Alejo Garcia 2015-04-01 17:55:40 -03:00
parent 089ca1fec6
commit c582842a99
2 changed files with 3 additions and 2 deletions

View File

@ -105,7 +105,7 @@ Wallet.prototype.addCopayer = function(copayer) {
this._updatePublicKeyRing();
};
Wallet.prototype.updateCopayerRequestKey = function(copayerId, requestPubKey) {
Wallet.prototype.updateCopayerRequestKey = function(copayerId, requestPubKey, signature) {
$.checkState(this.copayers.length == this.n);
var c = _.find(this.copayers, {
@ -117,6 +117,7 @@ Wallet.prototype.updateCopayerRequestKey = function(copayerId, requestPubKey) {
c.requestPubKey = requestPubKey;
c.isTemporaryRequestKey = false;
c.signature = signature;
this._updatePublicKeyRing();
};

View File

@ -211,7 +211,7 @@ WalletService.prototype.replaceTemporaryRequestKey = function(opts, cb) {
if (wallet.copayers.length != wallet.n)
return cb(new ClientError('WNOTFULL', 'Replace only works on full wallets'));
wallet.updateCopayerRequestKey(self.copayerId, opts.requestPubKey);
wallet.updateCopayerRequestKey(self.copayerId, opts.requestPubKey, opts.copayerSignature);
self.storage.storeWalletAndUpdateCopayersLookup(wallet, function(err) {
if (err) return cb(err);