Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
valentunn committed Jan 28, 2025
1 parent 54b34ef commit cf3b0d2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import javax.inject.Inject


interface MythosRedeemInteractor {

fun redeemAmountFlow(): Flow<Balance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import io.novafoundation.nova.feature_wallet_api.domain.validation.sufficientBal
typealias RedeemMythosValidationSystem = ValidationSystem<RedeemMythosStakingValidationPayload, RedeemMythosStakingValidationFailure>
typealias RedeemMythosValidationSystemBuilder = ValidationSystemBuilder<RedeemMythosStakingValidationPayload, RedeemMythosStakingValidationFailure>

fun ValidationSystem.Companion.mythosRedeem(
): RedeemMythosValidationSystem = ValidationSystem {
fun ValidationSystem.Companion.mythosRedeem(): RedeemMythosValidationSystem = ValidationSystem {
enoughToPayFees()
}
private fun RedeemMythosValidationSystemBuilder.enoughToPayFees() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ class MythosReleaseRequestLimitNotReachedValidationFactory @Inject constructor(

context(UnbondMythosValidationSystemBuilder)
fun releaseRequestsLimitNotReached() {
validate(ReleaseRequestLimitNotReachedValidation(
stakingRepository = stakingRepository,
userStakeRepository = userStakeRepository,
accountRepository = accountRepository,
chainRegistry = chainRegistry
))
validate(
ReleaseRequestLimitNotReachedValidation(
stakingRepository = stakingRepository,
userStakeRepository = userStakeRepository,
accountRepository = accountRepository,
chainRegistry = chainRegistry
)
)
}
}

Expand All @@ -35,7 +37,7 @@ private class ReleaseRequestLimitNotReachedValidation(
private val userStakeRepository: MythosUserStakeRepository,
private val accountRepository: AccountRepository,
private val chainRegistry: ChainRegistry,
): UnbondMythosValidation {
) : UnbondMythosValidation {

override suspend fun validate(value: UnbondMythosStakingValidationPayload): ValidationStatus<UnbondMythosStakingValidationFailure> {
val chain = chainRegistry.getChain(value.chainId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ sealed class UnbondMythosStakingValidationFailure {

object HasNotClaimedRewards : UnbondMythosStakingValidationFailure()

class ReleaseRequestsLimitReached(val limit: Int): UnbondMythosStakingValidationFailure()
class ReleaseRequestsLimitReached(val limit: Int) : UnbondMythosStakingValidationFailure()
}

0 comments on commit cf3b0d2

Please sign in to comment.