From 7be1e967d538cac78e4e32f7c189021a1fb837da Mon Sep 17 00:00:00 2001 From: fatemeh-i Date: Thu, 18 Apr 2024 16:35:54 +0430 Subject: [PATCH] fix conflict --- .../wallet/app/service/TransferService.kt | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/wallet/wallet-app/src/main/kotlin/co/nilin/opex/wallet/app/service/TransferService.kt b/wallet/wallet-app/src/main/kotlin/co/nilin/opex/wallet/app/service/TransferService.kt index 14b4c9a43..970283036 100644 --- a/wallet/wallet-app/src/main/kotlin/co/nilin/opex/wallet/app/service/TransferService.kt +++ b/wallet/wallet-app/src/main/kotlin/co/nilin/opex/wallet/app/service/TransferService.kt @@ -226,46 +226,46 @@ class TransferService( ) } - @Transactional - suspend fun depositManually( - symbol: String, - receiverUuid: String, - senderUuid: String, - amount: BigDecimal, - request: ManualTransferRequest - ): TransferResult { - logger.info("deposit manually: $senderUuid to $receiverUuid on $symbol at ${LocalDateTime.now()}") - val systemUuid = "1" - //todo customize error message - val senderLevel = walletOwnerManager.findWalletOwner(senderUuid)?.let { it.level } - ?: throw OpexError.WalletOwnerNotFound.exception() - val receiverLevel = walletOwnerManager.findWalletOwner(receiverUuid)?.let { it.level } - - if (senderLevel !in arrayListOf(preferences.admin.walletLevel, preferences.system.walletLevel)) - throw OpexError.Forbidden.exception() - - if (senderLevel == preferences.system.walletLevel && receiverLevel != preferences.admin.walletLevel) - throw OpexError.Forbidden.exception() - -// if (walletOwnerManager.findWalletOwner(receiverUuid)?.level !in arrayListOf(preferences.admin.walletLevel,preferences.system.walletLevel)) +// @Transactional +// suspend fun depositManually( +// symbol: String, +// receiverUuid: String, +// senderUuid: String, +// amount: BigDecimal, +// request: ManualTransferRequest +// ): TransferResult { +// logger.info("deposit manually: $senderUuid to $receiverUuid on $symbol at ${LocalDateTime.now()}") +// val systemUuid = "1" +// //todo customize error message +// val senderLevel = walletOwnerManager.findWalletOwner(senderUuid)?.let { it.level } +// ?: throw OpexError.WalletOwnerNotFound.exception() +// val receiverLevel = walletOwnerManager.findWalletOwner(receiverUuid)?.let { it.level } +// +// if (senderLevel !in arrayListOf(preferences.admin.walletLevel, preferences.system.walletLevel)) // throw OpexError.Forbidden.exception() - - return _transfer( - symbol, - "main", - senderUuid, - "main", - receiverUuid, - amount, - request.description, - request.ref, - "DEPOSIT_MANUALLY", - null, - symbol, - amount - - ) - } +// +// if (senderLevel == preferences.system.walletLevel && receiverLevel != preferences.admin.walletLevel) +// throw OpexError.Forbidden.exception() +// +//// if (walletOwnerManager.findWalletOwner(receiverUuid)?.level !in arrayListOf(preferences.admin.walletLevel,preferences.system.walletLevel)) +//// throw OpexError.Forbidden.exception() +// +// return _transfer( +// symbol, +// "main", +// senderUuid, +// "main", +// receiverUuid, +// amount, +// request.description, +// request.ref, +// "DEPOSIT_MANUALLY", +// null, +// symbol, +// amount +// +// ) +// } @Transactional suspend fun depositManually(