Improves performance on tab-home, refactor of walletDetails, bug fixes

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-29 19:04:52 -03:00
commit 28a53ea0c6
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
8 changed files with 92 additions and 146 deletions

View file

@ -927,9 +927,9 @@ angular.module('copayApp.services')
if (x.pendingTxps)
txps = txps.concat(x.pendingTxps);
});
txps = lodash.sortBy(txps, 'pendingForUs', 'createdOn');
txps = lodash.compact(lodash.flatten(txps)).slice(0, MAX);
var n = txps.length;
txps = lodash.sortBy(txps, 'pendingForUs', 'createdOn');
txps = lodash.compact(lodash.flatten(txps)).slice(0, opts.limit || MAX);
return cb(null, txps, n);
};