feat: redesign relay screen

This commit is contained in:
2024-01-14 18:05:36 +07:00
parent f908c46a19
commit dae4b1d52b
18 changed files with 495 additions and 270 deletions

View File

@@ -355,11 +355,11 @@ export class Ark {
public async getAllRelaysFromContacts() {
const fetcher = NostrFetcher.withCustomPool(ndkAdapter(this.ndk));
const connectedRelays = this.ndk.pool
.connectedRelays()
.map((item) => item.url);
try {
const LIMIT = 1;
const connectedRelays = this.ndk.pool
.connectedRelays()
.map((item) => item.url);
const relayMap = new Map<string, string[]>();
const relayEvents = fetcher.fetchLatestEventsPerAuthor(
{
@@ -367,7 +367,7 @@ export class Ark {
relayUrls: connectedRelays,
},
{ kinds: [NDKKind.RelayList] },
LIMIT,
1,
);
for await (const { author, events } of relayEvents) {