add account to join

This commit is contained in:
Matias Alejo Garcia 2015-11-04 18:08:22 -03:00
parent 1892d16b92
commit d805d3484b
4 changed files with 18 additions and 4 deletions

View File

@ -141,6 +141,16 @@
</div>
</label>
</div>
<div ng-show="join.seedSourceId == 'set'">
<label class="oh"><span translate>Account</span>
<select class="m10t" ng-model="accountForSeed" ng-options="externalIndex as externalIndex for externalIndex in join.accountValuesForSeed">
</select>
</label>
<div class="oh text-gray line-b size-12 p10b m20b"><span translate>Multiple accounts can be derived from the same seed. Specify which account to use</div>
</div>
</div> <!-- columns -->
</div> <!-- advanced -->

View File

@ -123,6 +123,7 @@ angular.module('copayApp.controllers').controller('createController',
this.error = gettext('Please select account');
return;
}
opts.account = account;
self.hwWallet = self.seedSourceId == 'ledger' ? 'Ledger' : 'Trezor';
var src = self.seedSourceId == 'ledger' ? ledger : trezor;

View File

@ -6,6 +6,8 @@ angular.module('copayApp.controllers').controller('joinController',
var self = this;
var defaults = configService.getDefaults();
$scope.bwsurl = defaults.bws.url;
self.accountValuesForSeed = lodash.range(0, 100);
$scope.accountForSeed = 0;
this.onQrCodeScanned = function(data) {
$scope.secret = data;
@ -55,7 +57,8 @@ angular.module('copayApp.controllers').controller('joinController',
var opts = {
secret: form.secret.$modelValue,
myName: form.myName.$modelValue,
bwsurl: $scope.bwsurl
bwsurl: $scope.bwsurl,
account: $scope.accountForSeed || 0,
}
var setSeed = self.seedSourceId =='set';
@ -82,6 +85,7 @@ angular.module('copayApp.controllers').controller('joinController',
this.error = gettext('Please select account');
return;
}
opts.account = account;
self.hwWallet = self.seedSourceId == 'ledger' ? 'Ledger' : 'Trezor';
var src = self.seedSourceId == 'ledger' ? ledger : trezor;

View File

@ -186,11 +186,10 @@ angular.module('copayApp.services')
// </ Nasty
if (opts.fromHardware && opts.n>1) {
walletClient.credentials.derivationStrategy ==
//walletClient.credentials.derivationStrategy ==
}
// Nasty>
}
} catch (ex) {
$log.info(ex);
return cb(gettext('Could not create: Invalid wallet seed'));