rename walletFactory to identity. Test passing
This commit is contained in:
parent
e5d4b8adaf
commit
eb9ab115d7
14 changed files with 652 additions and 115 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, identity, controllerUtils, Passphrase, notification) {
|
||||
controllerUtils.redirIfLogged();
|
||||
$rootScope.fromSetup = false;
|
||||
$scope.loading = false;
|
||||
|
|
@ -121,12 +121,13 @@ angular.module('copayApp.controllers').controller('JoinController',
|
|||
$scope.loading = true;
|
||||
|
||||
Passphrase.getBase64Async($scope.joinPassword, function(passphrase) {
|
||||
walletFactory.joinCreateSession({
|
||||
identity.joinCreateSession({
|
||||
secret: $scope.connectionId,
|
||||
nickname: $scope.nickname,
|
||||
passphrase: passphrase,
|
||||
privateHex: $scope.private,
|
||||
}, function(err, w) {
|
||||
|
||||
$scope.loading = false;
|
||||
if (err || !w) {
|
||||
if (err === 'joinError')
|
||||
|
|
@ -137,8 +138,6 @@ angular.module('copayApp.controllers').controller('JoinController',
|
|||
notification.error('Network Error', 'Wallet network configuration missmatch');
|
||||
else if (err === 'badSecret')
|
||||
notification.error('Bad secret', 'The secret string you entered is invalid');
|
||||
else if (err === 'connectionError')
|
||||
notification.error('Networking Error', 'Could not connect to the Insight server. Check your settings and network configuration');
|
||||
else
|
||||
notification.error('Unknown error');
|
||||
controllerUtils.onErrorDigest();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue