mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #5425 from JDonadio/ref/disable-hw
Disable hw from mobile
This commit is contained in:
commit
a301b5ad6f
|
@ -3,41 +3,44 @@
|
||||||
angular.module('copayApp.controllers').controller('importController',
|
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, appConfigService) {
|
function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog, appConfigService) {
|
||||||
|
|
||||||
var isChromeApp = platformInfo.isChromeApp;
|
|
||||||
var isDevel = platformInfo.isDevel;
|
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
var defaults = configService.getDefaults();
|
var defaults = configService.getDefaults();
|
||||||
var errors = bwcService.getErrors();
|
var errors = bwcService.getErrors();
|
||||||
|
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
$scope.isSafari = platformInfo.isSafari;
|
$scope.isDevel = platformInfo.isDevel;
|
||||||
|
$scope.isChromeApp = platformInfo.isChromeApp;
|
||||||
$scope.isCordova = platformInfo.isCordova;
|
$scope.isCordova = platformInfo.isCordova;
|
||||||
$scope.formData = {};
|
$scope.formData = {};
|
||||||
$scope.formData.bwsurl = defaults.bws.url;
|
$scope.formData.bwsurl = defaults.bws.url;
|
||||||
$scope.formData.derivationPath = derivationPathHelper.default;
|
$scope.formData.derivationPath = derivationPathHelper.default;
|
||||||
$scope.formData.account = 1;
|
$scope.formData.account = 1;
|
||||||
$scope.importErr = false;
|
$scope.importErr = false;
|
||||||
$scope.showHardwareWallet = appConfigService.name == 'copay';
|
$scope.isCopay = appConfigService.name == 'copay';
|
||||||
|
|
||||||
if ($stateParams.code)
|
if ($stateParams.code)
|
||||||
$scope.processWalletInfo($stateParams.code);
|
$scope.processWalletInfo($stateParams.code);
|
||||||
|
|
||||||
$scope.seedOptions = [];
|
$scope.seedOptions = [];
|
||||||
|
|
||||||
if (isChromeApp) {
|
if ($scope.isChromeApp) {
|
||||||
$scope.seedOptions.push({
|
$scope.seedOptions.push({
|
||||||
id: 'ledger',
|
id: 'ledger',
|
||||||
label: 'Ledger Hardware Wallet',
|
label: 'Ledger Hardware Wallet',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isChromeApp || isDevel) {
|
if ($scope.isChromeApp || $scope.isDevel) {
|
||||||
$scope.seedOptions.push({
|
$scope.seedOptions.push({
|
||||||
id: 'trezor',
|
id: 'trezor',
|
||||||
label: 'Trezor Hardware Wallet',
|
label: 'Trezor Hardware Wallet',
|
||||||
});
|
});
|
||||||
$scope.formData.seedSource = $scope.seedOptions[0];
|
$scope.formData.seedSource = $scope.seedOptions[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$apply();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.processWalletInfo = function(code) {
|
$scope.processWalletInfo = function(code) {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<span translate>File/Text</span>
|
<span translate>File/Text</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col" ng-click="hardware = true; phrase = file = false; showAdv = false" ng-style="hardware &&
|
<div class="col" ng-click="hardware = true; phrase = file = false; showAdv = false" ng-style="hardware &&
|
||||||
{'border-bottom-style': 'solid'}" ng-show="showHardwareWallet">
|
{'border-bottom-style': 'solid'}" ng-show="isCopay && (isChromeApp || isDevel)">
|
||||||
<span translate>Hardware wallet</span>
|
<span translate>Hardware wallet</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue