Add setting for auto unwrapping

This commit is contained in:
Jon Staab
2025-10-20 10:40:40 -07:00
parent 247c7bafeb
commit 88650fb166
2 changed files with 34 additions and 25 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ export const wrap = async (
return wrap
}
export const unwrap = async (signer: ISigner, wrap: SignedEvent) => {
export const unwrap = async (signer: ISigner, wrap: SignedEvent): Promise<HashedEvent> => {
// Avoid decrypting the same event multiple times
if (seen.has(wrap.id)) {
const rumorOrError = seen.get(wrap.id)
@@ -57,7 +57,7 @@ export const unwrap = async (signer: ISigner, wrap: SignedEvent) => {
if (rumorOrError instanceof Error) {
throw rumorOrError
} else {
return rumorOrError
return rumorOrError!
}
}