Fixed join wallet from remote peer

This commit is contained in:
Gustavo Cortez 2014-05-01 18:34:30 -03:00
commit c98323e9d3
4 changed files with 12 additions and 12 deletions

View file

@ -47,9 +47,11 @@ Storage.prototype._read = function(k) {
var ret;
try {
ret = localStorage.getItem(k);
ret = this._decrypt(ret);
ret = ret.toString(CryptoJS.enc.Utf8);
ret = JSON.parse(ret);
if (ret){
ret = this._decrypt(ret);
ret = ret.toString(CryptoJS.enc.Utf8);
ret = JSON.parse(ret);
}
} catch (e) {
console.log('Error while decrypting: '+e);
throw e;