From cc06fb6e79f9518b14158dde854967c820e13e0c Mon Sep 17 00:00:00 2001 From: Evgeny Svirsky Date: Thu, 28 Nov 2024 12:51:06 +0100 Subject: [PATCH] - Added skip for the empty pool info --- src/token-watcher/token-watcher.service.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/token-watcher/token-watcher.service.ts b/src/token-watcher/token-watcher.service.ts index 9c712cc..c47c9c5 100644 --- a/src/token-watcher/token-watcher.service.ts +++ b/src/token-watcher/token-watcher.service.ts @@ -37,10 +37,10 @@ export class TokenWatcherService { this.locked = true; } - try { - const mints = await this.tickerService.getUniqueTickers(); + const mints = await this.tickerService.getUniqueTickers(); - for (const mint of mints) { + for (const mint of mints) { + try { const recentTickers = await this.tickerService.getTickersByMint( mint, 2, @@ -77,10 +77,12 @@ export class TokenWatcherService { this.logger.log(`Created a position for ${first.raydiumPool}`); } + } catch (e) { + Sentry.captureException(e); + this.logger.error( + `Something went wrong with the mint: ${mint}. Skipping it. Error: ${e.message}`, + ); } - } catch (e) { - Sentry.captureException(e); - this.logger.error(`Something went wrong. Error: ${e.message}`); } this.locked = false;