This commit is contained in:
Matias Alejo Garcia 2015-04-24 18:06:04 -03:00
commit 6723cba56a
3 changed files with 4 additions and 12 deletions

View file

@ -21,13 +21,7 @@ angular.module('copayApp.services')
return cb(null, data[k]);
});
} else {
console.log('[localStorage.js.24]',k); //TODO
console.log('[localStorage.js.25:TODO:]'); //TODO
console.log('[localStorage.js.26:TODO:]'); //TODO
console.log('[localStorage.js.27:TODO:]'); //TODO
$timeout(function() {
return cb(null, ls.getItem(k));
}, 1000);
}
};

View file

@ -111,8 +111,6 @@ angular.module('copayApp.services')
root.bindProfile = function(profile, cb) {
console.log('[profileService.js.114] Bind profile', profile); //TODO
root.profile = profile;
configService.get(function(err) {
@ -129,14 +127,12 @@ console.log('[profileService.js.114] Bind profile', profile); //TODO
root.loadAndBindProfile = function(cb) {
storageService.getProfile(function(err, profile) {
console.log('[profileService.js.129:err:]',err); //TODO
if (err) {
$rootScope.$emit('Local/DeviceError', err);
return cb(err);
}
if (!profile) return cb(new Error('NOPROFILE: No profile'));
console.log('[profileService.js.135] BIND'); //TODO
return root.bindProfile(profile, cb);
});
};
@ -192,7 +188,6 @@ console.log('[profileService.js.135] BIND'); //TODO
return cb('Could not join using the specified extended private key');
}
}
// TODO name
walletClient.joinWallet(opts.secret, opts.myName || 'me', function(err) {
if (err) return cb(err);

View file

@ -61,7 +61,10 @@ angular.module('copayApp.services')
root.getProfile = function(cb) {
storage.get('profile', function(err, str) {
if (err || !str) return cb(err);
if (err || !str)
// Migrate ?
return cb(err);
decryptOnMobile(str, function(err, str) {
if (err) return cb(err);