Update wallet to use welshman's session wallet

This commit is contained in:
Jon Staab
2025-08-18 13:26:28 -07:00
parent 2a30ca5306
commit 38e0fc53ad
6 changed files with 34 additions and 63 deletions
-37
View File
@@ -355,43 +355,6 @@ export const {
load: makeOutboxLoader(SETTINGS),
})
// Wallets
export type WebLNInfo = {
methods?: string[]
supports?: string[]
version?: string
node?: {
alias: string
}
}
export type NWCInfo = {
lud16: string
secret: string
relayUrl: string
walletPubkey: string
nostrWalletConnectUrl: string
}
export type Wallet =
| {
type: "webln"
info: WebLNInfo
}
| {
type: "nwc"
info: NWCInfo
}
export const wallet = synced<Wallet | undefined>({
key: "wallet",
defaultValue: undefined,
storage: localStorageProvider,
})
export const getWebLn = () => (window as any).webln
// Alerts
export type Alert = {