Skip to content

Commit

Permalink
Merge pull request #21 from dappforce/staging
Browse files Browse the repository at this point in the history
fix: added additional logs
  • Loading branch information
mckrava authored Sep 18, 2023
2 parents 1561420 + 621e9dc commit a11d7aa
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/providers/api.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ export const ApiProviders: Provider[] = [
});
// const substrateApi = await api.substrateApi;
logger.info('Api created');
const substrateApi = await api.substrateApi;

substrateApi.on('error', (e) =>
logger.info('Subsocial SubstateApi ERROR - ', e)
);
substrateApi.on('connected', () =>
logger.info('Subsocial SubstateApi connected')
);
substrateApi.on('disconnected', () =>
logger.info('Subsocial SubstateApi disconnected')
);
substrateApi.on('ready', () =>
logger.info('Subsocial SubstateApi ready')
);

return api;
},
inject: [xSocialConfig]
Expand All @@ -29,7 +44,7 @@ export const ApiProviders: Provider[] = [
url: `${env.DATA_PROVIDER_SQUID_WS_URL}`,
retryAttempts: Infinity,
shouldRetry: () => true,
keepAlive: 10000,
keepAlive: 10000
});
client.on('error', (e) => logger.info('WS Api ERROR - ', e));
client.on('connecting', () => logger.info('WS Api connecting'));
Expand Down

0 comments on commit a11d7aa

Please sign in to comment.