diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js index 73ef2f64d..3d948d295 100644 --- a/src/js/controllers/create.js +++ b/src/js/controllers/create.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('createController', - function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, storageService, popupService) { + function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, storageService, popupService, $window) { var isChromeApp = platformInfo.isChromeApp; var isCordova = platformInfo.isCordova; @@ -33,7 +33,6 @@ angular.module('copayApp.controllers').controller('createController', $scope.formData.derivationPath = derivationPathHelper.default; $scope.setTotalCopayers(tc); updateRCSelect(tc); - updateSeedSourceSelect(tc); }; $scope.showAdvChange = function() { @@ -75,18 +74,27 @@ angular.module('copayApp.controllers').controller('createController', $scope.seedSource = seedOptions[0]; - if (n > 1 && isChromeApp) - seedOptions.push({ - id: 'ledger', - label: 'Ledger Hardware Wallet', - }); + /* - if (isChromeApp || isDevel) { - seedOptions.push({ - id: 'trezor', - label: 'Trezor Hardware Wallet', - }); + Disable Hardware Wallets for BitPay distribution + + */ + + if ($window.appConfig.name == 'copay') { + if (n > 1 && isChromeApp) { + seedOptions.push({ + id: 'ledger', + label: 'Ledger Hardware Wallet', + }); + } + if (isChromeApp || isDevel) { + seedOptions.push({ + id: 'trezor', + label: 'Trezor Hardware Wallet', + }); + } } + $scope.seedOptions = seedOptions; }; diff --git a/src/js/controllers/import.js b/src/js/controllers/import.js index af9dd6e31..3d3b1fbce 100644 --- a/src/js/controllers/import.js +++ b/src/js/controllers/import.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('importController', - function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog) { + function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog, $window) { var isChromeApp = platformInfo.isChromeApp; var isDevel = platformInfo.isDevel; @@ -17,6 +17,7 @@ angular.module('copayApp.controllers').controller('importController', $scope.formData.derivationPath = derivationPathHelper.default; $scope.formData.account = 1; $scope.importErr = false; + $scope.showHardwareWallet = $window.appConfig.name == 'copay'; if ($stateParams.code) $scope.processWalletInfo($stateParams.code); diff --git a/src/js/controllers/join.js b/src/js/controllers/join.js index d15f152b4..3b0362d60 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, $state, $ionicHistory, $ionicScrollDelegate, profileService, configService, storageService, applicationService, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService) { + function($scope, $rootScope, $timeout, $state, $ionicHistory, $ionicScrollDelegate, profileService, configService, storageService, applicationService, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService, $window) { var isChromeApp = platformInfo.isChromeApp; var isDevel = platformInfo.isDevel; @@ -57,19 +57,26 @@ angular.module('copayApp.controllers').controller('joinController', }]; $scope.seedSource = self.seedOptions[0]; + /* - if (isChromeApp) { - self.seedOptions.push({ - id: 'ledger', - label: 'Ledger Hardware Wallet', - }); - } + Disable Hardware Wallets - if (isChromeApp || isDevel) { - self.seedOptions.push({ - id: 'trezor', - label: 'Trezor Hardware Wallet', - }); + */ + + if ($window.appConfig.name == 'copay') { + if (isChromeApp) { + self.seedOptions.push({ + id: 'ledger', + label: 'Ledger Hardware Wallet', + }); + } + + if (isChromeApp || isDevel) { + self.seedOptions.push({ + id: 'trezor', + label: 'Trezor Hardware Wallet', + }); + } } }; diff --git a/www/views/import.html b/www/views/import.html index b5ce0d8fb..e3a7af0c7 100644 --- a/www/views/import.html +++ b/www/views/import.html @@ -16,7 +16,7 @@ File/Text
+ {'border-bottom-style': 'solid'}" ng-show="showHardwareWallet"> Hardware wallet