Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package co.nilin.opex.api.core.inout

enum class TransferMethod {
CARD, SHEBA, IPG, EXCHANGE , MANUALLY , VOUCHER, MPG , REWARD
CARD, SHEBA, IPG, EXCHANGE , MANUALLY , VOUCHER, MPG , REWARD, BANK_DEPOSIT, ACCOUNT
}
1 change: 1 addition & 0 deletions common/src/main/kotlin/co/nilin/opex/common/OpexError.kt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ enum class OpexError(val code: Int, val message: String?, val status: HttpStatus
ForbiddenSwapPair(6052, null, HttpStatus.BAD_REQUEST),
TerminalLocalizationNotFound(6053, "Terminal localization not found", HttpStatus.NOT_FOUND),
CurrencyLocalizationNotFound(6051, "Currency localization not found", HttpStatus.NOT_FOUND),
IdentifierNotFound(6052, "Identifier not found", HttpStatus.NOT_FOUND),


// code 7000: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class SecurityConfig(private val webClient: WebClient) {
http.csrf().disable()
.authorizeExchange()
// .pathMatchers("/transaction/**").hasAuthority("SCOPE_trust")
.pathMatchers("/v1/deposit/webhook").permitAll()
.pathMatchers("/admin/**").hasRoleAndLevel("Admin")
.pathMatchers(HttpMethod.PUT, "/otc/**").hasRoleAndLevel("Admin")
.pathMatchers(HttpMethod.POST, "/otc/**").hasRoleAndLevel("Admin")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DepositService(
) {

private val logger = LoggerFactory.getLogger(DepositService::class.java)

// -------------------------------------------------------------------------
// Helpers (NO LOGIC CHANGE)
// -------------------------------------------------------------------------
Expand Down Expand Up @@ -121,8 +121,8 @@ class DepositService(
)

val receiverUuid = walletOwnerManager.findWalletOwnerByExternalIdentifier(request.externalIdentifier)?.uuid
?: throw OpexError.BadRequest.exception("Identifier ${request.externalIdentifier} not fount")

?: throw OpexError.IdentifierNotFound.exception("Identifier ${request.externalIdentifier} not found")
//todo to have meaningful transfer labels in deposits section we have added BANK_DEPOSIT to cover sheba and account transfers in this service
with(request) {
deposit(
symbol = symbol,
Expand All @@ -136,7 +136,7 @@ class DepositService(
attachment = null,
depositType = DepositType.OFF_CHAIN,
gatewayUuid = null,
transferMethod = TransferMethod.SHEBA,
transferMethod = TransferMethod.BANK_DEPOSIT,
persistInvalidDeposit = false
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package co.nilin.opex.wallet.core.inout

enum class TransferMethod {
CARD, SHEBA, IPG, EXCHANGE , MANUALLY , VOUCHER, MPG , REWARD
CARD, SHEBA, IPG, EXCHANGE , MANUALLY , VOUCHER, MPG , REWARD, BANK_DEPOSIT, ACCOUNT
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface OffChainGatewayRepository : ReactiveCrudRepository<OffChainGatewayMode
select g.id,
g.gateway_uuid,
g.currency_symbol,
g.withdraw_allowed,
g.deposit_allowed,
g.withdraw_fee,
g.withdraw_min,
Expand Down Expand Up @@ -46,6 +47,7 @@ interface OffChainGatewayRepository : ReactiveCrudRepository<OffChainGatewayMode
select g.id,
g.gateway_uuid,
g.currency_symbol,
g.withdraw_allowed,
g.deposit_allowed,
g.withdraw_fee,
g.withdraw_min,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import java.math.BigDecimal
data class OffChainGatewayView(
var id: Long?,
val gatewayUuid: String,
val currencySymbol: String, var withdrawAllowed: Boolean? = true,
val currencySymbol: String,
var withdrawAllowed: Boolean? = true,
var depositAllowed: Boolean? = true,
var withdrawFee: BigDecimal? = BigDecimal.ZERO,
var withdrawMin: BigDecimal? = BigDecimal.ZERO,
Expand Down
Loading