Updated on 2026-08-14
This commit is contained in:
parent
3e79411138
commit
297a006e3d
11 changed files with 351 additions and 1 deletions
|
|
@ -0,0 +1,47 @@
|
|||
package com.tangem.data.managetokens
|
||||
|
||||
import com.tangem.domain.managetokens.model.AddCustomTokenForm
|
||||
import com.tangem.domain.managetokens.repository.CustomTokensRepository
|
||||
import com.tangem.domain.tokens.model.CryptoCurrency
|
||||
import com.tangem.domain.tokens.model.Network
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
|
||||
internal class DefaultCustomTokensRepository : CustomTokensRepository {
|
||||
|
||||
override suspend fun validateContractAddress(contractAddress: String, networkId: Network.ID): Boolean {
|
||||
TODO("Should be implemented in [REDACTED_JIRA]")
|
||||
}
|
||||
|
||||
override suspend fun isCurrencyNotAdded(
|
||||
userWalletId: UserWalletId,
|
||||
networkId: Network.ID,
|
||||
derivationPath: Network.DerivationPath,
|
||||
contractAddress: String?,
|
||||
): Boolean {
|
||||
TODO("Should be implemented in [REDACTED_JIRA]")
|
||||
}
|
||||
|
||||
override suspend fun findToken(
|
||||
userWalletId: UserWalletId,
|
||||
contractAddress: String,
|
||||
networkId: Network.ID,
|
||||
derivationPath: Network.DerivationPath,
|
||||
): CryptoCurrency.Token? {
|
||||
TODO("Should be implemented in [REDACTED_JIRA]")
|
||||
}
|
||||
|
||||
override suspend fun createCoin(
|
||||
networkId: Network.ID,
|
||||
derivationPath: Network.DerivationPath,
|
||||
): CryptoCurrency.Coin {
|
||||
TODO("Should be implemented in [REDACTED_JIRA]")
|
||||
}
|
||||
|
||||
override suspend fun createCustomToken(
|
||||
networkId: Network.ID,
|
||||
derivationPath: Network.DerivationPath,
|
||||
formValues: AddCustomTokenForm.Validated.All,
|
||||
): CryptoCurrency.Token {
|
||||
TODO("Should be implemented in [REDACTED_JIRA]")
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
package com.tangem.data.managetokens.di
|
||||
|
||||
import com.tangem.data.managetokens.DefaultCustomTokensRepository
|
||||
import com.tangem.data.managetokens.DefaultManageTokensRepository
|
||||
import com.tangem.data.managetokens.utils.ManageTokensUpdateFetcher
|
||||
import com.tangem.data.managetokens.utils.ManagedCryptoCurrencyFactory
|
||||
import com.tangem.datasource.api.tangemTech.TangemTechApi
|
||||
import com.tangem.datasource.local.preferences.AppPreferencesStore
|
||||
import com.tangem.datasource.local.userwallet.UserWalletsStore
|
||||
import com.tangem.domain.managetokens.repository.CustomTokensRepository
|
||||
import com.tangem.domain.managetokens.repository.ManageTokensRepository
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import dagger.Module
|
||||
|
|
@ -37,4 +39,10 @@ internal object ManageTokensDataModule {
|
|||
dispatchers,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideCustomTokensRepository(): CustomTokensRepository {
|
||||
return DefaultCustomTokensRepository()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue