chore: update dependencies

This commit is contained in:
2023-12-29 08:26:13 +07:00
parent 4fc3cc8a80
commit e1edba8a78
23 changed files with 1024 additions and 825 deletions

View File

@@ -20,6 +20,7 @@ import {
normalizeRelayUrlSet,
} from "nostr-fetch";
import { PropsWithChildren, useEffect, useState } from "react";
import { toast } from "sonner";
import { createContext, useContextSelector } from "use-context-selector";
import { Ark } from "./ark";
@@ -156,9 +157,13 @@ const LumeProvider = ({ children }: PropsWithChildren<object>) => {
await ndk.connect(3000);
// auth
ndk.relayAuthDefaultPolicy = (relay: NDKRelay, challenge: string) => {
ndk.relayAuthDefaultPolicy = async (relay: NDKRelay, challenge: string) => {
const signIn = NDKRelayAuthPolicies.signIn({ ndk, signer });
return signIn(relay, challenge);
const event = await signIn(relay, challenge);
if (event) {
toast.success(`You've sign in sucessfully to relay: ${relay.url}`);
return event;
}
};
// update account's metadata