From 5ad81838b7d5dc2eb4c52ea3a914182597ecac6b Mon Sep 17 00:00:00 2001 From: David May <85513542+davidleomay@users.noreply.github.com> Date: Fri, 23 Jan 2026 09:19:13 +0100 Subject: [PATCH] fix: custody swap (#3043) * fix: fixed custody swap asset * fix: Yapeal sync date mismatch --- src/subdomains/core/custody/services/custody-order.service.ts | 4 ++-- .../supporting/bank-tx/bank-tx/services/bank-tx.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/subdomains/core/custody/services/custody-order.service.ts b/src/subdomains/core/custody/services/custody-order.service.ts index 8b6c3569c5..a39d52e981 100644 --- a/src/subdomains/core/custody/services/custody-order.service.ts +++ b/src/subdomains/core/custody/services/custody-order.service.ts @@ -118,7 +118,7 @@ export class CustodyOrderService { ); orderDto.swap = await this.swapService.getById(swapPaymentInfo.routeId); - orderDto.outputAsset = targetAsset; + orderDto.outputAsset = sourceAsset; orderDto.outputAmount = swapPaymentInfo.amount; paymentInfo = CustodyOrderResponseDtoMapper.mapSwapPaymentInfo(swapPaymentInfo); break; @@ -147,7 +147,7 @@ export class CustodyOrderService { ); orderDto.swap = await this.swapService.getById(swapPaymentInfo.routeId); - orderDto.outputAsset = targetAsset; + orderDto.outputAsset = sourceAsset; orderDto.outputAmount = swapPaymentInfo.amount; paymentInfo = CustodyOrderResponseDtoMapper.mapSwapPaymentInfo(swapPaymentInfo); break; diff --git a/src/subdomains/supporting/bank-tx/bank-tx/services/bank-tx.service.ts b/src/subdomains/supporting/bank-tx/bank-tx/services/bank-tx.service.ts index 63eca31a53..09b0b720b3 100644 --- a/src/subdomains/supporting/bank-tx/bank-tx/services/bank-tx.service.ts +++ b/src/subdomains/supporting/bank-tx/bank-tx/services/bank-tx.service.ts @@ -140,7 +140,7 @@ export class BankTxService implements OnModuleInit { try { const dates = groupTransactions.map((tx) => (tx.bookingDate ?? tx.created).getTime()); const fromDate = new Date(Math.min(...dates)); - const toDate = new Date(Math.max(...dates)); + const toDate = Util.daysAfter(1, new Date(Math.max(...dates))); const yapealTransactions = await this.yapealService.getTransactions(accountIban, fromDate, toDate);