add notpending in proposals
This commit is contained in:
parent
d7e025c2d0
commit
8c43f55756
6 changed files with 51 additions and 66 deletions
|
|
@ -908,22 +908,14 @@ angular.module('copayApp.services')
|
|||
|
||||
var txps = [];
|
||||
|
||||
function process(notifications) {
|
||||
if (!notifications) return [];
|
||||
|
||||
var shown = lodash.sortBy(notifications, 'createdOn').reverse();
|
||||
shown = shown.splice(0, opts.limit || MAX);
|
||||
return shown;
|
||||
};
|
||||
|
||||
lodash.each(w, function(x) {
|
||||
if (x.pendingTxps)
|
||||
txps = txps.concat(x.pendingTxps);
|
||||
});
|
||||
txps = lodash.sortBy(txps, 'createdOn');
|
||||
txps = lodash.sortBy(txps, 'pendingForUs', 'createdOn');
|
||||
txps = lodash.compact(lodash.flatten(txps)).slice(0,MAX);
|
||||
var n = txps.length;
|
||||
return cb(null, process(txps), n);
|
||||
return cb(null, txps, n);
|
||||
};
|
||||
|
||||
return root;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue