Make thunks an array instead of an object

This commit is contained in:
Jon Staab
2025-10-17 10:32:08 -07:00
parent 642a4ce517
commit 543dbda64f
4 changed files with 34 additions and 12 deletions
+6 -7
View File
@@ -214,13 +214,12 @@ export const sendWrapped = async ({template, pubkeys, ...options}: SendWrappedOp
return new MergedThunk(
await Promise.all(
uniq(pubkeys).map(async recipient =>
publishThunk({
event: await nip59.wrap(recipient, stamp(template)),
relays: Router.get().PubkeyInbox(recipient).getUrls(),
...options,
}),
),
uniq(pubkeys).map(async recipient => {
const event = await nip59.wrap(recipient, stamp(template))
const relays = Router.get().PubkeyInbox(recipient).getUrls()
return publishThunk({event, relays, ...options})
}),
),
)
}