From e95956e5a8c7c4035396885a8072d2df91491d3f Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 17 Jun 2015 16:25:05 -0300 Subject: [PATCH 1/4] handles new deletion rules --- public/views/modals/txp-details.html | 2 +- src/js/controllers/index.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/public/views/modals/txp-details.html b/public/views/modals/txp-details.html index 4f9ad9c68..e1c4a831b 100644 --- a/public/views/modals/txp-details.html +++ b/public/views/modals/txp-details.html @@ -134,7 +134,7 @@
- * Only payment proposals created by yourself with no peer actions can be removed + * Payment proposals can be deleted: (1) after 24hr of been created or (2) by the creator as long as it has no other signatures.
-
-
+
+
* 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.
diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index b4f1ee645..4bdcda89d 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -357,7 +357,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r tx.statusForUs = 'pending'; } - tx.couldRemove =!tx.deleteLockTime; + if (!tx.deleteLockTime) + tx.canBeRemoved = true; if (tx.creatorId != self.copayerId) { self.pendingTxProposalsCountForUs = self.pendingTxProposalsCountForUs + 1; diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index 5bff08a28..e0f5859bc 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -150,7 +150,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi if (err.code && err.code == 'BADREQUEST' && (eventName == 'transactionProposalRemoved' || eventName == 'TxProposalRemoved')) { $scope.tx.removed = true; - $scope.tx.couldRemove = false; + $scope.tx.canBeRemoved = false; $scope.tx.pendingForUs = false; $scope.$apply(); return;