refactor(note): only support kind 1

This commit is contained in:
2024-01-04 12:35:21 +07:00
parent fcde669685
commit 542b6033c2
12 changed files with 82 additions and 232 deletions

View File

@@ -3,6 +3,7 @@ import { NDKCacheAdapterTauri } from "@lume/ndk-cache-tauri";
import { LumeStorage } from "@lume/storage";
import { QUOTES, delay, sendNativeNotification } from "@lume/utils";
import NDK, {
NDKKind,
NDKNip46Signer,
NDKPrivateKeySigner,
NDKRelay,
@@ -154,8 +155,8 @@ const LumeProvider = ({ children }: PropsWithChildren<object>) => {
// auth
ndk.relayAuthDefaultPolicy = async (relay: NDKRelay, challenge: string) => {
const signIn = NDKRelayAuthPolicies.signIn({ ndk, signer });
const event = await signIn(relay, challenge);
const signIn = NDKRelayAuthPolicies.signIn({ ndk });
const event = await signIn(relay, challenge).catch((e) => console.log(e));
if (event) {
sendNativeNotification(
`You've sign in sucessfully to relay: ${relay.url}`,