fix: fetching telemetry URL when DB is nil

This commit is contained in:
Richard Ramos 2023-02-23 16:30:13 -04:00 committed by RichΛrd
parent 665bc8452c
commit 002cb10847
1 changed files with 6 additions and 3 deletions

View File

@ -107,9 +107,12 @@ func (b *StatusNode) initServices(config *params.NodeConfig, mediaServer *server
}
if config.WakuV2Config.Enabled {
telemetryServerURL, err := accDB.GetTelemetryServerURL()
if err != nil {
return err
telemetryServerURL := ""
if accDB.DB() != nil {
telemetryServerURL, err = accDB.GetTelemetryServerURL()
if err != nil {
return err
}
}
waku2Service, err := b.wakuV2Service(config, telemetryServerURL)