Updated on 2026-08-14

This commit is contained in:
Tangem 2026-01-12 10:20:23 +03:00
parent 4f88a5ddf9
commit ebb562b2a0
21 changed files with 81 additions and 41 deletions

View file

@ -30,11 +30,6 @@ class DefaultGaslessTransactionRepository(
private val gaslessTransactionRequestBuilder = GaslessTransactionRequestBuilder()
private val signedTransactionResultConverter = GaslessSignedTransactionResultConverter()
override fun isNetworkSupported(network: Network): Boolean {
val blockchain = Blockchain.fromId(network.rawId)
return SUPPORTED_BLOCKCHAINS.contains(blockchain)
}
override suspend fun getSupportedTokens(network: Network): Set<CryptoCurrency> {
return withContext(coroutineDispatcherProvider.io) {
val storedTokens = supportedTokensState.value[network.id]
@ -118,14 +113,5 @@ class DefaultGaslessTransactionRepository(
const val TOKEN_RECEIVER_ADDRESS = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
val BASE_GAS_FOR_TRANSACTION: BigInteger = BigInteger("100000")
val SUPPORTED_BLOCKCHAINS = arrayOf(
Blockchain.Ethereum,
Blockchain.BSC,
Blockchain.Base,
Blockchain.Polygon,
Blockchain.Arbitrum,
Blockchain.XDC,
Blockchain.Optimism,
)
}
}

View file

@ -15,11 +15,6 @@ class MockedGaslessTransactionRepository(
private val responseCryptoCurrenciesFactory: ResponseCryptoCurrenciesFactory,
) : GaslessTransactionRepository {
override fun isNetworkSupported(network: Network): Boolean {
val blockchain = Blockchain.fromId(network.rawId)
return SUPPORTED_BLOCKCHAINS.contains(blockchain)
}
override suspend fun getSupportedTokens(network: Network): Set<CryptoCurrency> {
val usdcPolygon = responseCryptoCurrenciesFactory.createToken(
blockchain = Blockchain.Polygon,