This commit is contained in:
Samuel Andert
2023-07-25 15:54:36 +02:00
parent 38ec75d19b
commit b560897e17
5 changed files with 27 additions and 20 deletions

View File

@ -8,7 +8,7 @@
const redirectUri = 'http://localhost:5173/';
export let setupLitProvider;
export let setupLit;
let view = 'sign_in';
let sessionSigs;
@ -30,8 +30,7 @@
onMount(async () => {
try {
provider = await setupLitProvider.setupLitProvider();
setupLitProvider.alertMe();
provider = await setupLit.connectProvider();
logMessage('Component mounted.');

View File

@ -7,7 +7,10 @@
const store = getComponentStore(id);
$: console.log('store:', $store);
export let helloEarthAlert;
onMount(async () => {
helloEarthAlert.alertMe();
console.log('hello Earth');
});
</script>

View File

@ -0,0 +1,3 @@
export function alertMe() {
alert("Hello Earth")
}

View File

@ -10,7 +10,7 @@ import { LitNodeClient } from '@lit-protocol/lit-node-client';
let provider: BaseProvider | undefined;
export async function setupLitProvider() {
export async function connectProvider() {
const litNodeClient = new LitNodeClient({
litNetwork: 'serrano',
debug: false
@ -28,7 +28,3 @@ export async function setupLitProvider() {
return provider;
}
export function alertMe() {
alert("hello")
}