Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
parity-signer
Commits
9a05e075
Commit
9a05e075
authored
May 30, 2019
by
Thibaut Sardan
Browse files
fix(): prevent saving accounts with empty seed
parent
99a46b58
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stores/AccountsStore.js
View file @
9a05e075
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment