Updated on 2026-08-14

This commit is contained in:
Tangem 2020-09-30 08:32:19 +00:00
commit 07ed25f0c5
2 changed files with 6 additions and 0 deletions

View file

@ -80,6 +80,8 @@ class AmountMiddleware {
dispatch(AmountAction.SetAmount(amountState.balanceCrypto, false))
dispatch(FeeAction.RequestFee)
if (!amountState.isCoinAmount()) return
dispatch(FeeAction.ChangeLayoutVisibility(main = true, controls = true, chipGroup = true))
dispatch(FeeActionUi.ChangeIncludeFee(true))
dispatch(AmountActionUi.CheckAmountToSend)

View file

@ -42,14 +42,18 @@ class SendStateSubscriber(fragment: BaseStoreFragment) : FragmentStateSubscriber
state.lastChangedStates.clear()
lastChangedStates.forEach {
when (it) {
StateId.SEND_SCREEN -> handleSendScreen(fg, state)
StateId.ADDRESS_PAY_ID -> handleAddressPayIdState(fg, state.addressPayIdState)
StateId.AMOUNT -> handleAmountState(fg, state.amountState)
StateId.FEE -> handleFeeState(fg, state.feeState)
StateId.RECEIPT -> handleReceiptState(fg, state.receiptState)
}
}
}
private fun handleSendScreen(fg: BaseStoreFragment, state: SendState) {
val sendFragment = (fg as? SendFragment) ?: return
when (state.sendButtonState) {
SendButtonState.ENABLED -> {
fg.btnSend.isEnabled = true