compute mysecret after checking create() was successful

This commit is contained in:
Daniel Lugo 2020-02-20 14:21:58 -04:00
parent 73201094b7
commit c5016495e3

View file

@ -1131,11 +1131,10 @@ const register = async (alias, pass) => {
_isRegistering = false
const mySecret = await mySEA.secret(user._.sea.epub, user._.sea)
if (typeof ack.err === 'string') {
throw new Error(ack.err)
} else if (typeof ack.pub === 'string') {
const mySecret = await mySEA.secret(user._.sea.epub, user._.sea)
_currentAlias = alias
_currentPass = await mySEA.encrypt(pass, mySecret)
} else {