Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
fixes decimal place in amount input sheet (#3334)
Browse files Browse the repository at this point in the history
* WIP: disabled firebase crashlytics

* fixed decimal place for crypto

* simplify get decimal place logic

* dynamic decimal place in amount input sheet

* dynamic decimal place in amount input sheet
  • Loading branch information
suyash01 authored Jul 11, 2024
1 parent 899439f commit 2c38ca5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import com.ivy.wallet.domain.deprecated.logic.model.CreateAccountData
import com.ivy.wallet.domain.deprecated.logic.model.CreateCategoryData
import com.ivy.wallet.ui.edit.core.Category
import com.ivy.legacy.ui.component.edit.core.Description
import com.ivy.wallet.domain.data.IvyCurrency
import com.ivy.wallet.ui.edit.core.DueDate
import com.ivy.wallet.ui.edit.core.EditBottomSheet
import com.ivy.wallet.ui.edit.core.Title
Expand Down Expand Up @@ -604,7 +605,9 @@ private fun BoxWithConstraintsScope.UI(
currency = "",
initialAmount = customExchangeRateState.exchangeRate,
dismiss = { exchangeRateAmountModalShown = false },
decimalCountMax = 4,
decimalCountMax = IvyCurrency.getDecimalPlaces(
customExchangeRateState.toCurrencyCode ?: baseCurrency
),
onAmountChanged = {
onExchangeRateChange(it)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fun AmountCurrency(

Text(
text = amount.ifBlank { "0" },
style = UI.typo.nH1.style(
style = UI.typo.nH2.style(
fontWeight = FontWeight.Bold,
color = UI.colors.pureInverse
)
Expand Down

0 comments on commit 2c38ca5

Please sign in to comment.