refactor: change how ready and logged in are controlled
This commit is contained in:
parent
37a03e41ca
commit
ea22848868
|
@ -59,10 +59,17 @@ export function useBrowserState() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function boot() {
|
async function boot() {
|
||||||
|
const lume = useLume();
|
||||||
|
|
||||||
const reg = await navigator.serviceWorker.register("/sw.js");
|
const reg = await navigator.serviceWorker.register("/sw.js");
|
||||||
await reg.update();
|
await reg.update();
|
||||||
|
|
||||||
await kernel.serviceWorkerReady();
|
await kernel.serviceWorkerReady();
|
||||||
|
|
||||||
|
kernel.init().then(() => {
|
||||||
|
lume.setReady(true);
|
||||||
|
});
|
||||||
|
|
||||||
await kernelLoaded();
|
await kernelLoaded();
|
||||||
|
|
||||||
BOOT_FUNCTIONS.push(
|
BOOT_FUNCTIONS.push(
|
||||||
|
@ -101,6 +108,8 @@ async function boot() {
|
||||||
|
|
||||||
await bootup();
|
await bootup();
|
||||||
|
|
||||||
|
lume.setIsLoggedIn(true);
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
ethClient.ready(),
|
ethClient.ready(),
|
||||||
handshakeClient.ready(),
|
handshakeClient.ready(),
|
||||||
|
|
Loading…
Reference in New Issue