Updated on 2026-08-14

This commit is contained in:
Tangem 2026-01-08 17:55:28 +03:00
parent 61b848204f
commit 930e6ffc72
8 changed files with 20 additions and 17 deletions

@ -1 +1 @@
Subproject commit 78be297b0f09bc2be1e9b0fbab9384f17bf94c37
Subproject commit 5ba0959d72f41e49a22f792e9a3d53e5e24e7713

View file

@ -63,13 +63,8 @@ internal class DefaultAuthProvider(
return ProviderSuspend {
when (apiEnvironment.invoke()) {
ApiEnvironment.DEV,
ApiEnvironment.DEV_2,
ApiEnvironment.DEV_3,
-> environmentConfigStorage.getConfigSync().tangemApiKeyDev // TODO add gaslessTxApiKeyDev
ApiEnvironment.STAGE,
ApiEnvironment.STAGE_2,
-> environmentConfigStorage.getConfigSync().tangemApiKeyStage // TODO add gaslessTxApiKeyStage
ApiEnvironment.PROD -> environmentConfigStorage.getConfigSync().tangemApiKey // TODO add gaslessTxApiKey
-> environmentConfigStorage.getConfigSync().gaslessTxApiKeyDev
ApiEnvironment.PROD -> environmentConfigStorage.getConfigSync().gaslessTxApiKey
else -> error("No gasless tx api config provided for ${apiEnvironment.invoke()}")
} ?: error("No gasless tx api config provided")
}

View file

@ -60,7 +60,7 @@ internal class GaslessTxService(
}
private companion object {
private const val PROD_BASE_URL = "https://api.tangem.org/"
private const val PROD_BASE_URL = "https://gasless.tangem.org/"
private const val DEV_BASE_URL = "[REDACTED_ENV_URL]"
}
}

View file

@ -25,4 +25,6 @@ data class EnvironmentConfig(
val yieldModuleApiKey: String? = null,
val yieldModuleApiKeyDev: String? = null,
val bffStaticToken: String? = null,
val gaslessTxApiKeyDev: String? = null,
val gaslessTxApiKey: String? = null,
)

View file

@ -33,6 +33,8 @@ internal object EnvironmentConfigConverter : Converter<EnvironmentConfigModel, E
yieldModuleApiKey = value.yieldModuleApiKey,
yieldModuleApiKeyDev = value.yieldModuleApiKeyDev,
bffStaticToken = value.bffStaticToken,
gaslessTxApiKeyDev = value.gaslessTxApiKeyDev,
gaslessTxApiKey = value.gaslessTxApiKey,
)
}
}

View file

@ -52,6 +52,8 @@ class EnvironmentConfigModel(
@Json(name = "blinkApiKey") val blinkApiKey: String?,
@Json(name = "tatumApiKey") val tatumApiKey: String?,
@Json(name = "bffStaticToken") val bffStaticToken: String?,
@Json(name = "gaslessTxApiKeyDev") val gaslessTxApiKeyDev: String?,
@Json(name = "gaslessTxApiKey") val gaslessTxApiKey: String?,
)
@JsonClass(generateAdapter = true)

View file

@ -296,7 +296,7 @@ internal class ProdApiConfigsManagerTest {
INTERNAL_BUILD_TYPE,
EXTERNAL_BUILD_TYPE,
RELEASE_BUILD_TYPE,
-> ApiEnvironment.PROD to "https://tangem.com/"
-> ApiEnvironment.PROD to "https://gasless.tangem.org/"
else -> error("Unknown build type [${BuildConfig.BUILD_TYPE}]")
}
return TestModel(

View file

@ -2,10 +2,11 @@ package com.tangem.data.transaction.di
import com.tangem.data.common.currency.ResponseCryptoCurrenciesFactory
import com.tangem.data.transaction.DefaultFeeRepository
import com.tangem.data.transaction.DefaultGaslessTransactionRepository
import com.tangem.data.transaction.DefaultTransactionRepository
import com.tangem.data.transaction.DefaultWalletAddressServiceRepository
import com.tangem.data.transaction.MockedGaslessTransactionRepository
import com.tangem.data.transaction.error.DefaultFeeErrorResolver
import com.tangem.datasource.api.gasless.GaslessTxServiceApi
import com.tangem.datasource.api.tangemTech.TangemTechApi
import com.tangem.datasource.local.walletmanager.WalletManagersStore
import com.tangem.domain.demo.models.DemoConfig
@ -73,12 +74,13 @@ internal object TransactionDataModule {
@Singleton
fun provideGaslessTransactionRepository(
responseCryptoCurrenciesFactory: ResponseCryptoCurrenciesFactory,
gaslessTxServiceApi: GaslessTxServiceApi,
coroutineDispatcherProvider: CoroutineDispatcherProvider,
): GaslessTransactionRepository {
return MockedGaslessTransactionRepository(responseCryptoCurrenciesFactory)
// return DefaultGaslessTransactionRepository(
// gaslessTxServiceApi,
// coroutineDispatcherProvider,
// responseCryptoCurrenciesFactory,
// )
return DefaultGaslessTransactionRepository(
gaslessTxServiceApi,
coroutineDispatcherProvider,
responseCryptoCurrenciesFactory,
)
}
}