From 21d04b1dd5f6d0db1f200bf0a894bbaf4ec1cdc2 Mon Sep 17 00:00:00 2001 From: amateima <89395931+amateima@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:44:27 +0200 Subject: [PATCH] fix: replace save with update (#338) Co-authored-by: amateima --- .../adapter/messaging/DepositFilledDateConsumer.ts | 9 ++++++++- .../scraper/adapter/messaging/FeeBreakdownConsumer.ts | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/scraper/adapter/messaging/DepositFilledDateConsumer.ts b/src/modules/scraper/adapter/messaging/DepositFilledDateConsumer.ts index 2f2ef1d2..9963e1eb 100644 --- a/src/modules/scraper/adapter/messaging/DepositFilledDateConsumer.ts +++ b/src/modules/scraper/adapter/messaging/DepositFilledDateConsumer.ts @@ -51,7 +51,14 @@ export class DepositFilledDateConsumer { } deposit.filledDate = filledDate; - await this.depositRepository.save(deposit); + + await this.depositRepository.update( + { id: deposit.id }, + { + filledDate: deposit.filledDate, + fillTxs: deposit.fillTxs, + }, + ); this.scraperQueuesService.publishMessage(ScraperQueue.TrackFillEvent, { depositId: deposit.id, diff --git a/src/modules/scraper/adapter/messaging/FeeBreakdownConsumer.ts b/src/modules/scraper/adapter/messaging/FeeBreakdownConsumer.ts index 5ff80f1d..30019927 100644 --- a/src/modules/scraper/adapter/messaging/FeeBreakdownConsumer.ts +++ b/src/modules/scraper/adapter/messaging/FeeBreakdownConsumer.ts @@ -57,8 +57,7 @@ export class FeeBreakdownConsumer { deposit.token.decimals, deposit.destinationChainId, ); - deposit.feeBreakdown = feeBreakdown; - await this.depositRepository.save(deposit); + await this.depositRepository.update({ id: deposit.id }, { feeBreakdown }); this.scraperQueuesService.publishMessage(ScraperQueue.OpRebateReward, { depositPrimaryKey: deposit.id,