Skip to content

Add LND wallet support to admin UI#235

Open
nothing-stops-this-train wants to merge 3 commits into
bitcart:masterfrom
BareBits:lnd-integration
Open

Add LND wallet support to admin UI#235
nothing-stops-this-train wants to merge 3 commits into
bitcart:masterfrom
BareBits:lnd-integration

Conversation

@nothing-stops-this-train
Copy link
Copy Markdown

A part of this PR bitcart/bitcart#595

Adds UI for managing LND-backed wallets alongside Electrum-backed ones.
The wallet list grows Tor and zero-conf toggles, a node-status icon, an
LND warning alert, and a lightning_balance column. The lightning page
adds a network chip, an announced/unannounced toggle (LND only),
channel fee and routing stats columns, button loading spinners, and
explicit error display via getErrorMessage. A new status page surfaces
LND-specific fields. EditCard gains a creating spinner; ItemData
honours an optional show(item) predicate so LND-only actions hide on
Electrum wallets and vice versa. Settings persistence in postprocess
walks $refs.editcard.$refs.editcard and falls back to a mounted-time
schema cache, and only injects tor_enabled/zero_conf into
additional_xpub_data when the coin schema declares the matching
support flag.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 5, 2026

CLA assistant check
All committers have signed the CLA.

Nuxt's getLocation helper (in .nuxt/utils.js) does
`base.slice(0, -1)` on the configured base, with a comment
explicitly noting "consideration is base is normalized with trailing
slash". When BITCART_ADMIN_ROOTPATH is set to "/admin" (no trailing
slash — the form deploy.sh pins, and the form Nuxt accepts
everywhere else), that slice corrupts the base to "/admi". The
initial path strip then misfires: window.location.pathname
"/admin/<route>" startsWith("/admi") matches, but slicing by 5
produces "n/<route>" — a non-route. router.resolve returns
matched=0, Nuxt's navigation logic sets a 404 on the page, and
the err state is sticky for nested URLs.

Single-segment URLs (`/admin/`, `/admin/stores`) happen to recover
because the corrupted-then-resolved path "/" still matches Nuxt's
auto-generated home route, which clears the err state on the
subsequent Vue Router navigation. But multi-segment URLs like
`/admin/plugins/<plugin>` resolve to paths that match no route at
all, so the err is never cleared — the user sees a "404 Not Found"
page on every reload, even though the actual route is correctly
registered and the page renders fine server-side.

This was reproducible 100% of the time on `/admin/plugins/liquidityhelper`
with a headless-Chromium test against an `/admin`-rooted deploy.
After this patch, fresh URL-bar navigation lands on the right page
without a 404 flash.

We normalize at the router-construction point (not the env-var
parser or the publicRuntimeConfig binding) so that any other code
reading config.ROOTPATH continues to see the unmodified value —
which keeps URL-construction code like `\${config.ROOTPATH}/api/...`
from producing accidental "/admin//api/..." double slashes.
router: normalize base to always end with trailing slash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants