From a10e6f4908527c7b740c244a226d93b35694127e Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 30 Jul 2014 11:54:11 -0300 Subject: [PATCH] add getForPath with tests --- js/models/core/PublicKeyRing.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/models/core/PublicKeyRing.js b/js/models/core/PublicKeyRing.js index 2a25010a1..2d626cf0e 100644 --- a/js/models/core/PublicKeyRing.js +++ b/js/models/core/PublicKeyRing.js @@ -288,16 +288,15 @@ PublicKeyRing.prototype.getAddressesInfoForIndex = function(index, opts, copayer return ret; }; -PublicKeyRing.prototype.getForPaths = function(paths) { - return paths.map(this.getForPath.bind(this)); -}; - PublicKeyRing.prototype.getForPath = function(path) { var p = HDPath.indexesForPath(path); var pubKeys = this.getPubKeys(p.addressIndex, p.isChange, p.copayerIndex); return pubKeys; }; +PublicKeyRing.prototype.getForPaths = function(paths) { + return paths.map(this.getForPath.bind(this)); +}; // TODO this could be cached PublicKeyRing.prototype._addScriptMap = function(map, path) {