Updated on 2026-08-14
This commit is contained in:
parent
fa75773471
commit
2c90913754
5 changed files with 21 additions and 60 deletions
|
|
@ -11,6 +11,7 @@ import com.tangem.Log
|
|||
import com.tangem.LogFormat
|
||||
import com.tangem.blockchain.network.BlockchainSdkRetrofitBuilder
|
||||
import com.tangem.domain.DomainLayer
|
||||
import com.tangem.domain.common.LogConfig
|
||||
import com.tangem.network.common.MoshiConverter
|
||||
import com.tangem.tap.common.analytics.GlobalAnalyticsHandler
|
||||
import com.tangem.tap.common.feedback.AdditionalFeedbackInfo
|
||||
|
|
@ -75,8 +76,7 @@ class TapApplication : Application(), ImageLoaderFactory {
|
|||
initFeedbackManager()
|
||||
loadConfigs()
|
||||
|
||||
BlockchainSdkRetrofitBuilder.enableNetworkLogging =
|
||||
store.state.domainState.globalState.logConfig.network.blockchainSdkNetwork
|
||||
BlockchainSdkRetrofitBuilder.enableNetworkLogging = LogConfig.network.blockchainSdkNetwork
|
||||
|
||||
initAppsFlyer()
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ class TapApplication : Application(), ImageLoaderFactory {
|
|||
override fun newImageLoader(): ImageLoader {
|
||||
return createCoilImageLoader(
|
||||
context = this,
|
||||
logEnabled = store.state.domainState.globalState.logConfig.imageLoader
|
||||
logEnabled = LogConfig.imageLoader
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ class TapApplication : Application(), ImageLoaderFactory {
|
|||
infoHolder = infoHolder,
|
||||
logCollector = logWriter,
|
||||
preferencesStorage = preferencesStorage,
|
||||
logEnabled = store.state.domainState.globalState.logConfig.zendesk,
|
||||
logEnabled = LogConfig.zendesk,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.tangem.tap.common.redux
|
||||
|
||||
import com.tangem.tap.store
|
||||
import com.tangem.domain.common.LogConfig
|
||||
import org.rekotlin.Middleware
|
||||
import timber.log.Timber
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ import timber.log.Timber
|
|||
val logMiddleware: Middleware<AppState> = { dispatch, appState ->
|
||||
{ nextDispatch ->
|
||||
{ action ->
|
||||
if (store.state.domainState.globalState.logConfig.storeAction) {
|
||||
if (LogConfig.storeAction) {
|
||||
Timber.d("Dispatch action: $action")
|
||||
}
|
||||
nextDispatch(action)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.tangem.common.core.TangemSdkError
|
|||
import com.tangem.common.extensions.guard
|
||||
import com.tangem.common.extensions.ifNotNull
|
||||
import com.tangem.common.services.Result
|
||||
import com.tangem.domain.common.LogConfig
|
||||
import com.tangem.domain.common.extensions.withMainContext
|
||||
import com.tangem.tap.common.extensions.dispatchDebugErrorNotification
|
||||
import com.tangem.tap.common.extensions.dispatchDialogShow
|
||||
|
|
@ -98,7 +99,6 @@ private fun handleAction(action: Action, appState: () -> AppState?, dispatch: Di
|
|||
is GlobalAction.ExchangeManager.Init -> {
|
||||
val appStateSafe = appState() ?: return
|
||||
val config = appStateSafe.globalState.configManager?.config
|
||||
val logConfig = appStateSafe.domainState.globalState.logConfig
|
||||
ifNotNull(
|
||||
config?.mercuryoWidgetId,
|
||||
config?.mercuryoSecret,
|
||||
|
|
@ -110,12 +110,12 @@ private fun handleAction(action: Action, appState: () -> AppState?, dispatch: Di
|
|||
apiVersion = MercuryoApi.API_VERSION,
|
||||
mercuryoWidgetId = mercuryoWidgetId,
|
||||
secret = mercuryoSecret,
|
||||
logEnabled = logConfig.network.mercuryoService,
|
||||
logEnabled = LogConfig.network.mercuryoService,
|
||||
)
|
||||
val sellService = MoonPayService(
|
||||
apiKey = moonPayKey,
|
||||
secretKey = moonPaySecretKey,
|
||||
logEnabled = logConfig.network.moonPayService,
|
||||
logEnabled = LogConfig.network.moonPayService,
|
||||
)
|
||||
val cardProvider = { store.state.globalState.scanResponse?.card }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue