Skip to content
Snippets Groups Projects
Commit 9ee8e340 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] new EsNotification() to fix #745

parent 5fdb801d
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ angular.module('cesium.es.notification.services', ['cesium.platform', 'cesium.es
})
.factory('esNotification', function($rootScope, $q, $timeout, $translate, $state,
.factory('esNotification', function($rootScope, $q, $timeout, $translate, $state, csHttp,
esHttp, csConfig, csSettings, csWallet, csWot, UIUtils, filterTranslations,
BMA, CryptoUtils, csPlatform, Api) {
'ngInject';
......@@ -134,10 +134,10 @@ angular.module('cesium.es.notification.services', ['cesium.platform', 'cesium.es
// Add wallet events as notifications
if (wallet.data.events && wallet.data.events.length) {
var time = moment().utc().unix() - filterTranslations.MEDIAN_TIME_OFFSET;
var time = csHttp.data.now() - filterTranslations.MEDIAN_TIME_OFFSET;
events = (wallet.data.events || []).reduce(function(res, event) {
if (event.type != "warn") return res;
var notification = new Notification({}, function(self) {
var notification = new EsNotification({}, function(self) {
if (!self.read) {
self.read = true;
if (wallet.data.notifications && wallet.data.notifications.warnCount > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment