Currency conversion floating point hotfix

This commit is contained in:
Milan Cerovsky 2024-08-26 10:19:30 +02:00
parent bdf105e356
commit 7b808c53c8
3 changed files with 7 additions and 12 deletions

View File

@ -131,7 +131,7 @@ ZCASH_EMULATOR_WTF_API_KEY=
# Optional absolute path to a Zcash SDK checkout.
# When blank, it pulls the SDK from Maven.
# When set, it uses the path for a Gradle included build. Path can either be absolute or relative to the root of this app's Gradle project.
SDK_INCLUDED_BUILD_PATH=
SDK_INCLUDED_BUILD_PATH=/Users/milancerovsky/Developer/zcash/zcash-android-wallet-sdk
# When blank, it pulls the BIP-39 library from Maven.
# When set, it uses the path for a Gradle included build. Path can either be absolute or relative to the root of this app's Gradle project.

View File

@ -158,15 +158,11 @@ internal fun createExchangeRateText(
if (isHideBalances) {
"${currencySymbol}${hiddenBalancePlaceholder.getValue()}"
} else if (state.currencyConversion != null) {
val value =
zatoshi.toFiatString(
currencyConversion = state.currencyConversion,
locale = Locale.current.toKotlinLocale(),
monetarySeparators = MonetarySeparators.current(java.util.Locale.getDefault()),
includeSymbols = false
)
"$currencySymbol$value"
zatoshi.toFiatString(
currencyConversion = state.currencyConversion,
locale = Locale.current.toKotlinLocale(),
monetarySeparators = MonetarySeparators.current(java.util.Locale.getDefault()),
)
} else {
currencySymbol
}

View File

@ -69,8 +69,7 @@ sealed interface AmountState {
currencyConversion = currencyConversion,
locale = Locale.current.toKotlinLocale(),
monetarySeparators = MonetarySeparators.current(java.util.Locale.getDefault()),
includeSymbols = false
)
).replace(currencyConversion.fiatCurrency.symbol, "")
}
)
}