From 42dd516b608e24a80edf8a9424c6b6c465e6b21f Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 16 Jul 2015 11:43:26 -0300 Subject: [PATCH] fix notification --- src/js/services/txStatus.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/services/txStatus.js b/src/js/services/txStatus.js index 82ae358c4..51e46ebe5 100644 --- a/src/js/services/txStatus.js +++ b/src/js/services/txStatus.js @@ -7,6 +7,7 @@ angular.module('copayApp.services').factory('txStatus', function($modal, lodash, var fc = profileService.focusedClient; var status = txp.status; var type; + var INMEDIATE_SECS = 10; if (status == 'broadcasted') { type = 'broadcasted'; @@ -17,10 +18,15 @@ angular.module('copayApp.services').factory('txStatus', function($modal, lodash, copayerId: fc.credentials.copayerId }); - if (!action || (action.type == 'accept' && n == 1)) { + if (!action) { type = 'created'; } else if (action.type == 'accept') { - type = 'accepted'; + // created and accepted at the same time? + if ( n == 1 && action.createdOn - txp.createdOn < INMEDIATE_SECS ) { + type = 'created'; + } else { + type = 'accepted'; + } } else if (action.type == 'reject') { type = 'rejected'; } else {