From a4f848fc6d503ade5f3b463958023499eb3fbb36 Mon Sep 17 00:00:00 2001 From: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> Date: Tue, 28 Jul 2026 20:44:44 +0000 Subject: [PATCH] Show NWC manager in Wallet Connections modal Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- app/sovran_systemsos_web/static/js/helpers.js | 4 +++ .../static/js/service-detail.js | 27 ++++++++++++++----- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/app/sovran_systemsos_web/static/js/helpers.js b/app/sovran_systemsos_web/static/js/helpers.js index 120a1e1..bfeb702 100644 --- a/app/sovran_systemsos_web/static/js/helpers.js +++ b/app/sovran_systemsos_web/static/js/helpers.js @@ -63,6 +63,10 @@ async function apiFetch(path, options) { } else if (body.detail && typeof body.detail.message === "string") { detail = body.detail.message; } + } else if (body && typeof body.message === "string") { + detail = body.message; + } else if (body && typeof body.error === "string") { + detail = body.error; } } catch (e) {} throw new Error(detail); diff --git a/app/sovran_systemsos_web/static/js/service-detail.js b/app/sovran_systemsos_web/static/js/service-detail.js index 5022a6a..7ff9b91 100644 --- a/app/sovran_systemsos_web/static/js/service-detail.js +++ b/app/sovran_systemsos_web/static/js/service-detail.js @@ -60,6 +60,13 @@ function _attachCopyHandlers(container) { var _nwcModalState = null; +function _isNwcServiceUnit(unit) { + // The dashboard tile is backed by Alby Hub, while older drafts referred to + // the logical feature as nwc-wallets.service. Support both so the Wallet + // Connections manager appears from the actual tile and any legacy configs. + return unit === "albyhub.service" || unit === "nwc-wallets.service"; +} + function _nwcStateMessageHtml() { if (!_nwcModalState || !_nwcModalState.message) return ""; var msgClass = _nwcModalState.messageKind === "success" ? "success" : "error"; @@ -171,14 +178,15 @@ function _nwcRenderWalletState() { return; } + var canCreate = !!state.domain && !state.busy; html += '
Lightning Address domain: ' + escHtml(state.domain) + '
'; } else { - html += 'Lightning Address domain is not configured yet. Configure your domain first, then create wallet connections.
'; + html += 'Loading wallet connections…
Create, verify, drain, and delete isolated NWC wallet connections without leaving the Hub.
' + + 'Loading wallet connections…
Wallet Connections is disabled. Enable this feature below, rebuild, then return here to create and manage NWC wallet connections.
'; + } + html += ''; } else if (data.has_credentials && data.credentials && data.credentials.length > 0) { html += '