Updated on 2026-08-14
This commit is contained in:
parent
6256f4ed23
commit
68297064be
19 changed files with 80 additions and 158 deletions
|
|
@ -102,7 +102,6 @@ internal class SendDestinationModel @Inject constructor(
|
|||
|
||||
private val contacts: StateFlow<List<Contact>> =
|
||||
getVerifiedContactsInteractor.getVerifiedContacts(query = "", userWalletId = null)
|
||||
.map { verified -> verified.map { it.contact } }
|
||||
.flowOn(dispatchers.default)
|
||||
.stateIn(modelScope, SharingStarted.Eagerly, emptyList())
|
||||
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ internal class SendDestinationModelTest {
|
|||
validateWalletAddressUseCase(any(), any(), any(), any<List<CryptoCurrencyAddress>>(), any())
|
||||
} returns AddressValidation.Success.Valid.right()
|
||||
every { getVerifiedContactsInteractor.getVerifiedContacts(any(), any()) } returns
|
||||
flowOf(listOf(verified(buildContact(name = model.savedName, address = model.savedAddress))))
|
||||
flowOf(listOf(buildContact(name = model.savedName, address = model.savedAddress)))
|
||||
val sut = buildModel()
|
||||
advanceUntilIdle()
|
||||
|
||||
|
|
@ -476,7 +476,7 @@ internal class SendDestinationModelTest {
|
|||
validateWalletAddressUseCase(any(), any(), any(), any<List<CryptoCurrencyAddress>>(), any())
|
||||
} returns AddressValidation.Success.Valid.right()
|
||||
every { getVerifiedContactsInteractor.getVerifiedContacts(any(), any()) } returns
|
||||
flowOf(model.savedAddresses.map { verified(buildContact(address = it)) })
|
||||
flowOf(model.savedAddresses.map { buildContact(address = it) })
|
||||
val sut = buildBlockModel(isAddContactAvailable = model.isAddContactAvailable)
|
||||
advanceUntilIdle()
|
||||
|
||||
|
|
@ -608,9 +608,6 @@ internal class SendDestinationModelTest {
|
|||
)
|
||||
}
|
||||
|
||||
private fun verified(contact: Contact): VerifiedContact =
|
||||
VerifiedContact(contact = contact, invalidEntries = emptyList())
|
||||
|
||||
private fun buildContact(name: String = "Alice", address: String = "0xAddr"): Contact = Contact(
|
||||
id = ContactId("c1"),
|
||||
walletId = testUserWalletId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue