Handle invalid bunker url, update synced stores

This commit is contained in:
Jon Staab
2025-07-15 11:06:47 -07:00
parent e2a0672ca5
commit 6f6bb508db
6 changed files with 61 additions and 19 deletions
+11 -2
View File
@@ -30,6 +30,7 @@ import {
deriveEventsMapped,
withGetter,
synced,
localStorageProvider,
} from "@welshman/store"
import {
getIdFilters,
@@ -302,7 +303,11 @@ routerContext.getIndexerRelays = always(INDEXER_RELAYS)
// Settings
export const canDecrypt = synced("canDecrypt", false)
export const canDecrypt = synced({
key: "canDecrypt",
defaultValue: false,
storage: localStorageProvider,
})
export const SETTINGS = 38489
@@ -376,7 +381,11 @@ export type Wallet =
info: NWCInfo
}
export const wallet = synced<Wallet | undefined>("wallet", undefined)
export const wallet = synced<Wallet | undefined>({
key: "wallet",
defaultValue: undefined,
storage: localStorageProvider,
})
export const getWebLn = () => (window as any).webln