Skip to content

Commit

Permalink
Merge pull request #68 from planetarium/remove-whitetickerlist-check
Browse files Browse the repository at this point in the history
Remove tickerWhitelist check
  • Loading branch information
moreal authored May 21, 2024
2 parents 1f93812 + ecbc9b6 commit 2998066
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/job/job.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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 },
Expand All @@ -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 },
Expand Down

0 comments on commit 2998066

Please sign in to comment.