Merge pull request #5425 from JDonadio/ref/disable-hw

Disable hw from mobile
This commit is contained in:
Gustavo Maximiliano Cortez 2017-01-09 12:11:48 -03:00 committed by GitHub
commit a301b5ad6f
2 changed files with 10 additions and 7 deletions

View File

@ -3,41 +3,44 @@
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) {
var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel;
var reader = new FileReader();
var defaults = configService.getDefaults();
var errors = bwcService.getErrors();
$scope.init = function() {
$scope.isSafari = platformInfo.isSafari;
$scope.isDevel = platformInfo.isDevel;
$scope.isChromeApp = platformInfo.isChromeApp;
$scope.isCordova = platformInfo.isCordova;
$scope.formData = {};
$scope.formData.bwsurl = defaults.bws.url;
$scope.formData.derivationPath = derivationPathHelper.default;
$scope.formData.account = 1;
$scope.importErr = false;
$scope.showHardwareWallet = appConfigService.name == 'copay';
$scope.isCopay = appConfigService.name == 'copay';
if ($stateParams.code)
$scope.processWalletInfo($stateParams.code);
$scope.seedOptions = [];
if (isChromeApp) {
if ($scope.isChromeApp) {
$scope.seedOptions.push({
id: 'ledger',
label: 'Ledger Hardware Wallet',
});
}
if (isChromeApp || isDevel) {
if ($scope.isChromeApp || $scope.isDevel) {
$scope.seedOptions.push({
id: 'trezor',
label: 'Trezor Hardware Wallet',
});
$scope.formData.seedSource = $scope.seedOptions[0];
}
$timeout(function() {
$scope.$apply();
});
};
$scope.processWalletInfo = function(code) {

View File

@ -16,7 +16,7 @@
<span translate>File/Text</span>
</div>
<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>
</div>
</div>