From 237cc2f58cafa982df78fa825d399e4190b7fe96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Thu, 13 Oct 2016 10:03:09 -0300 Subject: [PATCH] remove hasClick and use isCordova --- src/js/controllers/confirm.js | 1 - src/js/controllers/modals/txpDetails.js | 1 - src/js/services/platformInfo.js | 16 ---------------- www/views/confirm.html | 6 +++--- www/views/modals/txp-details.html | 6 +++--- 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 3fa1febeb..f5f494367 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -32,7 +32,6 @@ angular.module('copayApp.controllers').controller('confirmController', function( throw ('bad params'); } $scope.isCordova = platformInfo.isCordova; - $scope.hasClick = platformInfo.hasClick; $scope.data = {}; var config = configService.getSync().wallet; diff --git a/src/js/controllers/modals/txpDetails.js b/src/js/controllers/modals/txpDetails.js index 853383dd1..081826b1c 100644 --- a/src/js/controllers/modals/txpDetails.js +++ b/src/js/controllers/modals/txpDetails.js @@ -17,7 +17,6 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi $scope.canSign = $scope.wallet.canSign() || $scope.wallet.isPrivKeyExternal(); $scope.color = $scope.wallet.color; $scope.data = {}; - $scope.hasClick = platformInfo.hasClick; $scope.displayAmount = getDisplayAmount(tx.amountStr); $scope.displayUnit = getDisplayUnit(tx.amountStr); initActionList(); diff --git a/src/js/services/platformInfo.js b/src/js/services/platformInfo.js index 9ba4a6d9f..f634e8f0f 100644 --- a/src/js/services/platformInfo.js +++ b/src/js/services/platformInfo.js @@ -39,21 +39,5 @@ angular.module('copayApp.services').factory('platformInfo', function($window) { ret.isChromeApp = $window.chrome && chrome.runtime && chrome.runtime.id && !ret.isNW; ret.isDevel = !ret.isMobile && !ret.isChromeApp && !ret.isNW; - ret.hasClick = false; - - if($window.sessionStorage.getItem('hasClick')) { - ret.hasClick = true; - } - - $window.addEventListener('mousedown', function() { - ret.hasClick = true; - $window.sessionStorage.setItem('hasClick', 'true'); - }); - - $window.addEventListener('touchstart', function() { - ret.hasClick = false; - $window.sessionStorage.removeItem('hasClick'); - }); - return ret; }); diff --git a/www/views/confirm.html b/www/views/confirm.html index 01aa35e97..b71ee5bb2 100644 --- a/www/views/confirm.html +++ b/www/views/confirm.html @@ -7,7 +7,7 @@ - +
@@ -60,13 +60,13 @@
Click to pay Slide to pay diff --git a/www/views/modals/txp-details.html b/www/views/modals/txp-details.html index 6f8573994..f0011f515 100644 --- a/www/views/modals/txp-details.html +++ b/www/views/modals/txp-details.html @@ -11,7 +11,7 @@ - +
@@ -152,7 +152,7 @@ Click to accept @@ -168,7 +168,7 @@ Slide to accept