From 1a68e348c42a17fa8164c4cb601d68ddf4179f3f Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 16 Apr 2015 17:44:12 -0300 Subject: [PATCH 1/3] ignorePayPro verification in chrome --- src/js/controllers/index.js | 6 ++++-- src/js/controllers/send.js | 5 ++--- src/js/controllers/walletHome.js | 2 -- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index dd9fd6a71..3e67d7e2c 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService) { +angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService, isChromeApp) { var self = this; self.isCordova = isCordova; self.onGoingProcess = {}; @@ -134,7 +134,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r $timeout(function() { self.setOngoingProcess('updatingPendingTxps', true); $log.debug('Updating PendingTxps'); - fc.getTxProposals({}, function(err, txps) { + fc.getTxProposals({ + ignorePayPro: isChromeApp + }, function(err, txps) { self.setOngoingProcess('updatingPendingTxps', false); if (err) { $log.debug('Wallet PendingTxps ERROR:', err); diff --git a/src/js/controllers/send.js b/src/js/controllers/send.js index 7737b6f00..283c8d40f 100644 --- a/src/js/controllers/send.js +++ b/src/js/controllers/send.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('sendController', - function($rootScope, $scope, $window, $timeout, $modal, $filter, $log, notification, isMobile, txStatus, isCordova, bitcore, profileService, configService, rateService) { + function($rootScope, $scope, $window, $timeout, $modal, $filter, $log, notification, isMobile, txStatus, isCordova, bitcore, profileService, configService, rateService, isChromeApp) { var fc = profileService.focusedClient; var self = this; @@ -325,9 +325,8 @@ angular.module('copayApp.controllers').controller('sendController', }; this.setFromPayPro = function(uri, form) { - var isChromeApp = window.chrome && chrome.runtime && chrome.runtime.id; if (isChromeApp) { - this.error = 'Payment Protocol not yet supported on ChromeApp'; + this.error = 'Payment Protocol not supported on Chrome App'; return; } diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index 40ac16dd3..ac089aa87 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -1,7 +1,5 @@ 'use strict'; - -// TODO rateService angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, notification, txStatus, isCordova, profileService, lodash) { From 2fddaa43ba70ef959af3c60328c950d34986d096 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 16 Apr 2015 18:15:24 -0300 Subject: [PATCH 2/3] update angular-bitcore --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 64aa50320..8278395db 100644 --- a/bower.json +++ b/bower.json @@ -18,7 +18,7 @@ "foundation-icon-fonts": "*", "ng-lodash": "~0.2.0", "angular-moment": "~0.9.0", - "angular-bitcore-wallet-client": "^0.0.16", + "angular-bitcore-wallet-client": "^0.0.17", "angular-ui-router": "~0.2.13", "qrcode-decoder-js": "*", "angular-ui-switch": "~0.1.0" From 799f5f9e4f97643d2d52c3f2a0887bebca6f0c3d Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 16 Apr 2015 18:17:57 -0300 Subject: [PATCH 3/3] add missing file --- src/js/services/isChromeApp.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/js/services/isChromeApp.js diff --git a/src/js/services/isChromeApp.js b/src/js/services/isChromeApp.js new file mode 100644 index 000000000..22c0c13b8 --- /dev/null +++ b/src/js/services/isChromeApp.js @@ -0,0 +1,4 @@ +'use strict'; + +angular.module('copayApp.services').value('isChromeApp', window.chrome && chrome.runtime && chrome.runtime.id); +