File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
app/src/main/java/to/bitkit/ui/screens/wallets/send Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import to.bitkit.viewmodels.MainUiState
4444import to.bitkit.viewmodels.SendEvent
4545import to.bitkit.viewmodels.SendMethod
4646import to.bitkit.viewmodels.SendUiState
47+ import java.math.BigDecimal
4748
4849@Composable
4950fun SendAmountScreen (
@@ -60,11 +61,13 @@ fun SendAmountScreen(
6061 LaunchedEffect (currencyUiState.primaryDisplay) {
6162 input = when (currencyUiState.primaryDisplay) {
6263 PrimaryDisplay .BITCOIN -> {
63- currencyVM.convertFiatToSats(input.toDoubleOrNull() ? : 0.0 ).toString()
64+ val amountLong = currencyVM.convertFiatToSats(input.toDoubleOrNull() ? : 0.0 ) ? : 0
65+ if (amountLong > 0.0 ) amountLong.toString() else " "
6466 }
6567
6668 PrimaryDisplay .FIAT -> {
67- currencyVM.convert(input.toLongOrDefault(0L ))?.formatted.toString().replace(" .00" , " " )
69+ val convertedAmount = currencyVM.convert(input.toLongOrDefault(0L ))
70+ if ((convertedAmount?.value ? : BigDecimal (0 )) > BigDecimal (0 )) convertedAmount?.formatted.toString() else " "
6871 }
6972 }
7073 }
You can’t perform that action at this time.
0 commit comments