Initialize thunk status
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import {Writable, Readable, writable, derived, get} from "svelte/store"
|
import {Writable, Readable, writable, derived, get} from "svelte/store"
|
||||||
import {Deferred, TaskQueue, dissoc, identity, uniq, defer, sleep, assoc} from "@welshman/lib"
|
import {Deferred, fromPairs, TaskQueue, dissoc, identity, uniq, defer, sleep, assoc} from "@welshman/lib"
|
||||||
import {stamp, own, hash} from "@welshman/signer"
|
import {stamp, own, hash} from "@welshman/signer"
|
||||||
import {
|
import {
|
||||||
TrustedEvent,
|
TrustedEvent,
|
||||||
@@ -222,6 +222,14 @@ export const thunkQueue = new TaskQueue<Thunk>({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update status to pending
|
||||||
|
thunk.status.set(
|
||||||
|
fromPairs(
|
||||||
|
thunk.request.relays
|
||||||
|
.map(url => [url, {status: PublishStatus.Pending, message: "Sending your message..."}])
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
// Send it off
|
// Send it off
|
||||||
const pub = new MultiPublish({
|
const pub = new MultiPublish({
|
||||||
event: signedEvent,
|
event: signedEvent,
|
||||||
|
|||||||
Reference in New Issue
Block a user