Updated on 2026-08-14

This commit is contained in:
Tangem 2026-01-21 16:23:56 +02:00
parent d3d91e3394
commit 638cbc9d23
8 changed files with 6 additions and 8 deletions

View file

@ -356,7 +356,7 @@ open class TangemApplication : Application(), ImageLoaderFactory, Configuration.
private fun createReduxStore(): Store<AppState> {
return Store(
reducer = { action, state -> appReducer(action, state) },
reducer = { action, state -> appReducer(action, requireNotNull(state)) },
middleware = AppState.getMiddleware(),
state = AppState(
daggerGraphState = DaggerGraphState(

View file

@ -6,9 +6,7 @@ import com.tangem.tap.features.welcome.redux.WelcomeReducer
import com.tangem.tap.proxy.redux.DaggerGraphReducer
import org.rekotlin.Action
@Suppress("CanBeNonNullable")
fun appReducer(action: Action, state: AppState?): AppState {
requireNotNull(state)
fun appReducer(action: Action, state: AppState): AppState {
if (action is AppAction.RestoreState) return action.state
return AppState(