diff --git a/package.json b/package.json index d6eca83e..70bc4a41 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "@welshman/lib": "^0.1.2", "@welshman/net": "^0.1.2", "@welshman/relay": "^0.1.2", + "@welshman/router": "^0.1.0", "@welshman/signer": "^0.1.4", "@welshman/store": "^0.1.3", "@welshman/util": "^0.1.3", @@ -84,6 +85,7 @@ "@welshman/feeds": "link:../welshman/packages/feeds", "@welshman/net": "link:../welshman/packages/net", "@welshman/relay": "link:../welshman/packages/relay", + "@welshman/router": "link:../welshman/packages/router", "@welshman/signer": "link:../welshman/packages/signer", "@welshman/store": "link:../welshman/packages/store", "@welshman/editor": "link:../welshman/packages/editor" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 154d3355..1dd29451 100644 Binary files a/pnpm-lock.yaml and b/pnpm-lock.yaml differ diff --git a/src/app/commands.ts b/src/app/commands.ts index ea955cff..9807793e 100644 --- a/src/app/commands.ts +++ b/src/app/commands.ts @@ -33,6 +33,7 @@ import { import type {TrustedEvent, Filter, EventContent, EventTemplate} from "@welshman/util" import {Pool, PublishStatus, AuthStatus, SocketStatus} from "@welshman/net" import {Nip59, stamp} from "@welshman/signer" +import {Router} from "@welshman/router" import { pubkey, signer, @@ -53,7 +54,6 @@ import { dropSession, tagEventForComment, tagEventForQuote, - Router, thunkIsComplete, } from "@welshman/app" import type {Thunk} from "@welshman/app" @@ -259,7 +259,7 @@ export const setInboxRelayPolicy = (url: string, enabled: boolean) => { // Relay access export const checkRelayAccess = async (url: string, claim = "") => { - const socket = Pool.getSingleton().get(url) + const socket = Pool.get().get(url) await socket.auth.attemptAuth(signer.get().sign) @@ -291,7 +291,7 @@ export const checkRelayProfile = async (url: string) => { } export const checkRelayConnection = async (url: string) => { - const socket = Pool.getSingleton().get(url) + const socket = Pool.get().get(url) socket.attemptToOpen() @@ -306,7 +306,7 @@ export const checkRelayConnection = async (url: string) => { } export const checkRelayAuth = async (url: string, timeout = 3000) => { - const socket = Pool.getSingleton().get(url) + const socket = Pool.get().get(url) const okStatuses = [AuthStatus.None, AuthStatus.Ok] await socket.auth.attemptAuth(signer.get().sign) diff --git a/src/app/components/AlertItem.svelte b/src/app/components/AlertItem.svelte index 37337051..96fdb52f 100644 --- a/src/app/components/AlertItem.svelte +++ b/src/app/components/AlertItem.svelte @@ -1,5 +1,5 @@