Skip to content

Commit

Permalink
fix: replace save with update (#338)
Browse files Browse the repository at this point in the history
Co-authored-by: amateima <[email protected]>
  • Loading branch information
amateima and amateima authored Feb 7, 2024
1 parent a8d1b97 commit 21d04b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<TrackFillEventQueueMessage>(ScraperQueue.TrackFillEvent, {
depositId: deposit.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<OpRebateRewardMessage>(ScraperQueue.OpRebateReward, {
depositPrimaryKey: deposit.id,
Expand Down

0 comments on commit 21d04b1

Please sign in to comment.