@@ -33,10 +33,7 @@ export const createAPIHandler = async (config, retries = 0) => {
33
33
try {
34
34
logger . info ( "Creating API Handler" , winstonLabel ) ;
35
35
// Determine the correct set of endpoints based on the network prefix.
36
- const endpoints =
37
- config . global . networkPrefix === 2 || config . global . networkPrefix === 0
38
- ? config . global . apiEndpoints
39
- : Constants . LocalEndpoints ;
36
+ const endpoints = config . global . apiEndpoints ;
40
37
41
38
const handler = new ApiHandler ( endpoints ) ;
42
39
await handler . setAPI ( ) ;
@@ -183,7 +180,7 @@ export const addCleanCandidates = async (config: Config.ConfigSchema) => {
183
180
// Remove any candidate in the db that doesn't have a stash or slotId
184
181
await queries . deleteCandidatesWithMissingFields ( ) ;
185
182
} catch ( e ) {
186
- logger . error ( JSON . stringify ( e ) ) ;
183
+ logger . error ( "AddCandidates error: " , JSON . stringify ( e ) ) ;
187
184
process . exit ( 1 ) ;
188
185
}
189
186
} ;
@@ -193,7 +190,7 @@ export const setChainMetadata = async (config) => {
193
190
logger . info ( `Setting chain metadata` , winstonLabel ) ;
194
191
await queries . setChainMetadata ( config . global . networkPrefix ) ;
195
192
} catch ( e ) {
196
- logger . error ( JSON . stringify ( e ) ) ;
193
+ logger . error ( "Metadata error: " , JSON . stringify ( e ) ) ;
197
194
process . exit ( 1 ) ;
198
195
}
199
196
} ;
@@ -208,7 +205,7 @@ export const initScorekeeper = async (config, handler, maybeBot) => {
208
205
}
209
206
return scorekeeper ;
210
207
} catch ( e ) {
211
- logger . error ( JSON . stringify ( e ) ) ;
208
+ logger . error ( "Scorekeeper error: " , e ) ;
212
209
process . exit ( 1 ) ;
213
210
}
214
211
} ;
0 commit comments