Updated on 2026-08-14

This commit is contained in:
Tangem 2020-12-09 15:25:40 +03:00
parent abba81ed41
commit 044c9b9867
2 changed files with 7 additions and 2 deletions

View file

@ -39,6 +39,7 @@ val sendMiddleware: Middleware<AppState> = { dispatch, appState ->
is RequestFee -> RequestFeeMiddleware().handle(appState(), dispatch)
is SendActionUi.SendAmountToRecipient ->
verifyAndSendTransaction(action, appState(), dispatch)
is PrepareSendScreen -> setIfSendingToPayIdEnabled(appState(), dispatch)
}
nextDispatch(action)
}
@ -185,3 +186,9 @@ fun createValidateTransactionError(errorList: EnumSet<TransactionError>, walletM
return TapError.ValidateTransactionErrors(tapErrors) { it.joinToString("\r\n") }
}
private fun setIfSendingToPayIdEnabled(appState: AppState?, dispatch: (Action) -> Unit) {
val isSendingToPayIdEnabled =
appState?.globalState?.configManager?.config?.isSendingToPayIdEnabled ?: false
dispatch(AddressPayIdActionUi.ChangePayIdState(isSendingToPayIdEnabled))
}