Merge pull request #3435 from matiu/bug/trezor-fixes

fix join message
This commit is contained in:
Gustavo Maximiliano Cortez 2015-11-11 16:49:25 -03:00
commit 77be7f217d
5 changed files with 11 additions and 10 deletions

View File

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="msapplication-tap-highlight" content="no"> <meta name="msapplication-tap-highlight" content="no">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="css/foundation.css"> <link rel="stylesheet" type="text/css" href="css/foundation.css">
<link rel="stylesheet" type="text/css" href="icons/foundation-icons.css"> <link rel="stylesheet" type="text/css" href="icons/foundation-icons.css">
<link rel="stylesheet" type="text/css" href="css/copay.css"> <link rel="stylesheet" type="text/css" href="css/copay.css">

View File

@ -22,7 +22,7 @@
</div> </div>
<div class="onGoingProcess" ng-show="create.hwWallet"> <div class="onGoingProcess" ng-show="create.hwWallet">
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}"> <div class="onGoingProcess-content" ng-style="{'background-color':'#222'}" style="max-height:6.5em" >
<div class="spinner"> <div class="spinner">
<div class="rect1"></div> <div class="rect1"></div>
<div class="rect2"></div> <div class="rect2"></div>
@ -31,6 +31,7 @@
<div class="rect5"></div> <div class="rect5"></div>
</div> </div>
<span translate>Connecting to {{create.hwWallet}} Wallet...</span> <span translate>Connecting to {{create.hwWallet}} Wallet...</span>
<span ng-show="create.hwWallet=='Trezor'" translate>Please accept to export two public keys from the Trezor app</span>
</div> </div>
</div> </div>

View File

@ -20,7 +20,7 @@
</div> </div>
<div class="onGoingProcess" ng-show="join.hwWallet"> <div class="onGoingProcess" ng-show="join.hwWallet">
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}"> <div class="onGoingProcess-content" ng-style="{'background-color':'#222'}" style="max-height:6.5em">
<div class="spinner"> <div class="spinner">
<div class="rect1"></div> <div class="rect1"></div>
<div class="rect2"></div> <div class="rect2"></div>
@ -29,6 +29,7 @@
<div class="rect5"></div> <div class="rect5"></div>
</div> </div>
<span translate>Connecting to {{join.hwWallet}} Wallet...</span> <span translate>Connecting to {{join.hwWallet}} Wallet...</span>
<span ng-show="join.hwWallet=='Trezor'" translate>Please accept to export two public keys from the Trezor app</span>
</div> </div>
</div> </div>
@ -98,12 +99,9 @@
</div> </div>
<div ng-show="join.seedSourceId == 'trezor' || join.seedSourceId == 'ledger'"> <div ng-show="join.seedSourceId == 'trezor' || join.seedSourceId == 'ledger'">
<label class="oh"><span translate>Account Number</span>
<label class="oh"><span translate>Account</span> <input type="number" id="account" ng-model="account">
<select class="m10t" ng-model="account" ng-options="externalIndex as externalIndex for externalIndex in join.accountValues">
</select>
</label> </label>
<div class="oh text-gray line-b size-12 p10b m20b"><span translate>Multiple wallets accounts are supported on the device simultaneously. Select which account should be used for this wallet</div>
</div> </div>
<div class="box-notification" ng-show="join.seedSourceId=='new' && createPassphrase"> <div class="box-notification" ng-show="join.seedSourceId=='new' && createPassphrase">

View File

@ -92,6 +92,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.setSpendUnconfirmed(); self.setSpendUnconfirmed();
$timeout(function() { $timeout(function() {
$rootScope.$apply();
self.hasProfile = true; self.hasProfile = true;
self.noFocusedWallet = false; self.noFocusedWallet = false;
self.onGoingProcess = {}; self.onGoingProcess = {};
@ -141,7 +142,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
var defaults = configService.getDefaults(); var defaults = configService.getDefaults();
var config = configService.getSync(); var config = configService.getSync();
self.usingCustomBWS = config.bwsFor && (config.bwsFor[self.walletId] != defaults.bws.url); self.usingCustomBWS = config.bwsFor && config.bwsFor[self.walletId] && (config.bwsFor[self.walletId] != defaults.bws.url);
}; };
self.setTab = function(tab, reset, tries, switchState) { self.setTab = function(tab, reset, tries, switchState) {

View File

@ -7,6 +7,7 @@ angular.module('copayApp.controllers').controller('joinController',
var defaults = configService.getDefaults(); var defaults = configService.getDefaults();
$scope.bwsurl = defaults.bws.url; $scope.bwsurl = defaults.bws.url;
$scope.derivationPath = derivationPathHelper.default; $scope.derivationPath = derivationPathHelper.default;
$scope.account = 1;
this.onQrCodeScanned = function(data) { this.onQrCodeScanned = function(data) {
$scope.secret = data; $scope.secret = data;
@ -43,7 +44,6 @@ angular.module('copayApp.controllers').controller('joinController',
this.setSeedSource = function(src) { this.setSeedSource = function(src) {
self.seedSourceId = $scope.seedSource.id; self.seedSourceId = $scope.seedSource.id;
self.accountValues = lodash.range(1, 100);
$timeout(function() { $timeout(function() {
$rootScope.$apply(); $rootScope.$apply();
@ -55,7 +55,6 @@ angular.module('copayApp.controllers').controller('joinController',
self.error = gettext('Please enter the required fields'); self.error = gettext('Please enter the required fields');
return; return;
} }
self.loading = true;
var opts = { var opts = {
secret: form.secret.$modelValue, secret: form.secret.$modelValue,
@ -120,6 +119,7 @@ angular.module('copayApp.controllers').controller('joinController',
}; };
this._join = function(opts) { this._join = function(opts) {
self.loading = true;
$timeout(function() { $timeout(function() {
profileService.joinWallet(opts, function(err) { profileService.joinWallet(opts, function(err) {
if (err) { if (err) {