From 92cab1871a46b8e1f552c2d4d86c103c4c67865c Mon Sep 17 00:00:00 2001 From: JDonadio Date: Fri, 1 Sep 2017 14:59:14 -0300 Subject: [PATCH 1/2] hide testnet options for bch wallets in import process --- src/js/controllers/import.js | 14 ++++++++++++-- www/views/includes/cash.html | 2 +- www/views/tab-import-phrase.html | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/import.js b/src/js/controllers/import.js index c66cb4a3f..62f6d4f0b 100644 --- a/src/js/controllers/import.js +++ b/src/js/controllers/import.js @@ -19,7 +19,9 @@ angular.module('copayApp.controllers').controller('importController', $scope.formData.coin = 'btc'; $scope.importErr = false; $scope.isCopay = appConfigService.name == 'copay'; - $scope.fromHardwareWallet = { value: false }; + $scope.fromHardwareWallet = { + value: false + }; if (config.cashSupport.enabled) $scope.enableCash = true; @@ -63,6 +65,14 @@ angular.module('copayApp.controllers').controller('importController', }); }; + $scope.switchTestnetOff = function() { + $scope.formData.testnetEnabled = false; + $scope.resizeView(); + $timeout(function() { + $scope.$apply(); + }); + }; + $scope.processWalletInfo = function(code) { if (!code) return; @@ -286,7 +296,7 @@ angular.module('copayApp.controllers').controller('importController', $log.warn('This wont work for Intel TEE wallets'); var id = $scope.formData.seedSourceAll.id; - var isMultisig = opts.derivationStrategy =='BIP48'; + var isMultisig = opts.derivationStrategy == 'BIP48'; var account = opts.account; opts.entropySourcePath = 'm/' + hwWallet.getEntropyPath(id, isMultisig, account); } diff --git a/www/views/includes/cash.html b/www/views/includes/cash.html index e67fb182b..335b72811 100644 --- a/www/views/includes/cash.html +++ b/www/views/includes/cash.html @@ -2,7 +2,7 @@
Coin
- diff --git a/www/views/tab-import-phrase.html b/www/views/tab-import-phrase.html index 2806d4a68..0eac3426d 100644 --- a/www/views/tab-import-phrase.html +++ b/www/views/tab-import-phrase.html @@ -64,7 +64,7 @@ - + Testnet From d26501c87f3876bc3033ef6da68a334a904e89c4 Mon Sep 17 00:00:00 2001 From: JDonadio Date: Fri, 1 Sep 2017 15:33:09 -0300 Subject: [PATCH 2/2] change derivation path properly --- src/js/controllers/import.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/controllers/import.js b/src/js/controllers/import.js index 62f6d4f0b..b2b6ab0be 100644 --- a/src/js/controllers/import.js +++ b/src/js/controllers/import.js @@ -67,6 +67,7 @@ angular.module('copayApp.controllers').controller('importController', $scope.switchTestnetOff = function() { $scope.formData.testnetEnabled = false; + $scope.setDerivationPath(); $scope.resizeView(); $timeout(function() { $scope.$apply();