diff --git a/screen/edit-transaction/src/main/java/com/ivy/transaction/EditTransactionScreen.kt b/screen/edit-transaction/src/main/java/com/ivy/transaction/EditTransactionScreen.kt index dac4dabc1c..5db240a842 100644 --- a/screen/edit-transaction/src/main/java/com/ivy/transaction/EditTransactionScreen.kt +++ b/screen/edit-transaction/src/main/java/com/ivy/transaction/EditTransactionScreen.kt @@ -56,7 +56,7 @@ import com.ivy.navigation.navigation import com.ivy.navigation.screenScopedViewModel import com.ivy.ui.R import com.ivy.wallet.domain.data.CustomExchangeRateState -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency 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 diff --git a/screen/home/src/main/java/com/ivy/home/HomeTab.kt b/screen/home/src/main/java/com/ivy/home/HomeTab.kt index b0e834ea91..60cda2d1cb 100644 --- a/screen/home/src/main/java/com/ivy/home/HomeTab.kt +++ b/screen/home/src/main/java/com/ivy/home/HomeTab.kt @@ -53,7 +53,7 @@ import com.ivy.navigation.IvyPreview import com.ivy.navigation.screenScopedViewModel import com.ivy.ui.R import com.ivy.ui.rememberScrollPositionListState -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.pure.data.IncomeExpensePair import com.ivy.wallet.ui.theme.modal.BufferModal import com.ivy.wallet.ui.theme.modal.BufferModalData diff --git a/screen/import-data/src/main/java/com/ivy/importdata/csv/domain/CSVImporterV2.kt b/screen/import-data/src/main/java/com/ivy/importdata/csv/domain/CSVImporterV2.kt index a8fe327dcb..7291fb494f 100644 --- a/screen/import-data/src/main/java/com/ivy/importdata/csv/domain/CSVImporterV2.kt +++ b/screen/import-data/src/main/java/com/ivy/importdata/csv/domain/CSVImporterV2.kt @@ -27,7 +27,7 @@ import com.ivy.legacy.datamodel.Account import com.ivy.legacy.datamodel.temp.toLegacyDomain import com.ivy.legacy.datamodel.toEntity import com.ivy.legacy.utils.toLowerCaseLocal -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.pure.util.nextOrderNum import com.ivy.wallet.ui.theme.Green import com.ivy.wallet.ui.theme.IvyDark diff --git a/screen/loans/src/main/java/com/ivy/loans/loandetails/LoanDetailsScreen.kt b/screen/loans/src/main/java/com/ivy/loans/loandetails/LoanDetailsScreen.kt index 9cbb4bc7f2..30b7a549df 100644 --- a/screen/loans/src/main/java/com/ivy/loans/loandetails/LoanDetailsScreen.kt +++ b/screen/loans/src/main/java/com/ivy/loans/loandetails/LoanDetailsScreen.kt @@ -65,7 +65,7 @@ import com.ivy.navigation.TransactionsScreen import com.ivy.navigation.navigation import com.ivy.ui.R import com.ivy.ui.time.TimeFormatter -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.ui.theme.Gradient import com.ivy.wallet.ui.theme.Gray import com.ivy.wallet.ui.theme.MediumBlack diff --git a/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingDetailState.kt b/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingDetailState.kt index b30be72a5d..cc6fa85f76 100644 --- a/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingDetailState.kt +++ b/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingDetailState.kt @@ -3,7 +3,7 @@ package com.ivy.onboarding import androidx.compose.runtime.Immutable import com.ivy.data.model.Category import com.ivy.legacy.data.model.AccountBalance -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.deprecated.logic.model.CreateAccountData import com.ivy.wallet.domain.deprecated.logic.model.CreateCategoryData import kotlinx.collections.immutable.ImmutableList diff --git a/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingEvent.kt b/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingEvent.kt index 437bee2851..933342b00c 100644 --- a/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingEvent.kt +++ b/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingEvent.kt @@ -2,7 +2,7 @@ package com.ivy.onboarding import com.ivy.data.model.Category import com.ivy.legacy.datamodel.Account -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.deprecated.logic.model.CreateAccountData import com.ivy.wallet.domain.deprecated.logic.model.CreateCategoryData diff --git a/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingScreen.kt b/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingScreen.kt index 60ccebe956..1d6b10020c 100644 --- a/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingScreen.kt +++ b/screen/onboarding/src/main/java/com/ivy/onboarding/OnboardingScreen.kt @@ -16,7 +16,7 @@ import com.ivy.onboarding.steps.OnboardingSetCurrency import com.ivy.onboarding.steps.OnboardingSplashLogin import com.ivy.onboarding.steps.OnboardingType import com.ivy.onboarding.viewmodel.OnboardingViewModel -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.deprecated.logic.model.CreateAccountData import com.ivy.wallet.domain.deprecated.logic.model.CreateCategoryData import kotlinx.collections.immutable.ImmutableList diff --git a/screen/onboarding/src/main/java/com/ivy/onboarding/steps/OnboardingSetCurrency.kt b/screen/onboarding/src/main/java/com/ivy/onboarding/steps/OnboardingSetCurrency.kt index 9d64a5b273..83ebcdf5e6 100644 --- a/screen/onboarding/src/main/java/com/ivy/onboarding/steps/OnboardingSetCurrency.kt +++ b/screen/onboarding/src/main/java/com/ivy/onboarding/steps/OnboardingSetCurrency.kt @@ -27,7 +27,7 @@ import com.ivy.legacy.IvyWalletPreview import com.ivy.legacy.utils.setStatusBarDarkTextCompat import com.ivy.navigation.navigation import com.ivy.ui.R -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.ui.theme.GradientIvy import com.ivy.wallet.ui.theme.White import com.ivy.wallet.ui.theme.components.BackButton diff --git a/screen/onboarding/src/main/java/com/ivy/onboarding/viewmodel/OnboardingRouter.kt b/screen/onboarding/src/main/java/com/ivy/onboarding/viewmodel/OnboardingRouter.kt index 34969a1e9a..7adec09ff3 100644 --- a/screen/onboarding/src/main/java/com/ivy/onboarding/viewmodel/OnboardingRouter.kt +++ b/screen/onboarding/src/main/java/com/ivy/onboarding/viewmodel/OnboardingRouter.kt @@ -16,7 +16,7 @@ import com.ivy.navigation.MainScreen import com.ivy.navigation.Navigation import com.ivy.navigation.OnboardingScreen import com.ivy.onboarding.OnboardingState -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.deprecated.logic.PreloadDataLogic import com.ivy.wallet.domain.deprecated.logic.model.CreateAccountData import com.ivy.wallet.domain.deprecated.logic.model.CreateCategoryData diff --git a/screen/onboarding/src/main/java/com/ivy/onboarding/viewmodel/OnboardingViewModel.kt b/screen/onboarding/src/main/java/com/ivy/onboarding/viewmodel/OnboardingViewModel.kt index 606197f92c..9508c34839 100644 --- a/screen/onboarding/src/main/java/com/ivy/onboarding/viewmodel/OnboardingViewModel.kt +++ b/screen/onboarding/src/main/java/com/ivy/onboarding/viewmodel/OnboardingViewModel.kt @@ -27,7 +27,7 @@ import com.ivy.onboarding.OnboardingDetailState import com.ivy.onboarding.OnboardingEvent import com.ivy.onboarding.OnboardingState import com.ivy.wallet.domain.action.account.AccountsAct -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.deprecated.logic.CategoryCreator import com.ivy.wallet.domain.deprecated.logic.PreloadDataLogic import com.ivy.wallet.domain.deprecated.logic.WalletAccountLogic diff --git a/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt b/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt index 7f02058e9e..859e4ca6c7 100644 --- a/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt +++ b/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt @@ -57,7 +57,7 @@ import com.ivy.navigation.ReleasesScreen import com.ivy.navigation.navigation import com.ivy.navigation.screenScopedViewModel import com.ivy.ui.R -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.ui.theme.Blue import com.ivy.wallet.ui.theme.Gradient import com.ivy.wallet.ui.theme.GradientGreen diff --git a/shared/ui/core/src/main/java/com/ivy/ui/FormatMoneyUseCase.kt b/shared/ui/core/src/main/java/com/ivy/ui/FormatMoneyUseCase.kt index d1aed35b19..4a858a4a0d 100644 --- a/shared/ui/core/src/main/java/com/ivy/ui/FormatMoneyUseCase.kt +++ b/shared/ui/core/src/main/java/com/ivy/ui/FormatMoneyUseCase.kt @@ -13,6 +13,15 @@ const val THOUSAND = 1_000 const val MILLION = 1_000_000 const val BILLION = 1_000_000_000 +/** + * A use case class responsible for formatting currency and cryptocurrency values based on user preferences. + * It supports regular currency formatting with or without decimal places, as well as shortened formats + * (e.g., "1k", "1m"). For cryptocurrency, it formats up to 9 decimal places and removes unnecessary trailing zeros. + * + * @property features Provides feature toggles to customize app behavior. + * @property devicePreferences Manages user-specific preferences for locale and other device settings. + * @property context Application context, used for feature check and resource access. + */ class FormatMoneyUseCase @Inject constructor( private val features: Features, private val devicePreferences: DevicePreferences, @@ -23,17 +32,28 @@ class FormatMoneyUseCase @Inject constructor( private val withoutDecimalFormatter = DecimalFormat("###,###", DecimalFormatSymbols(locale)) private val withDecimalFormatter = DecimalFormat("###,###.00", DecimalFormatSymbols(locale)) private val shortenAmountFormatter = DecimalFormat("###,###.##", DecimalFormatSymbols(locale)) + private val cryptoFormatter = + DecimalFormat("###,###,##0.${"0".repeat(9)}", DecimalFormatSymbols(locale)) - suspend fun format(value: Double, shortenAmount: Boolean): String { - if (abs(value) >= THOUSAND && shortenAmount) { - val result = if (abs(value) >= BILLION) { + /** + * Formats a currency or cryptocurrency amount based on the input parameters. + * + * @param value The numeric value to format. + * @param shortenAmount Flag to indicate if the amount should be shortened (e.g., "1k" for 1,000). + * @param isCrypto Flag to indicate if the value is a cryptocurrency, enabling up to 9 decimal places. + * @return The formatted string representation of the value. + */ + suspend fun format(value: Double, shortenAmount: Boolean, isCrypto: Boolean = false): String { + val result = if (isCrypto) { + formatCrypto(value) + } else if (abs(value) >= THOUSAND && shortenAmount) { + if (abs(value) >= BILLION) { "${shortenAmountFormatter.format(value / BILLION)}b" } else if (abs(value) >= MILLION) { "${shortenAmountFormatter.format(value / MILLION)}m" } else { "${shortenAmountFormatter.format(value / THOUSAND)}k" } - return result } else { val showDecimalPoint = features.showDecimalNumber.isEnabled(context) @@ -41,7 +61,40 @@ class FormatMoneyUseCase @Inject constructor( true -> withDecimalFormatter false -> withoutDecimalFormatter } - return formatter.format(value) + formatter.format(value) } + + return result + } + + /** + * Formats a cryptocurrency value with up to 9 decimal places, removing unnecessary trailing zeros. + * + * @param value The cryptocurrency value to format. + * @return The formatted cryptocurrency value as a string. + */ + private fun formatCrypto(value: Double): String { + val result = cryptoFormatter.format(value) + return when { + result.lastOrNull() == localDecimalSeparator().firstOrNull() -> { + val newResult = result.dropLast(1) + newResult.ifEmpty { "0" } + } + + result.isEmpty() -> { + "0" + } + + else -> result + } + } + + /** + * Retrieves the local decimal separator based on the user's locale. + * + * @return The decimal separator as a string. + */ + private fun localDecimalSeparator(): String { + return DecimalFormatSymbols(locale).decimalSeparator.toString() } -} \ No newline at end of file +} diff --git a/shared/ui/core/src/test/java/com/ivy/ui/FormatMoneyUseCaseTest.kt b/shared/ui/core/src/test/java/com/ivy/ui/FormatMoneyUseCaseTest.kt index a477fcbda6..4742b5056b 100644 --- a/shared/ui/core/src/test/java/com/ivy/ui/FormatMoneyUseCaseTest.kt +++ b/shared/ui/core/src/test/java/com/ivy/ui/FormatMoneyUseCaseTest.kt @@ -24,6 +24,7 @@ class FormatMoneyUseCaseTest { val amount: Double, val showDecimal: Boolean, val shortenAmount: Boolean, + val isCrypto: Boolean, val locale: Locale, val expectedOutput: String ) { @@ -31,6 +32,7 @@ class FormatMoneyUseCaseTest { amount = 1_000.12, showDecimal = true, shortenAmount = false, + isCrypto = false, locale = Locale.ENGLISH, expectedOutput = "1,000.12" ), @@ -38,6 +40,7 @@ class FormatMoneyUseCaseTest { amount = 1_000.12, showDecimal = false, shortenAmount = false, + isCrypto = false, locale = Locale.ENGLISH, expectedOutput = "1,000" ), @@ -45,6 +48,7 @@ class FormatMoneyUseCaseTest { amount = 1_000.12, showDecimal = true, shortenAmount = false, + isCrypto = false, locale = Locale.GERMAN, expectedOutput = "1.000,12" ), @@ -52,6 +56,7 @@ class FormatMoneyUseCaseTest { amount = 1_000.12, showDecimal = false, shortenAmount = false, + isCrypto = false, locale = Locale.GERMAN, expectedOutput = "1.000" ), @@ -59,6 +64,7 @@ class FormatMoneyUseCaseTest { amount = 13_000.10, showDecimal = true, shortenAmount = true, + isCrypto = false, locale = Locale.ENGLISH, expectedOutput = "13k" ), @@ -66,6 +72,7 @@ class FormatMoneyUseCaseTest { amount = 1_233_500.10, showDecimal = true, shortenAmount = true, + isCrypto = false, locale = Locale.ENGLISH, expectedOutput = "1.23m" ), @@ -73,6 +80,7 @@ class FormatMoneyUseCaseTest { amount = 1_233_000_000.10, showDecimal = true, shortenAmount = true, + isCrypto = false, locale = Locale.ENGLISH, expectedOutput = "1.23b" ), @@ -80,6 +88,7 @@ class FormatMoneyUseCaseTest { amount = 13_000.10, showDecimal = true, shortenAmount = true, + isCrypto = false, locale = Locale.GERMAN, expectedOutput = "13k" ), @@ -87,6 +96,7 @@ class FormatMoneyUseCaseTest { amount = 1_233_500.10, showDecimal = true, shortenAmount = true, + isCrypto = false, locale = Locale.GERMAN, expectedOutput = "1,23m" ), @@ -94,9 +104,42 @@ class FormatMoneyUseCaseTest { amount = 1_233_000_000.10, showDecimal = true, shortenAmount = true, + isCrypto = false, locale = Locale.GERMAN, expectedOutput = "1,23b" ), + ENG_SHOW_DECIMAL_CRYPTO( + amount = 123_456.0, + showDecimal = true, + shortenAmount = false, + isCrypto = true, + locale = Locale.ENGLISH, + expectedOutput = "123,456.000000000" + ), + ENG_HIDE_DECIMAL_CRYPTO( + amount = 123_456.0, + showDecimal = false, + shortenAmount = false, + isCrypto = true, + locale = Locale.ENGLISH, + expectedOutput = "123,456.000000000" + ), + GERMAN_SHOW_DECIMAL_CRYPTO( + amount = 123_456.0, + showDecimal = true, + shortenAmount = false, + isCrypto = true, + locale = Locale.GERMAN, + expectedOutput = "123.456,000000000" + ), + GERMAN_HIDE_DECIMAL_CRYPTO( + amount = 123_456.0, + showDecimal = false, + shortenAmount = false, + isCrypto = true, + locale = Locale.GERMAN, + expectedOutput = "123.456,000000000" + ), } private lateinit var formatMoneyUseCase: FormatMoneyUseCase @@ -114,7 +157,8 @@ class FormatMoneyUseCaseTest { // when val result = formatMoneyUseCase.format( value = testCase.amount, - shortenAmount = testCase.shortenAmount + shortenAmount = testCase.shortenAmount, + isCrypto = testCase.isCrypto ) // then diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/data/IvyCurrency.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/data/IvyCurrency.kt index 19a57c24f1..5a69d9ccb8 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/data/IvyCurrency.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/data/IvyCurrency.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.data +package com.ivy.legacy.domain.data import android.icu.util.Currency import androidx.compose.runtime.Immutable diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/deprecated/logic/csv/CSVImporter.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/deprecated/logic/csv/CSVImporter.kt index 3e35794988..2572606df8 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/deprecated/logic/csv/CSVImporter.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/deprecated/logic/csv/CSVImporter.kt @@ -27,7 +27,7 @@ import com.ivy.legacy.datamodel.toEntity import com.ivy.legacy.utils.convertLocalToUTC import com.ivy.legacy.utils.timeNowUTC import com.ivy.legacy.utils.toLowerCaseLocal -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.deprecated.logic.csv.model.RowMapping import com.ivy.wallet.domain.pure.util.nextOrderNum import com.opencsv.CSVReaderBuilder diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/components/CurrencyPicker.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/components/CurrencyPicker.kt index 74c2c65c3f..c626e5f7f4 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/components/CurrencyPicker.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/components/CurrencyPicker.kt @@ -53,7 +53,7 @@ import com.ivy.legacy.utils.keyboardOnlyWindowInsets import com.ivy.legacy.utils.onScreenStart import com.ivy.legacy.utils.toLowerCaseLocal import com.ivy.ui.R -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.ui.theme.GradientGreen import com.ivy.wallet.ui.theme.GradientIvy import com.ivy.wallet.ui.theme.Ivy diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/components/CustomExchangeRateCard.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/components/CustomExchangeRateCard.kt index c9e6c5bedc..f1b6dd08dc 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/components/CustomExchangeRateCard.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/components/CustomExchangeRateCard.kt @@ -24,7 +24,7 @@ import com.ivy.design.l0_system.style import com.ivy.legacy.IvyWalletComponentPreview import com.ivy.legacy.utils.format import com.ivy.ui.R -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.ui.theme.Orange @Deprecated("Old design system. Use `:ivy-design` and Material3") diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/CurrencyModal.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/CurrencyModal.kt index cf5970706a..3cef4499c6 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/CurrencyModal.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/CurrencyModal.kt @@ -22,7 +22,7 @@ import com.ivy.design.l0_system.UI import com.ivy.design.l0_system.style import com.ivy.legacy.IvyWalletPreview import com.ivy.ui.R -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.ui.theme.Gray import com.ivy.wallet.ui.theme.components.CurrencyPicker import java.util.UUID diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/LoanModal.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/LoanModal.kt index 4f68b5b550..abd3349cdb 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/LoanModal.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/LoanModal.kt @@ -52,7 +52,7 @@ import com.ivy.legacy.utils.selectEndTextFieldValue import com.ivy.design.utils.thenIf import com.ivy.legacy.legacy.ui.theme.modal.ModalNameInput import com.ivy.ui.R -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.deprecated.logic.model.CreateAccountData import com.ivy.wallet.domain.deprecated.logic.model.CreateLoanData import com.ivy.wallet.ui.theme.GradientIvy diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/edit/AccountModal.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/edit/AccountModal.kt index 8ee0efea19..d159a770f3 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/edit/AccountModal.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/legacy/ui/theme/modal/edit/AccountModal.kt @@ -37,7 +37,7 @@ import com.ivy.legacy.utils.selectEndTextFieldValue import com.ivy.legacy.utils.toLowerCaseLocal import com.ivy.legacy.utils.toUpperCaseLocal import com.ivy.ui.R -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.domain.deprecated.logic.model.CreateAccountData import com.ivy.wallet.ui.theme.Gray import com.ivy.wallet.ui.theme.Ivy diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/IncomeExpenseCards.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/IncomeExpenseCards.kt index 72de034dd6..90f9e8952b 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/IncomeExpenseCards.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/IncomeExpenseCards.kt @@ -28,7 +28,7 @@ import com.ivy.design.l0_system.style import com.ivy.legacy.utils.drawColoredShadow import com.ivy.legacy.utils.format import com.ivy.ui.R -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.ui.theme.Gradient import com.ivy.wallet.ui.theme.Green import com.ivy.wallet.ui.theme.MediumBlack diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/edit/core/EditBottomSheet.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/edit/core/EditBottomSheet.kt index a7f1aa26be..180d44bb49 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/edit/core/EditBottomSheet.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/edit/core/EditBottomSheet.kt @@ -67,7 +67,7 @@ import com.ivy.base.model.TransactionType import com.ivy.legacy.utils.rememberInteractionSource import com.ivy.legacy.utils.rememberSwipeListenerState import com.ivy.ui.R -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.ui.theme.Gradient import com.ivy.wallet.ui.theme.Green import com.ivy.wallet.ui.theme.GreenDark diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/transaction/TransactionCard.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/transaction/TransactionCard.kt index 46c2981b07..144a5cda03 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/transaction/TransactionCard.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/transaction/TransactionCard.kt @@ -63,7 +63,7 @@ import com.ivy.navigation.TransactionsScreen import com.ivy.navigation.navigation import com.ivy.ui.R import com.ivy.ui.time.TimeFormatter -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import com.ivy.wallet.ui.theme.Blue import com.ivy.wallet.ui.theme.Gradient import com.ivy.wallet.ui.theme.GradientGreen diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/utils/AmountFormatting.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/utils/AmountFormatting.kt index 1270a765aa..a80d6ce793 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/utils/AmountFormatting.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/utils/AmountFormatting.kt @@ -1,6 +1,6 @@ package com.ivy.legacy.utils -import com.ivy.wallet.domain.data.IvyCurrency +import com.ivy.legacy.domain.data.IvyCurrency import java.text.DecimalFormat import java.text.DecimalFormatSymbols import kotlin.math.abs