Code cleanup

This commit is contained in:
Milan Cerovsky 2024-08-23 06:12:56 +02:00
parent c828364385
commit fd7f6f2e6e
2 changed files with 11 additions and 6 deletions

View File

@ -8,10 +8,11 @@ object ObserveFiatCurrencyResultFixture {
const val IS_LOADING: Boolean = true const val IS_LOADING: Boolean = true
const val IS_STALE: Boolean = false const val IS_STALE: Boolean = false
const val IS_REFRESH_ENABLED: Boolean = false const val IS_REFRESH_ENABLED: Boolean = false
val CURRENCY_CONVERSION: FiatCurrencyConversion = FiatCurrencyConversion( val CURRENCY_CONVERSION: FiatCurrencyConversion =
timestamp = Clock.System.now(), FiatCurrencyConversion(
priceOfZec = 25.0 timestamp = Clock.System.now(),
) priceOfZec = 25.0
)
fun new( fun new(
isLoading: Boolean = IS_LOADING, isLoading: Boolean = IS_LOADING,

View File

@ -162,7 +162,9 @@ internal fun WrapSend(
if (amountState.value.isNotBlank() || amountState.fiatValue.isBlank()) { if (amountState.value.isNotBlank() || amountState.fiatValue.isBlank()) {
AmountState.newFromZec( AmountState.newFromZec(
context = context, context = context,
isTransparentOrTextRecipient = recipientAddressState.type?.let { it == AddressType.Transparent } ?: false, isTransparentOrTextRecipient =
recipientAddressState.type
?.let { it == AddressType.Transparent } ?: false,
monetarySeparators = monetarySeparators, monetarySeparators = monetarySeparators,
value = amountState.value, value = amountState.value,
fiatValue = amountState.fiatValue, fiatValue = amountState.fiatValue,
@ -171,7 +173,9 @@ internal fun WrapSend(
} else { } else {
AmountState.newFromFiat( AmountState.newFromFiat(
context = context, context = context,
isTransparentOrTextRecipient = recipientAddressState.type?.let { it == AddressType.Transparent } ?: false, isTransparentOrTextRecipient =
recipientAddressState.type
?.let { it == AddressType.Transparent } ?: false,
monetarySeparators = monetarySeparators, monetarySeparators = monetarySeparators,
value = amountState.value, value = amountState.value,
fiatValue = amountState.fiatValue, fiatValue = amountState.fiatValue,