Updated on 2026-08-14
This commit is contained in:
parent
cfc201ac91
commit
62dd399e4f
1 changed files with 6 additions and 3 deletions
|
|
@ -35,8 +35,9 @@ class AmountReducer : SendInternalReducer {
|
|||
sendState.convertExtractCryptoToFiat(state.amountToSendCrypto)
|
||||
}
|
||||
val rescaledBalance = sendState.convertExtractCryptoToFiat(state.balanceCrypto, true)
|
||||
val viewValue = state.restoreDecimalSeparator(fiatToSend.stripZeroPlainString())
|
||||
state.copy(
|
||||
viewAmountValue = InputViewValue(fiatToSend.stripZeroPlainString()),
|
||||
viewAmountValue = InputViewValue(viewValue),
|
||||
viewBalanceValue = rescaledBalance.stripZeroPlainString(),
|
||||
mainCurrency = state.createMainCurrency(currency, currencyCanBeSwitched),
|
||||
maxLengthOfAmount = sendState.getDecimals(currency),
|
||||
|
|
@ -44,8 +45,9 @@ class AmountReducer : SendInternalReducer {
|
|||
)
|
||||
}
|
||||
MainCurrencyType.CRYPTO -> {
|
||||
val viewValue = state.restoreDecimalSeparator(state.amountToSendCrypto.stripZeroPlainString())
|
||||
state.copy(
|
||||
viewAmountValue = InputViewValue(state.amountToSendCrypto.stripZeroPlainString()),
|
||||
viewAmountValue = InputViewValue(viewValue),
|
||||
viewBalanceValue = state.balanceCrypto.stripZeroPlainString(),
|
||||
mainCurrency = state.createMainCurrency(currency, currencyCanBeSwitched),
|
||||
maxLengthOfAmount = sendState.getDecimals(currency),
|
||||
|
|
@ -68,8 +70,9 @@ class AmountReducer : SendInternalReducer {
|
|||
} else {
|
||||
sendState.convertExtractCryptoToFiat(action.amountCrypto, true)
|
||||
}
|
||||
val viewValue = state.restoreDecimalSeparator(amount.stripZeroPlainString())
|
||||
state.copy(
|
||||
viewAmountValue = InputViewValue(state.restoreDecimalSeparator(amount.stripZeroPlainString()), action.isUserInput),
|
||||
viewAmountValue = InputViewValue(viewValue, action.isUserInput),
|
||||
amountToSendCrypto = action.amountCrypto,
|
||||
cursorAtTheSamePosition = true,
|
||||
error = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue