Updated on 2026-08-14
This commit is contained in:
parent
efe271e1a0
commit
b87a0ae96b
18 changed files with 91 additions and 79 deletions
|
|
@ -200,6 +200,8 @@ class TapApplication : Application(), ImageLoaderFactory {
|
|||
appStateHolder.userTokensRepository = userTokensRepository
|
||||
appStateHolder.walletStoresManager = walletStoresManager
|
||||
|
||||
// TODO: Try to performance and user experience.
|
||||
// [REDACTED_JIRA]
|
||||
runBlocking {
|
||||
featureTogglesManager.init()
|
||||
learn2ernInteractor.init()
|
||||
|
|
|
|||
|
|
@ -3,5 +3,10 @@ package com.tangem.tap.network.auth
|
|||
import com.tangem.lib.auth.BasicAuthProvider
|
||||
|
||||
class TangemBasicAuthProvider(private val credentials: String?) : BasicAuthProvider {
|
||||
override fun getCredentials(): String? = credentials
|
||||
|
||||
override fun getCredentials(): Map<String, String> = if (credentials == null) {
|
||||
mapOf()
|
||||
} else {
|
||||
mapOf("Authorization" to "Basic $credentials")
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.tangem.tap.network.auth.di
|
|||
|
||||
import com.tangem.datasource.config.ConfigManager
|
||||
import com.tangem.lib.auth.AuthProvider
|
||||
import com.tangem.lib.auth.BasicAuthProvider
|
||||
import com.tangem.tap.network.auth.AuthProviderImpl
|
||||
import com.tangem.tap.network.auth.TangemBasicAuthProvider
|
||||
import com.tangem.tap.proxy.AppStateHolder
|
||||
|
|
@ -23,7 +24,7 @@ class AuthModule {
|
|||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideTangemBasicAuthProvider(configManager: ConfigManager): com.tangem.lib.auth.BasicAuthProvider {
|
||||
fun provideTangemBasicAuthProvider(configManager: ConfigManager): BasicAuthProvider {
|
||||
return TangemBasicAuthProvider(configManager.config.tangemComAuthorization)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue