add options to enter Priv Key on join
This commit is contained in:
parent
b70857f9e1
commit
2fbbd2a53a
3 changed files with 27 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('JoinController',
|
||||
function($scope, $rootScope, $timeout, walletFactory, controllerUtils, Passphrase, notification) {
|
||||
function($scope, $rootScope, $timeout, $location, walletFactory, controllerUtils, Passphrase, notification) {
|
||||
controllerUtils.redirIfLogged();
|
||||
$rootScope.fromSetup = false;
|
||||
$scope.loading = false;
|
||||
|
|
@ -15,6 +15,13 @@ angular.module('copayApp.controllers').controller('JoinController',
|
|||
var context;
|
||||
var localMediaStream;
|
||||
|
||||
var s = ($location.search()).enterPrivate;
|
||||
if (s) {
|
||||
$scope.enterPrivate = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var _scan = function(evt) {
|
||||
if (localMediaStream) {
|
||||
context.drawImage(video, 0, 0, 300, 225);
|
||||
|
|
@ -112,7 +119,7 @@ angular.module('copayApp.controllers').controller('JoinController',
|
|||
walletFactory.network.on('badSecret', function() {});
|
||||
|
||||
Passphrase.getBase64Async($scope.joinPassword, function(passphrase) {
|
||||
walletFactory.joinCreateSession($scope.connectionId, $scope.nickname, passphrase, function(err, w) {
|
||||
walletFactory.joinCreateSession($scope.connectionId, $scope.nickname, passphrase, $scope.enterPrivate ? $scope.private : 'null', function(err, w) {
|
||||
$scope.loading = false;
|
||||
if (err || !w) {
|
||||
if (err === 'joinError')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue