fix Save & connect staying disabled in chain source
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.
This commit is contained in:
+12
-2
@@ -49,8 +49,18 @@ const KINDS: Record<ChainKind, KindMeta> = {
|
||||
};
|
||||
|
||||
export const ChainSourceCard = () => {
|
||||
const { data, isLoading } = useServiceConnection<ChainState>('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<ChainState>('bitcoin-wallet');
|
||||
const { save, forget } = useServiceConnectionActions<{ url: string; kind: ChainKind }, SaveResult>(
|
||||
'bitcoin-wallet',
|
||||
);
|
||||
|
||||
const [url, setUrl] = useState('');
|
||||
const [kind, setKind] = useState<ChainKind>('esplora');
|
||||
|
||||
Reference in New Issue
Block a user