Commit 9a05e075 authored by Thibaut Sardan's avatar Thibaut Sardan
Browse files

fix(): prevent saving accounts with empty seed

parent 99a46b58
......@@ -116,11 +116,17 @@ export default class AccountsStore extends Container<AccountsState> {
async save(account, pin = null) {
try {
//only save an account if the seed isn't empty
if (account.seed === ''){
return;
}
if (pin && account.seed) {
let encryptedSeed = await encryptData(account.seed, pin);
delete account.seed;
account.encryptedSeed = encryptedSeed;
}
account.updatedAt = new Date().getTime();
await saveAccount(account);
} catch (e) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment