Compare commits

..

1 Commits

Author SHA1 Message Date
userAdityaa fd133b930a fix: make account selector inert during email login 2026-06-14 22:34:25 +05:30
3 changed files with 10 additions and 14 deletions
+1 -1
View File
@@ -76,7 +76,7 @@
onclick={() => selectAccount(option)}
disabled={loading}
class="card2 bg-alt flex w-full items-center p-3 text-left">
<Profile pubkey={option.pubkey} />
<Profile inert pubkey={option.pubkey} />
</Button>
{/each}
</div>
+1 -1
View File
@@ -23,7 +23,7 @@
const relays = url ? [url] : Router.get().Event(event).getUrls()
const shouldProtect = url ? canEnforceNip70(url) : false
const shouldProtect = url ? canEnforceNip70(url) : Promise.resolve(false)
const deleteReaction = async (event: TrustedEvent) =>
publishDelete({relays, event, protect: await shouldProtect})
+8 -12
View File
@@ -24,14 +24,7 @@ import {
uniq,
} from "@welshman/lib"
import {throttled} from "@welshman/store"
import {
getRelay,
loadRelay,
manageRelay,
publishThunk,
sign,
waitForThunkError,
} from "@welshman/app"
import {loadRelay, manageRelay, publishThunk, sign, waitForThunkError} from "@welshman/app"
import {checkRelayHasLivekit} from "$lib/livekit"
import {stripPrefix} from "@lib/util"
import {relaysMostlyRestricted} from "@app/policies"
@@ -42,9 +35,6 @@ export const hasNip29 = (relay?: RelayProfile) =>
export const hasNip50 = (relay?: RelayProfile) =>
Boolean(relay?.supported_nips?.map?.(String)?.includes?.("50"))
export const hasNip70 = (relay?: RelayProfile) =>
Boolean(relay?.supported_nips?.map?.(String)?.includes?.("70"))
export const encodeRelay = (url: string) =>
encodeURIComponent(
normalizeRelayUrl(url)
@@ -161,7 +151,13 @@ export const requestRelayClaims = async (urls: string[]) =>
fromPairs(await Promise.all(urls.map(async url => [url, await requestRelayClaim(url)]))),
)
export const canEnforceNip70 = (url: string) => hasNip70(getRelay(url))
export const canEnforceNip70 = async (url: string) => {
const socket = Pool.get().get(url)
await socket.auth.attemptAuth(sign)
return socket.auth.status !== AuthStatus.None
}
export const attemptRelayAccess = async (url: string, claim = "") => {
const socket = Pool.get().get(url)