From ecbc9b61c069d124148e0581a15fc481e86ada85 Mon Sep 17 00:00:00 2001 From: moreal Date: Mon, 20 May 2024 16:16:34 +0900 Subject: [PATCH] Remove tickerWhitelist check --- src/job/job.service.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/job/job.service.ts b/src/job/job.service.ts index 8950666..d6b15a4 100644 --- a/src/job/job.service.ts +++ b/src/job/job.service.ts @@ -72,13 +72,6 @@ export class JobService { } async createJobsByEvent(dto: CreateClaimItemsEventDto) { - const targetTickers = [...new Set(dto.items.map((item) => item.ticker))]; - const whitelist = await this.prismaService.tickerWhitelist.findMany({ - where: { ticker: { in: targetTickers } }, - }); - if (whitelist.length !== targetTickers.length) - throw new BadRequestException('Ticker not whitelisted'); - return await this.prismaService.$transaction(async (tx) => { const isExisting = await tx.job.findFirst({ where: { eventId: dto.eventId }, @@ -99,11 +92,6 @@ export class JobService { } async createClaimItems(dto: CreateClaimItemsDto) { - const whitelist = await this.prismaService.tickerWhitelist.findUnique({ - where: { ticker: dto.item.ticker }, - }); - if (!whitelist) throw new BadRequestException('Ticker not whitelisted'); - return await this.prismaService.$transaction(async (tx) => { const isExisting = await tx.job.findUnique({ where: { id: dto.id }, @@ -129,11 +117,6 @@ export class JobService { } async createTransferAssets(dto: CreateTransferAssetsDto) { - const whitelist = await this.prismaService.tickerWhitelist.findUnique({ - where: { ticker: dto.item.ticker }, - }); - if (!whitelist) throw new BadRequestException('Ticker not whitelisted'); - return await this.prismaService.$transaction(async (tx) => { const isExisting = await tx.job.findUnique({ where: { id: dto.id },