From 831e9cff3cea805a0d7fc6124e9f2767ba4bb734 Mon Sep 17 00:00:00 2001 From: Bernd Date: Fri, 20 Mar 2026 12:05:40 +0100 Subject: [PATCH 1/3] feat: improve custody order list entry DTO - Rename userId to userDataId for clarity - Return updated timestamp instead of created - Use TransactionRequest amount as fallback for input/output amounts --- .../dto/output/custody-order-list-entry.dto.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/subdomains/core/custody/dto/output/custody-order-list-entry.dto.ts b/src/subdomains/core/custody/dto/output/custody-order-list-entry.dto.ts index 37f563538d..369f13c9e0 100644 --- a/src/subdomains/core/custody/dto/output/custody-order-list-entry.dto.ts +++ b/src/subdomains/core/custody/dto/output/custody-order-list-entry.dto.ts @@ -9,22 +9,24 @@ export class CustodyOrderListEntry { inputAsset?: string; outputAmount?: number; outputAsset?: string; - userId?: number; + userDataId?: number; userName?: string; - created: Date; + updated: Date; static fromEntity(order: CustodyOrder): CustodyOrderListEntry { + const tr = order.transactionRequest; + return { id: order.id, type: order.type, status: order.status, - inputAmount: order.inputAmount, + inputAmount: order.inputAmount ?? tr?.amount, inputAsset: order.inputAsset?.name, - outputAmount: order.outputAmount, + outputAmount: order.outputAmount ?? tr?.estimatedAmount, outputAsset: order.outputAsset?.name, - userId: order.user?.userData?.id, + userDataId: order.user?.userData?.id, userName: order.user?.userData?.verifiedName, - created: order.created, + updated: order.updated, }; } } From e7eb45f836a131564272e326dc9058176a5ddd87 Mon Sep 17 00:00:00 2001 From: Bernd Date: Fri, 20 Mar 2026 16:08:36 +0100 Subject: [PATCH 2/3] fix: set inputAsset on SWAP and SEND custody orders --- src/subdomains/core/custody/services/custody-order.service.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/subdomains/core/custody/services/custody-order.service.ts b/src/subdomains/core/custody/services/custody-order.service.ts index 3978be4d6d..b709940a06 100644 --- a/src/subdomains/core/custody/services/custody-order.service.ts +++ b/src/subdomains/core/custody/services/custody-order.service.ts @@ -123,6 +123,7 @@ export class CustodyOrderService { ); orderDto.swap = await this.swapService.getById(swapPaymentInfo.routeId); + orderDto.inputAsset = targetAsset; orderDto.outputAsset = sourceAsset; orderDto.outputAmount = swapPaymentInfo.amount; paymentInfo = CustodyOrderResponseDtoMapper.mapSwapPaymentInfo(swapPaymentInfo); @@ -152,6 +153,7 @@ export class CustodyOrderService { ); orderDto.swap = await this.swapService.getById(swapPaymentInfo.routeId); + orderDto.inputAsset = targetAsset; orderDto.outputAsset = sourceAsset; orderDto.outputAmount = swapPaymentInfo.amount; paymentInfo = CustodyOrderResponseDtoMapper.mapSwapPaymentInfo(swapPaymentInfo); From cb0cef2452f4dde82479f3e492579edf7fe74407 Mon Sep 17 00:00:00 2001 From: Bernd Date: Fri, 20 Mar 2026 16:17:39 +0100 Subject: [PATCH 3/3] fix: remove input asset on send --- src/subdomains/core/custody/services/custody-order.service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/subdomains/core/custody/services/custody-order.service.ts b/src/subdomains/core/custody/services/custody-order.service.ts index b709940a06..2bd534ccbf 100644 --- a/src/subdomains/core/custody/services/custody-order.service.ts +++ b/src/subdomains/core/custody/services/custody-order.service.ts @@ -153,7 +153,6 @@ export class CustodyOrderService { ); orderDto.swap = await this.swapService.getById(swapPaymentInfo.routeId); - orderDto.inputAsset = targetAsset; orderDto.outputAsset = sourceAsset; orderDto.outputAmount = swapPaymentInfo.amount; paymentInfo = CustodyOrderResponseDtoMapper.mapSwapPaymentInfo(swapPaymentInfo);