From f942073ff146292a409f76ce674de80a57018a17 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 21 May 2025 17:02:18 +0400 Subject: [PATCH] Updated on 2026-08-14 --- data/networks/build.gradle.kts | 15 +++------------ .../repository/DefaultNetworksRepository.kt | 2 +- .../repository/DefaultNetworksRepositoryTest.kt | 2 +- .../models/network/CryptoCurrencyAddress.kt | 11 +++++++++++ domain/networks/build.gradle.kts | 1 - .../networks/repository/NetworksRepository.kt | 2 +- .../domain/tokens/model/CryptoCurrencyAddress.kt | 8 -------- .../domain/tokens/GetNetworkAddressesUseCase.kt | 2 +- .../usecase/ValidateWalletAddressUseCase.kt | 2 +- .../destination/model/SendDestinationModel.kt | 2 +- 10 files changed, 20 insertions(+), 27 deletions(-) create mode 100644 domain/models/src/main/kotlin/com/tangem/domain/models/network/CryptoCurrencyAddress.kt delete mode 100644 domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/CryptoCurrencyAddress.kt diff --git a/data/networks/build.gradle.kts b/data/networks/build.gradle.kts index 510981e800..29b5a5ce2d 100644 --- a/data/networks/build.gradle.kts +++ b/data/networks/build.gradle.kts @@ -24,25 +24,15 @@ dependencies { // endregion // region Project - Domain - implementation(projects.domain.core) - implementation(projects.domain.demo) implementation(projects.domain.legacy) - implementation(projects.domain.models) + api(projects.domain.models) implementation(projects.domain.networks) - implementation(projects.domain.tokens.models) - implementation(projects.domain.txhistory.models) - implementation(projects.domain.wallets) - implementation(projects.domain.wallets.models) // endregion // region Project - Libs implementation(projects.libs.blockchainSdk) // endregion - // region Tangem libraries - implementation(tangemDeps.blockchain) - // endregion - // region DI implementation(deps.hilt.android) kapt(deps.hilt.kapt) @@ -60,7 +50,8 @@ dependencies { testRuntimeOnly(deps.test.junit5.engine) testImplementation(deps.test.mockk) testImplementation(deps.test.truth) - testImplementation(projects.common.test) + testImplementation(tangemDeps.blockchain) testImplementation(tangemDeps.card.core) + testImplementation(projects.common.test) // endregion } \ No newline at end of file diff --git a/data/networks/src/main/java/com/tangem/data/networks/repository/DefaultNetworksRepository.kt b/data/networks/src/main/java/com/tangem/data/networks/repository/DefaultNetworksRepository.kt index dfd95fb579..b227456dc7 100644 --- a/data/networks/src/main/java/com/tangem/data/networks/repository/DefaultNetworksRepository.kt +++ b/data/networks/src/main/java/com/tangem/data/networks/repository/DefaultNetworksRepository.kt @@ -5,9 +5,9 @@ import com.tangem.data.networks.store.NetworksStatusesStoreV2 import com.tangem.data.networks.store.storeStatus import com.tangem.data.networks.utils.NetworkStatusFactory import com.tangem.domain.models.currency.CryptoCurrency +import com.tangem.domain.models.network.CryptoCurrencyAddress import com.tangem.domain.models.network.Network import com.tangem.domain.networks.repository.NetworksRepository -import com.tangem.domain.tokens.model.CryptoCurrencyAddress import com.tangem.domain.walletmanager.WalletManagersFacade import com.tangem.domain.wallets.models.UserWalletId import com.tangem.utils.coroutines.CoroutineDispatcherProvider diff --git a/data/networks/src/test/java/com/tangem/data/networks/repository/DefaultNetworksRepositoryTest.kt b/data/networks/src/test/java/com/tangem/data/networks/repository/DefaultNetworksRepositoryTest.kt index 5a861212a6..adc8708086 100644 --- a/data/networks/src/test/java/com/tangem/data/networks/repository/DefaultNetworksRepositoryTest.kt +++ b/data/networks/src/test/java/com/tangem/data/networks/repository/DefaultNetworksRepositoryTest.kt @@ -7,8 +7,8 @@ import com.tangem.data.common.currency.CardCryptoCurrencyFactory import com.tangem.data.networks.store.NetworksStatusesStoreV2 import com.tangem.data.networks.store.storeStatus import com.tangem.data.networks.utils.NetworkStatusFactory +import com.tangem.domain.models.network.CryptoCurrencyAddress import com.tangem.domain.models.network.NetworkStatus -import com.tangem.domain.tokens.model.CryptoCurrencyAddress import com.tangem.domain.walletmanager.WalletManagersFacade import com.tangem.domain.walletmanager.model.UpdateWalletManagerResult import com.tangem.domain.wallets.models.UserWalletId diff --git a/domain/models/src/main/kotlin/com/tangem/domain/models/network/CryptoCurrencyAddress.kt b/domain/models/src/main/kotlin/com/tangem/domain/models/network/CryptoCurrencyAddress.kt new file mode 100644 index 0000000000..134ff786d6 --- /dev/null +++ b/domain/models/src/main/kotlin/com/tangem/domain/models/network/CryptoCurrencyAddress.kt @@ -0,0 +1,11 @@ +package com.tangem.domain.models.network + +import com.tangem.domain.models.currency.CryptoCurrency + +/** + * Crypto currency address + * + * @property cryptoCurrency crypto currency + * @property address default address + */ +data class CryptoCurrencyAddress(val cryptoCurrency: CryptoCurrency, val address: String) \ No newline at end of file diff --git a/domain/networks/build.gradle.kts b/domain/networks/build.gradle.kts index b2abb1809c..46f153a39a 100644 --- a/domain/networks/build.gradle.kts +++ b/domain/networks/build.gradle.kts @@ -6,6 +6,5 @@ plugins { dependencies { api(projects.domain.core) api(projects.domain.models) - api(projects.domain.tokens.models) api(projects.domain.wallets.models) } \ No newline at end of file diff --git a/domain/networks/src/main/java/com/tangem/domain/networks/repository/NetworksRepository.kt b/domain/networks/src/main/java/com/tangem/domain/networks/repository/NetworksRepository.kt index 8ed34719f8..43cc7b6554 100644 --- a/domain/networks/src/main/java/com/tangem/domain/networks/repository/NetworksRepository.kt +++ b/domain/networks/src/main/java/com/tangem/domain/networks/repository/NetworksRepository.kt @@ -1,7 +1,7 @@ package com.tangem.domain.networks.repository +import com.tangem.domain.models.network.CryptoCurrencyAddress import com.tangem.domain.models.network.Network -import com.tangem.domain.tokens.model.CryptoCurrencyAddress import com.tangem.domain.wallets.models.UserWalletId /** diff --git a/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/CryptoCurrencyAddress.kt b/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/CryptoCurrencyAddress.kt deleted file mode 100644 index b49342fb24..0000000000 --- a/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/CryptoCurrencyAddress.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.tangem.domain.tokens.model - -import com.tangem.domain.models.currency.CryptoCurrency - -data class CryptoCurrencyAddress( - val cryptoCurrency: CryptoCurrency, - val address: String, -) \ No newline at end of file diff --git a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetNetworkAddressesUseCase.kt b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetNetworkAddressesUseCase.kt index 14cf191fce..8bce462ec2 100644 --- a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetNetworkAddressesUseCase.kt +++ b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetNetworkAddressesUseCase.kt @@ -1,8 +1,8 @@ package com.tangem.domain.tokens +import com.tangem.domain.models.network.CryptoCurrencyAddress import com.tangem.domain.models.network.Network import com.tangem.domain.networks.repository.NetworksRepository -import com.tangem.domain.tokens.model.CryptoCurrencyAddress import com.tangem.domain.wallets.models.UserWalletId class GetNetworkAddressesUseCase( diff --git a/domain/transaction/src/main/java/com/tangem/domain/transaction/usecase/ValidateWalletAddressUseCase.kt b/domain/transaction/src/main/java/com/tangem/domain/transaction/usecase/ValidateWalletAddressUseCase.kt index ae3dfce58a..fda7a4282b 100644 --- a/domain/transaction/src/main/java/com/tangem/domain/transaction/usecase/ValidateWalletAddressUseCase.kt +++ b/domain/transaction/src/main/java/com/tangem/domain/transaction/usecase/ValidateWalletAddressUseCase.kt @@ -2,9 +2,9 @@ package com.tangem.domain.transaction.usecase import arrow.core.left import arrow.core.right +import com.tangem.domain.models.network.CryptoCurrencyAddress import com.tangem.domain.models.network.Network import com.tangem.domain.models.network.NetworkAddress -import com.tangem.domain.tokens.model.CryptoCurrencyAddress import com.tangem.domain.transaction.WalletAddressServiceRepository import com.tangem.domain.transaction.error.AddressValidation import com.tangem.domain.transaction.error.AddressValidationResult diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt index 16dbe408d7..e61b03c0c3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt @@ -9,12 +9,12 @@ import com.tangem.core.decompose.model.Model import com.tangem.core.decompose.model.ParamsContainer import com.tangem.core.decompose.navigation.Router import com.tangem.core.ui.extensions.resourceReference +import com.tangem.domain.models.network.CryptoCurrencyAddress import com.tangem.domain.qrscanning.models.SourceType import com.tangem.domain.qrscanning.usecases.ListenToQrScanningUseCase import com.tangem.domain.qrscanning.usecases.ParseQrCodeUseCase import com.tangem.domain.tokens.GetCryptoCurrencyUseCase import com.tangem.domain.tokens.GetNetworkAddressesUseCase -import com.tangem.domain.tokens.model.CryptoCurrencyAddress import com.tangem.domain.transaction.usecase.IsUtxoConsolidationAvailableUseCase import com.tangem.domain.transaction.usecase.ValidateWalletAddressUseCase import com.tangem.domain.transaction.usecase.ValidateWalletMemoUseCase