Updated on 2026-08-14
This commit is contained in:
parent
8af93ac94e
commit
bbf2b14479
2 changed files with 7 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ import com.tangem.datasource.utils.KotlinxDataStoreSerializer
|
||||||
import com.tangem.domain.addressbook.crypto.AddressBookCipher
|
import com.tangem.domain.addressbook.crypto.AddressBookCipher
|
||||||
import com.tangem.domain.addressbook.repository.AddressBookRepository
|
import com.tangem.domain.addressbook.repository.AddressBookRepository
|
||||||
import com.tangem.domain.addressbook.time.IsoTimestampProvider
|
import com.tangem.domain.addressbook.time.IsoTimestampProvider
|
||||||
|
import com.tangem.domain.addressbook.usecase.GetContactsUseCase
|
||||||
import com.tangem.domain.common.wallets.UserWalletsListRepository
|
import com.tangem.domain.common.wallets.UserWalletsListRepository
|
||||||
import com.tangem.utils.coroutines.AppCoroutineScope
|
import com.tangem.utils.coroutines.AppCoroutineScope
|
||||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||||
|
|
@ -65,4 +66,9 @@ internal object AddressBookDataModule {
|
||||||
dispatchers = dispatchers,
|
dispatchers = dispatchers,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
fun provideGetContactsUseCase(repository: AddressBookRepository): GetContactsUseCase =
|
||||||
|
GetContactsUseCase(repository)
|
||||||
}
|
}
|
||||||
|
|
@ -73,7 +73,7 @@ internal class ContactMatcherTest {
|
||||||
assertThat(result.single().icon.color).isEqualTo(CryptoPortfolioIcon.Color.Azure)
|
assertThat(result.single().icon.color).isEqualTo(CryptoPortfolioIcon.Color.Azure)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun contact(name: String, vararg entries: AddressEntry, iconColor: String = "Azure"): Contact = Contact(
|
private fun contact(name: String, vararg entries: AddressEntry): Contact = Contact(
|
||||||
id = ContactId(name),
|
id = ContactId(name),
|
||||||
walletId = UserWalletId(stringValue = "0001"),
|
walletId = UserWalletId(stringValue = "0001"),
|
||||||
name = requireNotNull(ContactName(name).getOrNull()) { "invalid test name" },
|
name = requireNotNull(ContactName(name).getOrNull()) { "invalid test name" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue