minors
This commit is contained in:
parent
38ec75d19b
commit
b560897e17
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
const redirectUri = 'http://localhost:5173/';
|
const redirectUri = 'http://localhost:5173/';
|
||||||
|
|
||||||
export let setupLitProvider;
|
export let setupLit;
|
||||||
|
|
||||||
let view = 'sign_in';
|
let view = 'sign_in';
|
||||||
let sessionSigs;
|
let sessionSigs;
|
||||||
@ -30,8 +30,7 @@
|
|||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
try {
|
try {
|
||||||
provider = await setupLitProvider.setupLitProvider();
|
provider = await setupLit.connectProvider();
|
||||||
setupLitProvider.alertMe();
|
|
||||||
|
|
||||||
logMessage('Component mounted.');
|
logMessage('Component mounted.');
|
||||||
|
|
||||||
|
@ -7,7 +7,10 @@
|
|||||||
const store = getComponentStore(id);
|
const store = getComponentStore(id);
|
||||||
$: console.log('store:', $store);
|
$: console.log('store:', $store);
|
||||||
|
|
||||||
|
export let helloEarthAlert;
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
|
helloEarthAlert.alertMe();
|
||||||
console.log('hello Earth');
|
console.log('hello Earth');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
3
src/lib/services/helloEarthAlert.ts
Normal file
3
src/lib/services/helloEarthAlert.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export function alertMe() {
|
||||||
|
alert("Hello Earth")
|
||||||
|
}
|
@ -10,7 +10,7 @@ import { LitNodeClient } from '@lit-protocol/lit-node-client';
|
|||||||
|
|
||||||
let provider: BaseProvider | undefined;
|
let provider: BaseProvider | undefined;
|
||||||
|
|
||||||
export async function setupLitProvider() {
|
export async function connectProvider() {
|
||||||
const litNodeClient = new LitNodeClient({
|
const litNodeClient = new LitNodeClient({
|
||||||
litNetwork: 'serrano',
|
litNetwork: 'serrano',
|
||||||
debug: false
|
debug: false
|
||||||
@ -28,7 +28,3 @@ export async function setupLitProvider() {
|
|||||||
|
|
||||||
return provider;
|
return provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function alertMe() {
|
|
||||||
alert("hello")
|
|
||||||
}
|
|
@ -5,20 +5,27 @@
|
|||||||
layout: `
|
layout: `
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"auth",
|
"auth",
|
||||||
"hello",
|
"header",
|
||||||
"google"
|
"main",
|
||||||
grid-template-rows: 1fr 1fr;
|
"footer"
|
||||||
|
grid-template-rows: 1fr 1fr auto;
|
||||||
`,
|
`,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: 'authsig',
|
id: '1',
|
||||||
componentName: 'HelloEarth',
|
componentName: 'GoogleAuth',
|
||||||
slot: 'hello'
|
slot: 'header',
|
||||||
|
services: ['setupLit']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
componentName: 'Messages',
|
||||||
|
slot: 'Main'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// id: 'wallet1',
|
// id: '2',
|
||||||
// componentName: 'Wallet',
|
// componentName: 'Wallet',
|
||||||
// slot: 'play',
|
// slot: 'main',
|
||||||
// state: {
|
// state: {
|
||||||
// rpcURL: 'https://rpc.gnosischain.com/',
|
// rpcURL: 'https://rpc.gnosischain.com/',
|
||||||
// pkpPubKey:
|
// pkpPubKey:
|
||||||
@ -26,10 +33,9 @@
|
|||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
id: 'google',
|
id: '3',
|
||||||
componentName: 'GoogleAuth',
|
componentName: 'Terminal',
|
||||||
slot: 'google',
|
slot: 'footer'
|
||||||
services: ['setupLitProvider']
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user