From f210418b51e8476e90054b9c1c2f093952ac03b6 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 8 Sep 2015 21:11:13 -0300 Subject: [PATCH 1/2] better payment details msg --- public/views/modals/txp-details.html | 14 +++++--------- src/js/controllers/walletHome.js | 13 +++++++++++-- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/public/views/modals/txp-details.html b/public/views/modals/txp-details.html index 934073ef9..c002a3c0e 100644 --- a/public/views/modals/txp-details.html +++ b/public/views/modals/txp-details.html @@ -133,13 +133,9 @@
-
- Payment accepted... -
-
-
But not broadcasted. Try to send manually
+
+
Payment accepted, but not yet broadcasted
+
- Payment sent! + Payment sent
- Payment finally rejected + Payment rejected
diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index a307c188a..9c45e630c 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -30,8 +30,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi if (isChromeApp) { var animatedSlideUp = 'full'; var animatedSlideRight = 'full'; - } - else { + } else { var animatedSlideUp = 'full animated slideInUp'; var animatedSlideRight = 'full animated slideInRight'; } @@ -174,6 +173,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi }); }; + var GLIDERA_LOCK_TIME = 6 * 60 * 60 * 1000; + this.openTxpModal = function(tx, copayers) { var fc = profileService.focusedClient; var refreshUntilItChanges = false; @@ -186,6 +187,14 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi $scope.canSign = fc.canSign(); $scope.loading = null; $scope.color = fc.backgroundColor; + // ToDo: use custom data + $scope.isGlidera = false; + + if (tx.message === 'Glidera transaction') { + $scope.isGlidera = true; + if ($scope.tx.canBeRemoved) + $scope.tx.canBeRemoved = (Date.now() - (tx.ts || tx.createdOn)) > GLIDERA_LOCK_TIME; + } refreshUntilItChanges = false; $scope.currentSpendUnconfirmed = currentSpendUnconfirmed; From 666eee43212bb0eb4d43dd47e75626bec2202e2e Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 8 Sep 2015 22:39:33 -0300 Subject: [PATCH 2/2] add logic to txp modal related to glidera --- public/views/includes/transaction.html | 2 +- public/views/modals/txp-details.html | 10 +++++++--- src/js/controllers/index.js | 2 ++ src/js/controllers/walletHome.js | 22 ++++++++++++---------- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/public/views/includes/transaction.html b/public/views/includes/transaction.html index 0a0be0be0..95944e441 100644 --- a/public/views/includes/transaction.html +++ b/public/views/includes/transaction.html @@ -1,6 +1,6 @@
+ ng-click="home.openTxpModal(tx, index.copayers, !!index.glideraStatus)">
  diff --git a/public/views/modals/txp-details.html b/public/views/modals/txp-details.html index c002a3c0e..6597ffb35 100644 --- a/public/views/modals/txp-details.html +++ b/public/views/modals/txp-details.html @@ -133,15 +133,19 @@
-
+
Payment accepted, but not yet broadcasted
+
+
Payment accepted. It will be broadcasted by Glidera. It case there is a problem, it can be deleted after 6 hours it was created.
+
Payment sent @@ -153,7 +157,7 @@
-
+
* A payment proposal can be deleted if 1) you are the creator, and no other copayer has signed, or 2) 24 hours have passed since the proposal was created.