txp* test passing
This commit is contained in:
parent
966818c53a
commit
753b890658
5 changed files with 417 additions and 193 deletions
|
|
@ -297,9 +297,10 @@ PublicKeyRing.prototype.forPaths = function(paths) {
|
|||
};
|
||||
|
||||
|
||||
// returns pubkey -> copayerId.
|
||||
PublicKeyRing.prototype.copayersForPubkeys = function(pubkeys, paths) {
|
||||
|
||||
var inKeyMap = {}, ret = [];
|
||||
var inKeyMap = {}, ret = {};
|
||||
for(var i in pubkeys ){
|
||||
inKeyMap[pubkeys[i]] = 1;
|
||||
};
|
||||
|
|
@ -309,7 +310,7 @@ PublicKeyRing.prototype.copayersForPubkeys = function(pubkeys, paths) {
|
|||
for(var copayerIndex in keys[i] ){
|
||||
var kHex = keys[i][copayerIndex].toString('hex');
|
||||
if (inKeyMap[kHex]) {
|
||||
ret.push(this.copayerIds[copayerIndex]);
|
||||
ret[kHex] =this.copayerIds[copayerIndex];
|
||||
delete inKeyMap[kHex];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue