From 06ebb10e9a55fa786877b6fcb3d32c77fc9dd576 Mon Sep 17 00:00:00 2001 From: Javier Date: Tue, 6 Dec 2016 15:33:00 -0300 Subject: [PATCH 1/2] disable hardware wallets --- src/js/controllers/create.js | 9 +++++++-- src/js/controllers/join.js | 4 ++++ www/views/import.html | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js index 73ef2f64d..cb86415a2 100644 --- a/src/js/controllers/create.js +++ b/src/js/controllers/create.js @@ -75,18 +75,23 @@ angular.module('copayApp.controllers').controller('createController', $scope.seedSource = seedOptions[0]; - if (n > 1 && isChromeApp) + /* + + Disable Hardware Wallets + + 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/join.js b/src/js/controllers/join.js index d15f152b4..35d0bd2d8 100644 --- a/src/js/controllers/join.js +++ b/src/js/controllers/join.js @@ -57,6 +57,9 @@ angular.module('copayApp.controllers').controller('joinController', }]; $scope.seedSource = self.seedOptions[0]; + /* + + Disable Hardware Wallets if (isChromeApp) { self.seedOptions.push({ @@ -71,6 +74,7 @@ angular.module('copayApp.controllers').controller('joinController', label: 'Trezor Hardware Wallet', }); } + */ }; this.setSeedSource = function() { diff --git a/www/views/import.html b/www/views/import.html index b5ce0d8fb..9de688897 100644 --- a/www/views/import.html +++ b/www/views/import.html @@ -15,7 +15,7 @@ {'border-bottom-style': 'solid'}"> File/Text -
Hardware wallet
From 3102e6ffbbb3389d88cb521b6f149a67d3b8e26f Mon Sep 17 00:00:00 2001 From: Javier Date: Wed, 14 Dec 2016 11:15:22 -0300 Subject: [PATCH 2/2] disable only for copay distribution --- src/js/controllers/create.js | 33 ++++++++++++++++++--------------- src/js/controllers/import.js | 3 ++- src/js/controllers/join.js | 31 +++++++++++++++++-------------- www/views/import.html | 4 ++-- 4 files changed, 39 insertions(+), 32 deletions(-) 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 -
+
Hardware wallet