update pkr signature
This commit is contained in:
parent
089ca1fec6
commit
c582842a99
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue