hide testnet options for bch wallets in import process
This commit is contained in:
parent
1200c9701c
commit
92cab1871a
3 changed files with 14 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="input-label" translate>
|
||||
Coin
|
||||
</div>
|
||||
<select ng-model="formData.coin">
|
||||
<select ng-model="formData.coin" ng-change="switchTestnetOff()">
|
||||
<option value="btc">BTC</option>
|
||||
<option value="bch">BCH</option>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
<select class="m10t" ng-model="formData.seedSourceAll" ng-options="seed as seed.label for seed in seedOptionsAll"></select>
|
||||
</label>
|
||||
|
||||
<ion-toggle ng-model="formData.testnetEnabled" ng-change="setDerivationPath()" toggle-class="toggle-positive">
|
||||
<ion-toggle ng-model="formData.testnetEnabled" ng-change="setDerivationPath()" toggle-class="toggle-positive" ng-if="formData.coin == 'btc'">
|
||||
<span translate>Testnet</span>
|
||||
</ion-toggle>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue