diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js index cb86415a2..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() { @@ -77,21 +76,25 @@ angular.module('copayApp.controllers').controller('createController', /* - Disable Hardware Wallets + Disable Hardware Wallets for BitPay distribution - if (n > 1 && isChromeApp) { - seedOptions.push({ - id: 'ledger', - label: 'Ledger Hardware Wallet', - }); - } - if (isChromeApp || isDevel) { - seedOptions.push({ - id: 'trezor', - label: 'Trezor Hardware Wallet', - }); - } */ + + 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 35d0bd2d8..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; @@ -61,20 +61,23 @@ angular.module('copayApp.controllers').controller('joinController', Disable Hardware Wallets - if (isChromeApp) { - self.seedOptions.push({ - id: 'ledger', - label: 'Ledger Hardware Wallet', - }); - } - - 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', + }); + } + } }; this.setSeedSource = function() { diff --git a/www/views/import.html b/www/views/import.html index 9de688897..e3a7af0c7 100644 --- a/www/views/import.html +++ b/www/views/import.html @@ -15,8 +15,8 @@ {'border-bottom-style': 'solid'}"> File/Text -