This commit is contained in:
Matias Alejo Garcia 2014-11-30 01:11:00 -03:00
commit 1eebaa4e94
3 changed files with 4 additions and 4 deletions

View file

@ -23,8 +23,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
return; return;
} }
$rootScope.starting = true; $rootScope.starting = true;
identityService.open(form.email.$modelValue, form.password.$modelValue, function(err) { identityService.open(form.email.$modelValue, form.password.$modelValue, function(err, iden) {
$rootScope.starting = false;
if (err) { if (err) {
copay.logger.warn(err); copay.logger.warn(err);
if ((err.toString() || '').match('PNOTFOUND')) { if ((err.toString() || '').match('PNOTFOUND')) {

View file

@ -444,7 +444,8 @@ Identity.importFromFullJson = function(str, password, opts, cb) {
* @emits newWallet (walletId) * @emits newWallet (walletId)
*/ */
Identity.prototype.bindWallet = function(w) { Identity.prototype.bindWallet = function(w) {
this.wallets[w.getId()] = w; var self = this;
self.wallets[w.getId()] = w;
log.debug('Binding wallet:' + w.getName()); log.debug('Binding wallet:' + w.getName());
w.on('txProposalsUpdated', function() { w.on('txProposalsUpdated', function() {

View file

@ -83,7 +83,6 @@ angular.module('copayApp.services')
copay.Identity.open(opts, function(err, iden) { copay.Identity.open(opts, function(err, iden) {
if (err) return cb(err); if (err) return cb(err);
console.log('[identityService.js.95] LISTO OPEN!!'); //TODO
root.bind(iden); root.bind(iden);
iden.openWallets(); iden.openWallets();
return cb(); return cb();
@ -256,6 +255,7 @@ angular.module('copayApp.services')
copay.logger.debug('newWallet:', w.getName(), wid, iden.getLastFocusedWalletId()); copay.logger.debug('newWallet:', w.getName(), wid, iden.getLastFocusedWalletId());
root.installWalletHandlers(w); root.installWalletHandlers(w);
if (wid == iden.getLastFocusedWalletId()) { if (wid == iden.getLastFocusedWalletId()) {
$rootScope.starting = false;
copay.logger.debug('GOT Focused wallet:', w.getName()); copay.logger.debug('GOT Focused wallet:', w.getName());
root.setFocusedWallet(w, true); root.setFocusedWallet(w, true);
root.goWalletHome(); root.goWalletHome();