Add LND wallet support to admin UI#235
Open
nothing-stops-this-train wants to merge 3 commits into
Open
Conversation
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>
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A part of this PR bitcart/bitcart#595