Fix recent transactions. Show the latest transactions within 24 hours
This commit is contained in:
parent
1019f60845
commit
5ead443c24
6 changed files with 56 additions and 127 deletions
|
|
@ -795,7 +795,7 @@ angular.module('copayApp.services')
|
|||
root.getNotifications = function(opts, cb) {
|
||||
opts = opts || {};
|
||||
|
||||
var TIME_STAMP = 60 * 60 * 24 * 7;
|
||||
var TIME_STAMP = 60 * 60 * 24;
|
||||
var MAX = 100;
|
||||
|
||||
var typeFilter = {
|
||||
|
|
@ -861,26 +861,25 @@ angular.module('copayApp.services')
|
|||
|
||||
var finale = shown; // GROUPING DISABLED!
|
||||
|
||||
// var finale = [],
|
||||
// prev;
|
||||
//
|
||||
//
|
||||
// // Item grouping... DISABLED.
|
||||
//
|
||||
// // REMOVE (if we want 1-to-1 notification) ????
|
||||
// lodash.each(shown, function(x) {
|
||||
// if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) {
|
||||
// prev.types.push(x.type);
|
||||
// prev.data = lodash.assign(prev.data, x.data);
|
||||
// prev.txid = prev.txid || x.txid;
|
||||
// prev.amountStr = prev.amountStr || x.amountStr;
|
||||
// prev.creatorName = prev.creatorName || x.creatorName;
|
||||
// } else {
|
||||
// finale.push(x);
|
||||
// prev = x;
|
||||
// }
|
||||
// });
|
||||
//
|
||||
var finale = [],
|
||||
prev;
|
||||
|
||||
|
||||
// Item grouping... DISABLED.
|
||||
|
||||
// REMOVE (if we want 1-to-1 notification) ????
|
||||
lodash.each(shown, function(x) {
|
||||
if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) {
|
||||
prev.types.push(x.type);
|
||||
prev.data = lodash.assign(prev.data, x.data);
|
||||
prev.txid = prev.txid || x.txid;
|
||||
prev.amountStr = prev.amountStr || x.amountStr;
|
||||
prev.creatorName = prev.creatorName || x.creatorName;
|
||||
} else {
|
||||
finale.push(x);
|
||||
prev = x;
|
||||
}
|
||||
});
|
||||
|
||||
var u = bwcService.getUtils();
|
||||
lodash.each(finale, function(x) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue