Use new relay getters
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
FOLLOWS,
|
||||
PROFILE,
|
||||
RELAYS,
|
||||
getRelaysFromList,
|
||||
} from "@welshman/util"
|
||||
import {Nip46Broker, makeSecret} from "@welshman/signer"
|
||||
import type {Socket} from "@welshman/net"
|
||||
@@ -33,7 +34,6 @@
|
||||
session,
|
||||
signer,
|
||||
dropSession,
|
||||
getRelayUrls,
|
||||
userInboxRelaySelections,
|
||||
loginWithNip01,
|
||||
loginWithNip46,
|
||||
@@ -204,7 +204,7 @@
|
||||
{kinds: [WRAP], "#p": [$pubkey], since: ago(WEEK, 2)},
|
||||
{kinds: [WRAP], "#p": [$pubkey], limit: 100},
|
||||
],
|
||||
relays: getRelayUrls($userInboxRelaySelections),
|
||||
relays: getRelaysFromList($userInboxRelaySelections),
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from "svelte"
|
||||
import {derived} from "svelte/store"
|
||||
import {
|
||||
getRelayUrls,
|
||||
userRelaySelections,
|
||||
userInboxRelaySelections,
|
||||
getReadRelayUrls,
|
||||
getWriteRelayUrls,
|
||||
relaySelections,
|
||||
inboxRelaySelections,
|
||||
} from "@welshman/app"
|
||||
import {pubkey, relaySelections, inboxRelaySelections, derivePubkeyRelays} from "@welshman/app"
|
||||
import {RelayMode} from "@welshman/util"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Collapse from "@lib/components/Collapse.svelte"
|
||||
@@ -19,9 +11,9 @@
|
||||
import {discoverRelays} from "@app/requests"
|
||||
import {setRelayPolicy, setInboxRelayPolicy} from "@app/commands"
|
||||
|
||||
const readRelayUrls = derived(userRelaySelections, getReadRelayUrls)
|
||||
const writeRelayUrls = derived(userRelaySelections, getWriteRelayUrls)
|
||||
const inboxRelayUrls = derived(userInboxRelaySelections, getRelayUrls)
|
||||
const readRelayUrls = derivePubkeyRelays($pubkey!, RelayMode.Read)
|
||||
const writeRelayUrls = derivePubkeyRelays($pubkey!, RelayMode.Write)
|
||||
const inboxRelayUrls = derivePubkeyRelays($pubkey!, RelayMode.Inbox)
|
||||
|
||||
const addReadRelay = () =>
|
||||
pushModal(RelayAdd, {
|
||||
|
||||
Reference in New Issue
Block a user