Skip to content

Commit

Permalink
Fix for : EditTransactionViewModel.kt:859:24: This condition is too c…
Browse files Browse the repository at this point in the history
…omplex (4). Defined complexity threshold for conditions is set to '4' [ComplexCondition]
  • Loading branch information
shamim-emon committed Sep 14, 2024
1 parent d7aaa75 commit 473f87a
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -856,10 +856,9 @@ class EditTransactionViewModel @Inject constructor(
}

val exRate = exchangeRate
?: if (customExchangeRateState.showCard &&
toAccCurrencyCode == customExchangeRateState.toCurrencyCode &&
fromAccCurrencyCode == customExchangeRateState.fromCurrencyCode &&
!resetRate
?: if (
customExchangeRateState.showCard && toAccCurrencyCode == customExchangeRateState.toCurrencyCode &&
fromAccCurrencyCode == customExchangeRateState.fromCurrencyCode && !resetRate
) {
customExchangeRateState.exchangeRate
} else {
Expand Down

0 comments on commit 473f87a

Please sign in to comment.