IIFE was interfering with trace

This commit is contained in:
Daniel Lugo 2021-09-06 15:52:24 -04:00
parent 088cc3f3b4
commit f534c3e45d

View file

@ -53,15 +53,13 @@ const deepDecryptIfNeeded = async (value, publicKey, epubForDecryption) => {
if (user.is.pub === publicKey || 'me' === publicKey) {
sec = getMySecret()
} else {
sec = await SEA.secret(
await (() => {
if (epubForDecryption) {
return epubForDecryption
let epub = epubForDecryption
if (!epub) {
epub = await pubToEpub(publicKey)
}
return pubToEpub(publicKey)
})(),
user._.sea
)
sec = await SEA.secret(epub, user._.sea)
}
const decrypted = SEA.decrypt(value, sec)