From e0f91ace41bc2077761bd6708e46ea344ef023ac Mon Sep 17 00:00:00 2001 From: keyan Date: Mon, 8 Jul 2024 16:10:19 -0500 Subject: [PATCH] prevent lnc-web's wasm loading side effects from breaking everything --- components/webln/lnc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/webln/lnc.js b/components/webln/lnc.js index 6d21415a..58aac5ab 100644 --- a/components/webln/lnc.js +++ b/components/webln/lnc.js @@ -1,6 +1,5 @@ import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react' import { useWalletLogger } from '../logger' -import LNC from '@lightninglabs/lnc-web' import { Status, migrateLocalStorage } from '.' import { bolt11Tags } from '@/lib/bolt11' import useModal from '../modal' @@ -16,6 +15,7 @@ const mutex = new Mutex() async function getLNC ({ me }) { if (window.lnc) return window.lnc + const { default: LNC } = await import('@lightninglabs/lnc-web') // backwards compatibility: migrate to new storage key if (me) migrateLocalStorage('lnc-web:default', `lnc-web:stacker:${me.id}`) window.lnc = new LNC({ namespace: me?.id ? `stacker:${me.id}` : undefined })