Replace lightning toolkit with wallet adapter

This commit is contained in:
2026-02-17 19:54:16 +00:00
parent 6e865fef06
commit ce62cafd59
33 changed files with 1364 additions and 120 deletions
+9 -3
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import {debounce} from "throttle-debounce"
import {nwc} from "@getalby/sdk"
import {nwc} from "@lib/lightning"
import {sleep, assoc} from "@welshman/lib"
import type {NWCInfo} from "@welshman/util"
import {pubkey, userProfile, updateSession} from "@welshman/app"
@@ -33,8 +33,14 @@
loading = true
try {
await Promise.all([sleep(800), getWebLn().enable()])
const info = await getWebLn().getInfo()
const webLn = getWebLn()
if (!webLn) {
throw new Error("WebLN not available")
}
await Promise.all([sleep(800), webLn.enable()])
const info = (await webLn.getInfo?.()) || {}
if (!info?.supports?.includes("lightning")) {
pushToast({
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import {Invoice} from "@getalby/lightning-tools/bolt11"
import {Invoice} from "@lib/lightning/bolt11"
import {debounce} from "throttle-debounce"
import {session} from "@welshman/app"
import Bolt from "@assets/icons/bolt.svg?dataurl"
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import {Invoice} from "@getalby/lightning-tools/bolt11"
import {Invoice} from "@lib/lightning/bolt11"
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
import Bolt from "@assets/icons/bolt.svg?dataurl"
import Refresh from "@assets/icons/refresh.svg?dataurl"