wiz
This commit is contained in:
parent
e3e0baed24
commit
c60b5103bf
1 changed files with 13 additions and 11 deletions
|
|
@ -164,8 +164,7 @@ export class Wizard {
|
||||||
if (err != null) { throw new Error(err.message) }
|
if (err != null) { throw new Error(err.message) }
|
||||||
const pendingConfig = { sourceName: req.source_name, relayUrl: req.relay_url, automateLiquidity: req.automate_liquidity, pushBackupsToNostr: req.push_backups_to_nostr }
|
const pendingConfig = { sourceName: req.source_name, relayUrl: req.relay_url, automateLiquidity: req.automate_liquidity, pushBackupsToNostr: req.push_backups_to_nostr }
|
||||||
|
|
||||||
// If already initialized, treat as idempotent update: persist name/avatar and env settings, do not block.
|
// Persist app name/avatar to DB regardless (idempotent behavior)
|
||||||
if (this.IsInitialized()) {
|
|
||||||
try {
|
try {
|
||||||
const appsList = await this.storage.applicationStorage.GetApplications()
|
const appsList = await this.storage.applicationStorage.GetApplications()
|
||||||
const defaultNames = ['wallet', 'wallet-test', this.settings.defaultAppName]
|
const defaultNames = ['wallet', 'wallet-test', this.settings.defaultAppName]
|
||||||
|
|
@ -176,6 +175,9 @@ export class Wizard {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.log(`Error updating app info: ${(e as Error).message}`)
|
this.log(`Error updating app info: ${(e as Error).message}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If already initialized, treat as idempotent update for env and exit
|
||||||
|
if (this.IsInitialized()) {
|
||||||
this.updateEnvFile(pendingConfig)
|
this.updateEnvFile(pendingConfig)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue