mirror of https://github.com/BTCPrivate/copay.git
add digest
This commit is contained in:
parent
a097927a2f
commit
a268c3c8eb
|
@ -218,6 +218,9 @@ angular.module('copayApp.services')
|
||||||
} else {
|
} else {
|
||||||
$location.path('/manage');
|
$location.path('/manage');
|
||||||
}
|
}
|
||||||
|
$timeout(function() {
|
||||||
|
$rootScope.$digest()
|
||||||
|
}, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
// On the focused wallet
|
// On the focused wallet
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.services')
|
angular.module('copayApp.services')
|
||||||
.factory('identityService', function($rootScope, $location, pluginManager, controllerUtils) {
|
.factory('identityService', function($rootScope, $location, $timeout, pluginManager, controllerUtils) {
|
||||||
var root = {};
|
var root = {};
|
||||||
|
|
||||||
root.check = function(scope) {
|
root.check = function(scope) {
|
||||||
|
@ -36,11 +36,15 @@ angular.module('copayApp.services')
|
||||||
scope.loading = false;
|
scope.loading = false;
|
||||||
if (err || !iden) {
|
if (err || !iden) {
|
||||||
copay.logger.debug(err);
|
copay.logger.debug(err);
|
||||||
if (err && ( err.match('EEXISTS') || err.match('BADCREDENTIALS'))) {
|
if (err && (err.match('EEXISTS') || err.match('BADCREDENTIALS'))) {
|
||||||
scope.error = 'User already exists!';
|
scope.error = 'User already exists!';
|
||||||
} else {
|
} else {
|
||||||
scope.error = 'Unknown error when connecting Insight Server';
|
scope.error = 'Unknown error when connecting Insight Server';
|
||||||
}
|
}
|
||||||
|
$timeout(function() {
|
||||||
|
$rootScope.$digest()
|
||||||
|
}, 0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var walletOptions = {
|
var walletOptions = {
|
||||||
|
@ -74,18 +78,20 @@ angular.module('copayApp.services')
|
||||||
walletDefaults: config.wallet,
|
walletDefaults: config.wallet,
|
||||||
passphraseConfig: config.passphraseConfig,
|
passphraseConfig: config.passphraseConfig,
|
||||||
}, function(err, iden) {
|
}, function(err, iden) {
|
||||||
|
scope.loading = false;
|
||||||
if (err && !iden) {
|
if (err && !iden) {
|
||||||
if ((err.toString() || '').match('PNOTFOUND')) {
|
if ((err.toString() || '').match('PNOTFOUND')) {
|
||||||
scope.error = 'Invalid email or password';
|
scope.error = 'Invalid email or password';
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
scope.error = 'Unknown error';
|
scope.error = 'Unknown error';
|
||||||
}
|
}
|
||||||
|
$timeout(function() {
|
||||||
|
$rootScope.$digest()
|
||||||
|
}, 0);
|
||||||
} else {
|
} else {
|
||||||
var firstWallet = iden.getLastFocusedWallet();
|
var firstWallet = iden.getLastFocusedWallet();
|
||||||
controllerUtils.bindProfile(scope, iden, firstWallet);
|
controllerUtils.bindProfile(scope, iden, firstWallet);
|
||||||
}
|
}
|
||||||
scope.loading = false;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue