From 5e73aa6f2f07a142ded17871060eafe93fd968f1 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Sat, 21 Feb 2015 19:24:41 -0300 Subject: [PATCH] do not include change addresses in #getAddresses by default --- lib/server.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/server.js b/lib/server.js index f114052..7a8d1d9 100644 --- a/lib/server.js +++ b/lib/server.js @@ -289,11 +289,11 @@ WalletService.prototype.getMainAddresses = function(opts, cb) { self.storage.fetchAddresses(self.walletId, function(err, addresses) { if (err) return cb(err); - var mainAddresses = _.filter(addresses, { - isChange: false - }); - return cb(null, mainAddresses); + var onlyMain = _.reject(addresses, { + isChange: true + }); + return cb(null, onlyMain); }); };