Updated on 2026-08-14
This commit is contained in:
parent
82f95f3e51
commit
a2b09c6d37
4 changed files with 80 additions and 4 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit f5a90466d2245ca5cfde59b49dc7fa82a6b7cbc2
|
Subproject commit 2a612cd92b1c78b99c917d0fe66342831f801e5e
|
||||||
|
|
@ -90,7 +90,7 @@ internal class ConfigManagerImpl @Inject constructor() : ConfigManager {
|
||||||
infuraProjectId = configValues.infuraProjectId,
|
infuraProjectId = configValues.infuraProjectId,
|
||||||
tronGridApiKey = configValues.tronGridApiKey,
|
tronGridApiKey = configValues.tronGridApiKey,
|
||||||
nowNodeCredentials = NowNodeCredentials(configValues.nowNodesApiKey),
|
nowNodeCredentials = NowNodeCredentials(configValues.nowNodesApiKey),
|
||||||
getBlockCredentials = GetBlockCredentials(configValues.getBlockApiKey),
|
getBlockCredentials = createGetBlockCredentials(configValues),
|
||||||
kaspaSecondaryApiUrl = configValues.kaspaSecondaryApiUrl,
|
kaspaSecondaryApiUrl = configValues.kaspaSecondaryApiUrl,
|
||||||
tonCenterCredentials = TonCenterCredentials(
|
tonCenterCredentials = TonCenterCredentials(
|
||||||
mainnetApiKey = configValues.tonCenterKeys.mainnet,
|
mainnetApiKey = configValues.tonCenterKeys.mainnet,
|
||||||
|
|
@ -109,4 +109,45 @@ internal class ConfigManagerImpl @Inject constructor() : ConfigManager {
|
||||||
tangemExpressApiKey = configValues.tangemExpressApiKey,
|
tangemExpressApiKey = configValues.tangemExpressApiKey,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun createGetBlockCredentials(configValues: ConfigValueModel): GetBlockCredentials? {
|
||||||
|
return configValues.getBlockAccessTokens?.let { accessTokens ->
|
||||||
|
GetBlockCredentials(
|
||||||
|
xrp = GetBlockAccessToken(jsonRpc = accessTokens.xrp?.jsonRPC),
|
||||||
|
cardano = GetBlockAccessToken(rosetta = accessTokens.cardano?.rosetta),
|
||||||
|
avalanche = GetBlockAccessToken(jsonRpc = accessTokens.avalanche?.jsonRPC),
|
||||||
|
eth = GetBlockAccessToken(jsonRpc = accessTokens.eth?.jsonRPC),
|
||||||
|
etc = GetBlockAccessToken(jsonRpc = accessTokens.etc?.jsonRPC),
|
||||||
|
fantom = GetBlockAccessToken(jsonRpc = accessTokens.fantom?.jsonRPC),
|
||||||
|
rsk = GetBlockAccessToken(jsonRpc = accessTokens.rsk?.jsonRPC),
|
||||||
|
bsc = GetBlockAccessToken(jsonRpc = accessTokens.bsc?.jsonRPC),
|
||||||
|
polygon = GetBlockAccessToken(jsonRpc = accessTokens.polygon?.jsonRPC),
|
||||||
|
gnosis = GetBlockAccessToken(jsonRpc = accessTokens.gnosis?.jsonRPC),
|
||||||
|
cronos = GetBlockAccessToken(jsonRpc = accessTokens.cronos?.jsonRPC),
|
||||||
|
solana = GetBlockAccessToken(jsonRpc = accessTokens.solana?.jsonRPC),
|
||||||
|
stellar = GetBlockAccessToken(rest = accessTokens.stellar?.rest),
|
||||||
|
ton = GetBlockAccessToken(jsonRpc = accessTokens.ton?.jsonRPC),
|
||||||
|
tron = GetBlockAccessToken(rest = accessTokens.tron?.rest),
|
||||||
|
cosmos = GetBlockAccessToken(rest = accessTokens.cosmos?.rest),
|
||||||
|
near = GetBlockAccessToken(jsonRpc = accessTokens.near?.jsonRPC),
|
||||||
|
luna = GetBlockAccessToken(rest = accessTokens.luna?.rest),
|
||||||
|
dogecoin = GetBlockAccessToken(
|
||||||
|
jsonRpc = accessTokens.dogecoin?.jsonRPC,
|
||||||
|
blockBookRest = accessTokens.dogecoin?.blockBookRest,
|
||||||
|
),
|
||||||
|
litecoin = GetBlockAccessToken(
|
||||||
|
jsonRpc = accessTokens.litecoin?.jsonRPC,
|
||||||
|
blockBookRest = accessTokens.litecoin?.blockBookRest,
|
||||||
|
),
|
||||||
|
dash = GetBlockAccessToken(
|
||||||
|
jsonRpc = accessTokens.dash?.jsonRPC,
|
||||||
|
blockBookRest = accessTokens.dash?.blockBookRest,
|
||||||
|
),
|
||||||
|
bitcoin = GetBlockAccessToken(
|
||||||
|
jsonRpc = accessTokens.bitcoin?.jsonRPC,
|
||||||
|
blockBookRest = accessTokens.bitcoin?.blockBookRest,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.tangem.datasource.config.models
|
package com.tangem.datasource.config.models
|
||||||
|
|
||||||
import com.squareup.moshi.Json
|
import com.squareup.moshi.Json
|
||||||
|
import com.squareup.moshi.JsonClass
|
||||||
|
|
||||||
/**
|
/**
|
||||||
[REDACTED_AUTHOR]
|
[REDACTED_AUTHOR]
|
||||||
|
|
@ -25,7 +26,7 @@ class ConfigValueModel(
|
||||||
val bscQuiknodeSubdomain: String,
|
val bscQuiknodeSubdomain: String,
|
||||||
val bscQuiknodeApiKey: String,
|
val bscQuiknodeApiKey: String,
|
||||||
val nowNodesApiKey: String,
|
val nowNodesApiKey: String,
|
||||||
val getBlockApiKey: String,
|
@Json(name = "getBlockAccessTokens") val getBlockAccessTokens: GetBlockAccessTokens?,
|
||||||
@Json(name = "tonCenterApiKey") val tonCenterKeys: TonCenterKeys,
|
@Json(name = "tonCenterApiKey") val tonCenterKeys: TonCenterKeys,
|
||||||
val blockcypherTokens: Set<String>?,
|
val blockcypherTokens: Set<String>?,
|
||||||
val infuraProjectId: String?,
|
val infuraProjectId: String?,
|
||||||
|
|
@ -43,6 +44,40 @@ class ConfigValueModel(
|
||||||
val tangemExpressApiKey: String,
|
val tangemExpressApiKey: String,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@JsonClass(generateAdapter = true)
|
||||||
|
data class GetBlockAccessTokens(
|
||||||
|
@Json(name = "xrp") val xrp: GetBlockToken?,
|
||||||
|
@Json(name = "cardano") val cardano: GetBlockToken?,
|
||||||
|
@Json(name = "avalanche") val avalanche: GetBlockToken?,
|
||||||
|
@Json(name = "ethereum") val eth: GetBlockToken?,
|
||||||
|
@Json(name = "ethereumClassic") val etc: GetBlockToken?,
|
||||||
|
@Json(name = "fantom") val fantom: GetBlockToken?,
|
||||||
|
@Json(name = "rsk") val rsk: GetBlockToken?,
|
||||||
|
@Json(name = "bsc") val bsc: GetBlockToken?,
|
||||||
|
@Json(name = "polygon") val polygon: GetBlockToken?,
|
||||||
|
@Json(name = "xdai") val gnosis: GetBlockToken?,
|
||||||
|
@Json(name = "cronos") val cronos: GetBlockToken?,
|
||||||
|
@Json(name = "solana") val solana: GetBlockToken?,
|
||||||
|
@Json(name = "stellar") val stellar: GetBlockToken?,
|
||||||
|
@Json(name = "ton") val ton: GetBlockToken?,
|
||||||
|
@Json(name = "tron") val tron: GetBlockToken?,
|
||||||
|
@Json(name = "cosmos-hub") val cosmos: GetBlockToken?,
|
||||||
|
@Json(name = "near") val near: GetBlockToken?,
|
||||||
|
@Json(name = "terra-2") val luna: GetBlockToken?,
|
||||||
|
@Json(name = "dogecoin") val dogecoin: GetBlockToken?,
|
||||||
|
@Json(name = "litecoin") val litecoin: GetBlockToken?,
|
||||||
|
@Json(name = "dash") val dash: GetBlockToken?,
|
||||||
|
@Json(name = "bitcoin") val bitcoin: GetBlockToken?,
|
||||||
|
)
|
||||||
|
|
||||||
|
@JsonClass(generateAdapter = true)
|
||||||
|
data class GetBlockToken(
|
||||||
|
@Json(name = "jsonRpc") val jsonRPC: String?,
|
||||||
|
@Json(name = "blockBookRest") val blockBookRest: String?,
|
||||||
|
@Json(name = "rest") val rest: String?,
|
||||||
|
@Json(name = "rosetta") val rosetta: String?,
|
||||||
|
)
|
||||||
|
|
||||||
data class AppsFlyer(
|
data class AppsFlyer(
|
||||||
val appsFlyerDevKey: String,
|
val appsFlyerDevKey: String,
|
||||||
val appsFlyerAppID: String,
|
val appsFlyerAppID: String,
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ spr-client = "3.6.2"
|
||||||
# endregion Other libraries
|
# endregion Other libraries
|
||||||
|
|
||||||
# region Tangem
|
# region Tangem
|
||||||
tangemBlockchainSdk = "develop-394"
|
tangemBlockchainSdk = "develop-396"
|
||||||
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
|
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
|
||||||
tangemCardSdk = "develop-312"
|
tangemCardSdk = "develop-312"
|
||||||
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds
|
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue