Skip to content

Commit

Permalink
add account to join
Browse files Browse the repository at this point in the history
  • Loading branch information
matiu committed Nov 10, 2015
1 parent 1892d16 commit d805d34
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
10 changes: 10 additions & 0 deletions public/views/join.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->

Expand Down
1 change: 1 addition & 0 deletions src/js/controllers/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 5 additions & 1 deletion src/js/controllers/join.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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';
Expand All @@ -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;

Expand Down
5 changes: 2 additions & 3 deletions src/js/services/profileService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit d805d34

Please sign in to comment.