From e0452e7aec2d876545447d2995259e44128b8539 Mon Sep 17 00:00:00 2001 From: officer Date: Wed, 19 Aug 2026 05:30:23 +0000 Subject: [PATCH] fix Save & connect staying disabled in chain source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hooks build `/${service}/_config`, so their argument is the MOUNT name. It still said 'wallet' after the plugin was renamed to bitcoin-wallet, so every request 404'd. The symptom was not an error. `data` stayed undefined, the seeding effect returns early on !data, and `url` never left '' — so `!trimmed` disabled the button and the "http://127.0.0.1:32838" visible in the field was the placeholder, not a value. The `(—)` in the hint was the same missing data. Credential rows are keyed on the PROTOCOL ('esplora' / 'nbxplorer') by the sidecar's config.ts, so nothing already saved is affected by the rename. --- web/ChainSourceCard.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/web/ChainSourceCard.tsx b/web/ChainSourceCard.tsx index ac711f9..71d0c2f 100644 --- a/web/ChainSourceCard.tsx +++ b/web/ChainSourceCard.tsx @@ -49,8 +49,18 @@ const KINDS: Record = { }; export const ChainSourceCard = () => { - const { data, isLoading } = useServiceConnection('wallet'); - const { save, forget } = useServiceConnectionActions<{ url: string; kind: ChainKind }, SaveResult>('wallet'); + // 'bitcoin-wallet' is the MOUNT name, not a credential key: these hooks build `/${service}/_config`, + // so this must match where the plugin is mounted. It said 'wallet' until the plugin was renamed on + // 2026-08-19, after which every request here 404'd — and the symptom was not an error but a DISABLED + // Save button, because `data` stayed undefined, the seeding effect returned early, and `url` never + // left ''. The URL visible in the field was the placeholder. + // + // The credential rows are keyed on the PROTOCOL ('esplora' / 'nbxplorer'), written by the sidecar's + // config.ts — those are untouched by any rename here. + const { data, isLoading } = useServiceConnection('bitcoin-wallet'); + const { save, forget } = useServiceConnectionActions<{ url: string; kind: ChainKind }, SaveResult>( + 'bitcoin-wallet', + ); const [url, setUrl] = useState(''); const [kind, setKind] = useState('esplora');