fixes credentials storage

This commit is contained in:
Matias Alejo Garcia 2016-06-14 17:48:00 -03:00
commit 7111bdf7f2
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
4 changed files with 17 additions and 10 deletions

View file

@ -48,7 +48,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
fc.setPrivateKeyEncryption(password);
fc.lock();
profileService.updateCredentials(fc.export(), function() {
profileService.updateCredentials(JSON.parse(fc.export()), function() {
$log.debug('Wallet encrypted');
return cb();
});
@ -62,7 +62,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
} catch (e) {
return cb(e);
}
profileService.updateCredentials(fc.export(), function() {
profileService.updateCredentials(JSON.parse(fc.export()), function() {
$log.debug('Wallet encryption disabled');
return cb();
});