From d812b1cc5f6bf2992c09abd564dea3c3e3368a5d Mon Sep 17 00:00:00 2001 From: fatemeh imanipour Date: Sat, 9 May 2026 16:17:00 +0330 Subject: [PATCH 1/2] Add interceptors dependency to all related modules --- accountant/accountant-app/pom.xml | 4 ++++ accountant/pom.xml | 5 +++++ auth-gateway/auth-gateway-app/pom.xml | 4 ++++ bc-gateway/bc-gateway-app/pom.xml | 8 ++++++++ device-management/device-management-app/pom.xml | 4 ++++ device-management/pom.xml | 5 +++++ docker-compose.yml | 4 ++-- matching-gateway/matching-gateway-app/pom.xml | 4 ++++ otp/otp-app/pom.xml | 4 ++++ profile/pom.xml | 5 +++++ profile/profile-app/pom.xml | 4 ++++ user-management/pom.xml | 5 +++++ 12 files changed, 54 insertions(+), 2 deletions(-) diff --git a/accountant/accountant-app/pom.xml b/accountant/accountant-app/pom.xml index 67649ff75..f56aee06a 100644 --- a/accountant/accountant-app/pom.xml +++ b/accountant/accountant-app/pom.xml @@ -51,6 +51,10 @@ co.nilin.opex.utility error-handler + + co.nilin.opex.utility + interceptors + org.springframework.cloud spring-cloud-starter-vault-config diff --git a/accountant/pom.xml b/accountant/pom.xml index 6eded39f6..edce57a88 100644 --- a/accountant/pom.xml +++ b/accountant/pom.xml @@ -82,6 +82,11 @@ error-handler ${error-hanlder.version} + + co.nilin.opex.utility + interceptors + ${interceptor.version} + org.springframework.cloud spring-cloud-dependencies diff --git a/auth-gateway/auth-gateway-app/pom.xml b/auth-gateway/auth-gateway-app/pom.xml index 0d31ffddd..0ff3a5ade 100644 --- a/auth-gateway/auth-gateway-app/pom.xml +++ b/auth-gateway/auth-gateway-app/pom.xml @@ -80,6 +80,10 @@ co.nilin.opex.utility error-handler + + co.nilin.opex.utility + interceptors + com.auth0 java-jwt diff --git a/bc-gateway/bc-gateway-app/pom.xml b/bc-gateway/bc-gateway-app/pom.xml index 2bdccb667..0046a178b 100644 --- a/bc-gateway/bc-gateway-app/pom.xml +++ b/bc-gateway/bc-gateway-app/pom.xml @@ -138,6 +138,14 @@ micrometer-registry-prometheus runtime + + co.nilin.opex.utility + interceptors + + + co.nilin.opex.utility + error-handler + diff --git a/device-management/device-management-app/pom.xml b/device-management/device-management-app/pom.xml index 82e41ff4e..ff9b70048 100644 --- a/device-management/device-management-app/pom.xml +++ b/device-management/device-management-app/pom.xml @@ -78,6 +78,10 @@ co.nilin.opex.utility error-handler + + co.nilin.opex.utility + interceptors + com.zaxxer HikariCP diff --git a/device-management/pom.xml b/device-management/pom.xml index d24596637..4800bfa7c 100644 --- a/device-management/pom.xml +++ b/device-management/pom.xml @@ -56,6 +56,11 @@ error-handler ${error-hanlder.version} + + co.nilin.opex.utility + interceptors + ${interceptor.version} + co.nilin.opex.device-management device-management-core diff --git a/docker-compose.yml b/docker-compose.yml index 63535e6e2..b9078536e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -546,8 +546,8 @@ services: - SMTP_USER=${SMTP_USER} - SMTP_PASS=${SMTP_PASS} - SMTP_FROM=${SMTP_FROM} - - SMTP_SOCKS_HOST=${SMTP_SOCKS_HOST} - - SMTP_SOCKS_PORT=${SMTP_SOCKS_PORT} + - SMTP_PROXY_HOST=${SMTP_PROXY_HOST} + - SMTP_PROXY_PORT=${SMTP_PROXY_PORT} - SMTP_PROXY_ENABLED=${SMTP_PROXY_ENABLED} - TOKEN_ISSUER_URL=${KC_ISSUER_URL} - OTP_CODE_RESPONSE_ENABLED=${OTP_CODE_RESPONSE_ENABLED} diff --git a/matching-gateway/matching-gateway-app/pom.xml b/matching-gateway/matching-gateway-app/pom.xml index 24e94ab58..86d029320 100644 --- a/matching-gateway/matching-gateway-app/pom.xml +++ b/matching-gateway/matching-gateway-app/pom.xml @@ -77,6 +77,10 @@ co.nilin.opex.utility error-handler + + co.nilin.opex.utility + interceptors + io.mockk mockk diff --git a/otp/otp-app/pom.xml b/otp/otp-app/pom.xml index 1d3d72124..49cb4f0c0 100644 --- a/otp/otp-app/pom.xml +++ b/otp/otp-app/pom.xml @@ -87,6 +87,10 @@ co.nilin.opex.utility error-handler + + co.nilin.opex.utility + interceptors + io.mockk mockk diff --git a/profile/pom.xml b/profile/pom.xml index 7ac615097..ffd3ab564 100644 --- a/profile/pom.xml +++ b/profile/pom.xml @@ -66,6 +66,11 @@ logging-handler ${logging-handler.version} + + co.nilin.opex.utility + error-handler + ${error-hanlder.version} + co.nilin.opex.utility interceptors diff --git a/profile/profile-app/pom.xml b/profile/profile-app/pom.xml index 685459a22..2b2412044 100644 --- a/profile/profile-app/pom.xml +++ b/profile/profile-app/pom.xml @@ -98,6 +98,10 @@ org.springframework.cloud spring-cloud-starter-vault-config + + co.nilin.opex.utility + error-handler + co.nilin.opex.utility interceptors diff --git a/user-management/pom.xml b/user-management/pom.xml index 0c0b0c5a4..fbb1146c0 100644 --- a/user-management/pom.xml +++ b/user-management/pom.xml @@ -49,6 +49,11 @@ error-handler ${error-hanlder.version} + + co.nilin.opex.utility + interceptors + ${interceptor.version} + co.nilin.opex.auth user-management-core From 70d5c780a14203a5b8fc5490f40646ea3d3ab764 Mon Sep 17 00:00:00 2001 From: Amir Rajabi Date: Sat, 16 May 2026 14:42:32 +0330 Subject: [PATCH 2/2] Update WithdrawRepository.kt --- .../ports/postgres/dao/WithdrawRepository.kt | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/wallet/wallet-ports/wallet-persister-postgres/src/main/kotlin/co/nilin/opex/wallet/ports/postgres/dao/WithdrawRepository.kt b/wallet/wallet-ports/wallet-persister-postgres/src/main/kotlin/co/nilin/opex/wallet/ports/postgres/dao/WithdrawRepository.kt index 3541bc63e..74e902e13 100644 --- a/wallet/wallet-ports/wallet-persister-postgres/src/main/kotlin/co/nilin/opex/wallet/ports/postgres/dao/WithdrawRepository.kt +++ b/wallet/wallet-ports/wallet-persister-postgres/src/main/kotlin/co/nilin/opex/wallet/ports/postgres/dao/WithdrawRepository.kt @@ -24,7 +24,7 @@ interface WithdrawRepository : ReactiveCrudRepository { wth.uuid as uuid, split_part(wo.title, '|', 2) as owner_name, wth.amount as amount, - wm.currency as currency, + wth.currency as currency, wth.applied_fee as applied_fee, wth.dest_amount as dest_amount, wth.dest_symbol as dest_symbol, @@ -42,13 +42,12 @@ interface WithdrawRepository : ReactiveCrudRepository { wth.transfer_method as transfer_method, wth.otp_required as otp_required from withdraws wth - join wallet wm on wm.id = wth.wallet - join wallet_owner wo on wm.owner = wo.id + join wallet_owner wo on wth.uuid = wo.uuid where (:owner is null or wo.uuid = :owner) and (:destTxRef is null or wth.dest_transaction_ref = :destTxRef) and (:withdrawUuid is null or wth.withdraw_uuid = :withdrawUuid) and (:destAddress is null or wth.dest_address = :destAddress) - and (:currency is null or wm.currency in (:currency)) + and (:currency is null or wth.currency in (:currency)) and (:startTime is null or wth.create_date > :startTime) and (:endTime is null or wth.create_date <= :endTime) order by @@ -78,7 +77,7 @@ interface WithdrawRepository : ReactiveCrudRepository { wth.uuid as uuid, split_part(wo.title, '|', 2) as owner_name, wth.amount as amount, - wm.currency as currency, + wth.currency as currency, wth.applied_fee as applied_fee, wth.dest_amount as dest_amount, wth.dest_symbol as dest_symbol, @@ -96,13 +95,12 @@ interface WithdrawRepository : ReactiveCrudRepository { wth.transfer_method as transfer_method, wth.otp_required as otp_required from withdraws wth - join wallet wm on wm.id = wth.wallet - join wallet_owner wo on wm.owner = wo.id + join wallet_owner wo on wth.uuid = wo.uuid where (:owner is null or wo.uuid = :owner) and (:destTxRef is null or wth.dest_transaction_ref = :destTxRef) and (:withdrawUuid is null or wth.withdraw_uuid = :withdrawUuid) and (:destAddress is null or wth.dest_address = :destAddress) - and (:currency is null or wm.currency in (:currency)) + and (:currency is null or wth.currency in (:currency)) and wth.status in (:status) and (:startTime is null or wth.create_date > :startTime) and (:endTime is null or wth.create_date <= :endTime) @@ -129,12 +127,10 @@ interface WithdrawRepository : ReactiveCrudRepository { @Query( """ select count(*) from withdraws wth - join wallet wm on wm.id = wth.wallet - join wallet_owner wo on wm.owner = wo.id - where ( :owner is null or wo.uuid = :owner) + where ( :owner is null or wth.uuid = :owner) and (:destTxRef is null or wth.dest_transaction_ref = :destTxRef) and (:destAddress is null or wth.dest_address = :destAddress) - and (:currency is null or wm.currency in (:currency)) + and (:currency is null or wth.currency in (:currency)) """ ) fun countByCriteria( @@ -147,12 +143,10 @@ interface WithdrawRepository : ReactiveCrudRepository { @Query( """ select count(*) from withdraws wth - join wallet wm on wm.id = wth.wallet - join wallet_owner wo on wm.owner = wo.id - where ( :owner is null or wo.uuid = :owner) + where ( :owner is null or wth.uuid = :owner) and (:destTxRef is null or wth.dest_transaction_ref = :destTxRef) and (:destAddress is null or wth.dest_address = :destAddress) - and (:currency is null or wm.currency in (:currency)) + and (:currency is null or wth.currency in (:currency)) and wth.status in (:status) """ )