Updated on 2026-08-14
This commit is contained in:
commit
6657a43f87
4 changed files with 6 additions and 6 deletions
|
|
@ -68,9 +68,9 @@ class AmountMiddleware {
|
|||
} else {
|
||||
val amountErrors = extractErrorsForAmountField(transactionErrors)
|
||||
if (amountErrors.isNotEmpty()) {
|
||||
transactionErrors.removeAll(amountErrors)
|
||||
dispatch(AmountAction.SetAmountError(createValidateTransactionError(amountErrors, walletManager)))
|
||||
}
|
||||
transactionErrors.removeAll(amountErrors)
|
||||
if (transactionErrors.isNotEmpty()) {
|
||||
dispatch(SendAction.SendError(createValidateTransactionError(transactionErrors, walletManager)))
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ class AmountMiddleware {
|
|||
|
||||
dispatch(AmountAction.SetAmount(sendState.amountState.balanceCrypto, false))
|
||||
if (sendState.amountState.isCoinAmount()) {
|
||||
dispatch(FeeAction.ChangeLayoutVisibility(main = true, controls = true, chipGroup = true))
|
||||
dispatch(FeeAction.ChangeLayoutVisibility(main = true, controls = true))
|
||||
dispatch(FeeActionUi.ChangeIncludeFee(true))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class RequestFeeMiddleware {
|
|||
|
||||
if (!SendState.isReadyToRequestFee()) {
|
||||
dispatch(FeeAction.FeeCalculation.SetFeeError(FeeAction.Error.ADDRESS_OR_AMOUNT_IS_EMPTY))
|
||||
dispatch(FeeAction.ChangeLayoutVisibility(main = false, chipGroup = true))
|
||||
// dispatch(FeeAction.ChangeLayoutVisibility(main = false, chipGroup = true))
|
||||
dispatch(ReceiptAction.RefreshReceipt)
|
||||
dispatch(SendAction.ChangeSendButtonState(sendState.getButtonState()))
|
||||
return
|
||||
|
|
@ -60,7 +60,7 @@ class RequestFeeMiddleware {
|
|||
}
|
||||
is Result.Failure -> {
|
||||
dispatch(FeeAction.FeeCalculation.SetFeeError(FeeAction.Error.REQUEST_FAILED))
|
||||
dispatch(FeeAction.ChangeLayoutVisibility(main = false, controls = false, chipGroup = false))
|
||||
dispatch(FeeAction.ChangeLayoutVisibility(main = false))
|
||||
}
|
||||
}
|
||||
dispatch(AmountActionUi.CheckAmountToSend)
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ fun extractErrorsForAmountField(errors: EnumSet<TransactionError>): EnumSet<Tran
|
|||
showIntoAmountField.add(it)
|
||||
}
|
||||
TransactionError.TotalExceedsBalance -> {
|
||||
val notAcceptable = listOf(TransactionError.FeeExceedsBalance, TransactionError.FeeExceedsBalance)
|
||||
val notAcceptable = listOf(TransactionError.AmountExceedsBalance, TransactionError.FeeExceedsBalance)
|
||||
if (!showIntoAmountField.containsAll(notAcceptable)) showIntoAmountField.add(it)
|
||||
}
|
||||
TransactionError.InvalidAmountValue -> showIntoAmountField.add(it)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class FeeReducer : SendInternalReducer {
|
|||
state.copy(
|
||||
mainLayoutIsVisible = getVisibility(state.mainLayoutIsVisible, action.main),
|
||||
controlsLayoutIsVisible = getVisibility(state.controlsLayoutIsVisible, action.controls),
|
||||
feeChipGroupIsVisible = getVisibility(state.mainLayoutIsVisible, action.chipGroup)
|
||||
feeChipGroupIsVisible = getVisibility(state.feeChipGroupIsVisible, action.chipGroup)
|
||||
)
|
||||
}
|
||||
is FeeAction.FeeCalculation.SetFeeResult -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue