bug: search page fix

This commit is contained in:
2023-06-19 09:55:40 +01:00
parent 12250c5e3d
commit d573d075fe
8 changed files with 54 additions and 58 deletions

View File

@ -2,22 +2,26 @@ import { RelayCache } from "../src/GossipModel";
import { RequestBuilder, RequestStrategy } from "../src/RequestBuilder";
import { describe, expect } from "@jest/globals";
import { expandFilter } from "../src/RequestExpander";
import { unixNowMs } from "../src/Utils";
import { bytesToHex } from "@noble/curves/abstract/utils";
import { unixNow, unixNowMs } from "@snort/shared";
const DummyCache = {
get: (pk?: string) => {
getFromCache: (pk?: string) => {
if (!pk) return undefined;
return [
{
url: `wss://${pk}.com/`,
settings: {
read: true,
write: true,
return {
pubkey: pk,
created_at: unixNow(),
relays: [
{
url: `wss://${pk}.com/`,
settings: {
read: true,
write: true,
},
},
},
];
]
};
},
} as RelayCache;