diff --git a/src/js/controllers/disclaimer.js b/src/js/controllers/disclaimer.js index d6ac84576..d8891825d 100644 --- a/src/js/controllers/disclaimer.js +++ b/src/js/controllers/disclaimer.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('disclaimerController', - function($scope, $timeout, $log, profileService, isCordova, applicationService, gettextCatalog, uxLanguage, go) { + function($scope, $timeout, $log, profileService, applicationService, gettextCatalog, uxLanguage, go) { var self = this; self.tries = 0; $scope.creatingProfile = true; diff --git a/src/js/controllers/join.js b/src/js/controllers/join.js index 983dd080e..9e10cc5b6 100644 --- a/src/js/controllers/join.js +++ b/src/js/controllers/join.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('joinController', - function($scope, $rootScope, $timeout, go, notification, profileService, configService, isCordova, storageService, applicationService, $modal, gettext, lodash, ledger, trezor, platformInfo, derivationPathHelper) { + function($scope, $rootScope, $timeout, go, notification, profileService, configService, storageService, applicationService, $modal, gettext, lodash, ledger, trezor, platformInfo, derivationPathHelper) { var isChromeApp = platformInfo.isChromeApp; var isDevel = platformInfo.isDevel; diff --git a/src/js/controllers/preferencesDelete.js b/src/js/controllers/preferencesDelete.js index 62e7c4ed8..e176fc5c6 100644 --- a/src/js/controllers/preferencesDelete.js +++ b/src/js/controllers/preferencesDelete.js @@ -1,7 +1,8 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesDeleteWalletController', - function($scope, $rootScope, $filter, $timeout, $modal, $log, storageService, notification, profileService, isCordova, go, gettext, gettextCatalog, animationService, applicationService) { + function($scope, $rootScope, $filter, $timeout, $modal, $log, storageService, notification, profileService, platformInfo, go, gettext, gettextCatalog, animationService, applicationService) { + var isCordova = platformInfo.isCordova; this.isCordova = isCordova; this.error = null; $scope.isDeletingWallet = false; diff --git a/src/js/controllers/preferencesGlidera.js b/src/js/controllers/preferencesGlidera.js index c2a901379..2c81e4e74 100644 --- a/src/js/controllers/preferencesGlidera.js +++ b/src/js/controllers/preferencesGlidera.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesGlideraController', - function($scope, $modal, $timeout, profileService, applicationService, glideraService, storageService, isChromeApp, animationService) { + function($scope, $modal, $timeout, profileService, applicationService, glideraService, storageService, animationService) { this.getEmail = function(token) { var self = this; diff --git a/src/js/controllers/preferencesGlobal.js b/src/js/controllers/preferencesGlobal.js index b38773da3..884e904e1 100644 --- a/src/js/controllers/preferencesGlobal.js +++ b/src/js/controllers/preferencesGlobal.js @@ -1,8 +1,9 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesGlobalController', - function($scope, $rootScope, $log, configService, uxLanguage, isCordova, isMobile, pushNotificationsService, profileService, feeService) { + function($scope, $rootScope, $log, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService) { + var isCordova = platformInfo.isCordova; this.init = function() { var config = configService.getSync(); this.unitName = config.wallet.settings.unitName; @@ -13,9 +14,9 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController', }; this.feeOpts = feeService.feeOpts; this.currentFeeLevel = feeService.getCurrentFeeLevel(); - this.usePushNotifications = isCordova && !isMobile.Windows(); + this.usePushNotifications = isCordova && !platformInfo.isWP; $scope.PNEnabledByUser = true; - $scope.isIOSApp = isMobile.iOS() && isCordova; + $scope.isIOSApp = platformInfo.isIOS && isCordova; if ($scope.isIOSApp) { cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) { $scope.PNEnabledByUser = isEnabled; diff --git a/src/js/controllers/sellGlidera.js b/src/js/controllers/sellGlidera.js index 129f2fb53..989fa1c7f 100644 --- a/src/js/controllers/sellGlidera.js +++ b/src/js/controllers/sellGlidera.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('sellGlideraController', - function($rootScope, $scope, $timeout, $log, $modal, configService, profileService, addressService, feeService, glideraService, bwsError, lodash, isChromeApp, animationService, walletService, fingerprintService) { + function($rootScope, $scope, $timeout, $log, $modal, configService, profileService, addressService, feeService, glideraService, bwsError, lodash, animationService, walletService, fingerprintService) { var self = this; var config = configService.getSync(); diff --git a/src/js/controllers/tx.js b/src/js/controllers/tx.js index d9f9e4f39..9edc6d7fc 100644 --- a/src/js/controllers/tx.js +++ b/src/js/controllers/tx.js @@ -1,8 +1,9 @@ 'use strict'; angular.module('copayApp.controllers').controller('txController', - function($rootScope, $scope, $timeout, $filter, lodash, profileService, isCordova, nodeWebkit, configService, animationService, gettextCatalog) { + function($rootScope, $scope, $timeout, $filter, lodash, profileService, platformInfo, nodeWebkit, configService, animationService, gettextCatalog) { + var isCordova = platformInfo.isCordova; var fc = profileService.focusedClient; var config = configService.getSync(); var configWallet = config.wallet; @@ -53,7 +54,7 @@ angular.module('copayApp.controllers').controller('txController', if (isCordova) { window.cordova.plugins.clipboard.copy(value); window.plugins.toast.showShortCenter(gettextCatalog.getString('Copied to clipboard')); - } else if (nodeWebkit.isDefined()) { + } else if (platformInfo.isNW) { nodeWebkit.writeToClipboard(value); } };