diff --git a/src/SiweConnect.svelte b/src/SiweConnect.svelte new file mode 100644 index 000000000..564199de1 --- /dev/null +++ b/src/SiweConnect.svelte @@ -0,0 +1,34 @@ + + + + + diff --git a/src/base/seeds/View.svelte b/src/base/seeds/View.svelte index bca47cfe0..9b4c54b7a 100644 --- a/src/base/seeds/View.svelte +++ b/src/base/seeds/View.svelte @@ -7,26 +7,23 @@ import NotFound from "@app/NotFound.svelte"; import Clipboard from "@app/Clipboard.svelte"; import Projects from "@app/base/orgs/View/Projects.svelte"; - import { SeedSession, signInWithEthereum } from "@app/siwe"; import { session } from "@app/session"; import Address from "@app/Address.svelte"; + import SiweConnect from "@app/SiweConnect.svelte"; + import type { SeedSession } from "@app/siwe"; export let config: Config; export let host: string; - let sessionData: SeedSession | null = null; + let siweSession: SeedSession | null = null; - $: if ($session) { + $: if ($session?.siwe) { const entries = Object.entries($session.siwe); const result = entries.find(([, session]) => session.domain === host); if (result) { - sessionData = result[1]; + siweSession = result[1]; } } - - const signIn = async (seed: Seed) => { - await signInWithEthereum(seed, config); - };