fix tests

This commit is contained in:
2023-05-24 11:12:23 +01:00
parent c36544f9a3
commit 8f7a9a1327
98 changed files with 158 additions and 116 deletions

View File

@ -1,6 +1,6 @@
import * as utils from "@noble/curves/abstract/utils";
import * as base64 from "@protobufjs/base64";
import { hmacSha256, unwrap } from "Util";
import { hmacSha256, unwrap } from "SnortUtils";
import useLogin from "Hooks/useLogin";
export interface ImgProxySettings {

View File

@ -3,7 +3,7 @@ import { HexKey, u256 } from "@snort/nostr";
import { InteractionCache } from "Cache/EventInteractionCache";
import { EventInteraction } from "Db";
import { sha256, unwrap } from "Util";
import { sha256, unwrap } from "SnortUtils";
export function useInteractionCache(pubkey?: HexKey, event?: u256) {
const id = event && pubkey ? sha256(event + pubkey) : undefined;

View File

@ -4,7 +4,7 @@ import { EmailRegex, MnemonicRegex } from "Const";
import { LoginStore } from "Login";
import { generateBip39Entropy, entropyToPrivateKey } from "nip6";
import { getNip05PubKey } from "Pages/LoginPage";
import { bech32ToHex } from "Util";
import { bech32ToHex } from "SnortUtils";
export default function useLoginHandler() {
const { formatMessage } = useIntl();

View File

@ -2,7 +2,7 @@ import { HexKey } from "@snort/nostr";
import useEventPublisher from "Feed/EventPublisher";
import useLogin from "Hooks/useLogin";
import { setBlocked, setMuted } from "Login";
import { appendDedupe } from "Util";
import { appendDedupe } from "SnortUtils";
export default function useModeration() {
const login = useLogin();

View File

@ -1,7 +1,7 @@
import { useSyncExternalStore } from "react";
import { RequestBuilder, System } from "System";
import { EmptySnapshot, NoteStore, StoreSnapshot } from "System/NoteCollection";
import { unwrap } from "Util";
import { unwrap } from "SnortUtils";
const useRequestBuilder = <TStore extends NoteStore, TSnapshot = ReturnType<TStore["getSnapshotData"]>>(
type: { new (): TStore },