fix(machine): don't inject a localhost relay default in get-config
The Electron main's get-config returned relayUrl = VITE_RELAY_URL ||
'ws://localhost:7777'. On an unprovisioned (blank-.env) machine that non-empty
localhost default reached the renderer and, via the env-first precedence, won
over the pairing seed's relay — then failed strict validation as localhost.
That defeated #70's "the seed provides the relay": the Sintra paired fine but
booted with ws://localhost:7777 instead of the seed's nostrclient endpoint.
Return '' when unset so the renderer falls through to the seed's transport
relay (its own ws://localhost:7777 dev fallback only applies when neither env
nor pairing supplies one). Mirror of the renderer default fixed in e578680.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
0bc57dc754
commit
eaa7cbe33c
1 changed files with 5 additions and 2 deletions
|
|
@ -278,8 +278,11 @@ ipcMain.handle('watchdog:pong', () => {
|
||||||
// pragma: allowlist secret end
|
// pragma: allowlist secret end
|
||||||
ipcMain.handle('get-config', () => {
|
ipcMain.handle('get-config', () => {
|
||||||
return {
|
return {
|
||||||
// LNbits nostr-transport connection (public info only)
|
// LNbits nostr-transport connection (public info only). Empty when
|
||||||
relayUrl: process.env.VITE_RELAY_URL || 'ws://localhost:7777',
|
// unprovisioned — the renderer then falls through to the pairing seed's
|
||||||
|
// relay (aiolabs/bitspire#70). A non-empty default here would win via the
|
||||||
|
// env-first precedence and override the seed.
|
||||||
|
relayUrl: process.env.VITE_RELAY_URL || '',
|
||||||
lnbitsServerPubkey: process.env.VITE_LNBITS_SERVER_PUBKEY || '',
|
lnbitsServerPubkey: process.env.VITE_LNBITS_SERVER_PUBKEY || '',
|
||||||
appId: process.env.VITE_APP_ID || '',
|
appId: process.env.VITE_APP_ID || '',
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue