Updated on 2026-08-14
This commit is contained in:
commit
d243f6f01b
33 changed files with 236 additions and 56 deletions
17
domain/src/main/java/com/tangem/domain/common/LogConfig.kt
Normal file
17
domain/src/main/java/com/tangem/domain/common/LogConfig.kt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package com.tangem.domain.common
|
||||
|
||||
import com.tangem.domain.features.BuildConfig
|
||||
|
||||
object LogConfig {
|
||||
val imageLoader: Boolean = false
|
||||
val storeAction: Boolean = BuildConfig.DEBUG
|
||||
val zendesk: Boolean = false
|
||||
val network: NetworkLogConfig = NetworkLogConfig
|
||||
}
|
||||
|
||||
object NetworkLogConfig {
|
||||
val mercuryoService: Boolean = false
|
||||
val moonPayService: Boolean = false
|
||||
val tangemTechService: Boolean = BuildConfig.DEBUG
|
||||
val blockchainSdkNetwork: Boolean = BuildConfig.DEBUG
|
||||
}
|
||||
|
|
@ -41,6 +41,9 @@ fun Blockchain.Companion.fromNetworkId(networkId: String): Blockchain? {
|
|||
"polkadot" -> Blockchain.Polkadot
|
||||
"polkadot/test" -> Blockchain.PolkadotTestnet
|
||||
"kusama" -> Blockchain.Kusama
|
||||
"optimistic-ethereum" -> Blockchain.Optimism
|
||||
"optimistic-ethereum/test" -> Blockchain.OptimismTestnet
|
||||
"dash" -> Blockchain.Dash
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
|
@ -86,6 +89,9 @@ fun Blockchain.toNetworkId(): String {
|
|||
Blockchain.Polkadot -> "polkadot"
|
||||
Blockchain.PolkadotTestnet -> "polkadot/test"
|
||||
Blockchain.Kusama -> "kusama"
|
||||
Blockchain.Optimism -> "optimistic-ethereum"
|
||||
Blockchain.OptimismTestnet -> "optimistic-ethereum/test"
|
||||
Blockchain.Dash -> "dash"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -113,6 +119,8 @@ fun Blockchain.toCoinId(): String {
|
|||
Blockchain.Dogecoin -> "dogecoin"
|
||||
Blockchain.Gnosis -> "xdai"
|
||||
Blockchain.Kusama -> "kusama"
|
||||
Blockchain.Optimism, Blockchain.OptimismTestnet -> "ethereum"
|
||||
Blockchain.Dash -> "dash"
|
||||
Blockchain.Unknown -> "unknown"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.domain.redux.global
|
||||
|
||||
import com.tangem.domain.DomainDialog
|
||||
import com.tangem.domain.common.LogConfig
|
||||
import com.tangem.domain.common.ScanResponse
|
||||
import com.tangem.network.api.tangemTech.TangemTechService
|
||||
|
||||
|
|
@ -17,5 +18,5 @@ data class DomainGlobalState(
|
|||
)
|
||||
|
||||
data class NetworkServices(
|
||||
val tangemTechService: TangemTechService = TangemTechService()
|
||||
val tangemTechService: TangemTechService = TangemTechService(LogConfig.network.tangemTechService)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue