diff --git a/data/address-book/src/main/kotlin/com/tangem/data/addressbook/DefaultAddressBookRepository.kt b/data/address-book/src/main/kotlin/com/tangem/data/addressbook/DefaultAddressBookRepository.kt index 698016db78..430c58f6b5 100644 --- a/data/address-book/src/main/kotlin/com/tangem/data/addressbook/DefaultAddressBookRepository.kt +++ b/data/address-book/src/main/kotlin/com/tangem/data/addressbook/DefaultAddressBookRepository.kt @@ -46,6 +46,8 @@ internal class DefaultAddressBookRepository( private val writeMutex = Mutex() + private val logger = TangemLogger.withTag(LOG_TAG) + override fun getContacts(userWalletId: UserWalletId): Flow> { return getContactsForWallet(userWalletId) .onStart { syncAddressBooks() } @@ -124,6 +126,9 @@ internal class DefaultAddressBookRepository( override suspend fun syncAddressBooks(): Either = withContext(dispatchers.default) { val wallets = userWalletsListRepository.userWalletsSync() + // Debug (Logcat only, dev builds) — the persisted prod log stays quiet on the happy path; only failures + // below are written at Error level. + logger.d("Syncing address books for ${wallets.size} wallet(s)") // The backend rejects more than MAX_SYNC_WALLETS per request, so sync in chunks and stop on the // first failed chunk. wallets.chunked(MAX_SYNC_WALLETS) @@ -145,22 +150,38 @@ internal class DefaultAddressBookRepository( call = { val response = withContext(dispatchers.io) { addressBookApi.syncAddressBooks(request).bind() } // Only wallets whose etag changed are returned; the rest keep their local copy. + logger.d("Sync response: ${response.items.size} updated book(s) out of ${wallets.size} requested") response.items.forEach { item -> val userWalletId = UserWalletId(stringValue = item.walletId) + // Metadata only — helps QA verify what the backend delivered (esp. for cross-platform books). + // Debug (Logcat only) to keep the persisted prod log free of happy-path sync noise. + logger.d( + "Storing synced address book for wallet ${item.walletId}: version=${item.version}, " + + "updatedAt=${item.updatedAt}, nonceLen=${item.nonce.length}, " + + "ciphertextLen=${item.ciphertext.length}, authTagLen=${item.authTag.length}", + ) blobStore.storeBlob(item.toBlob()) eTagsStore.store(userWalletId, ETagsStore.Key.AddressBook, item.etag) } Unit.right() }, onError = { error -> - TangemLogger.e(messageString = "Failed to sync address books: $error") + logger.e("Failed to sync address books: $error") error.toSyncError().left() }, ) } private fun decryptContacts(blob: AddressBookBlob, userWallet: UserWallet): List { - return cipher.decrypt(blob, userWallet).getOrNull()?.contacts.orEmpty() + return cipher.decrypt(blob, userWallet).fold( + ifLeft = { error -> + // The cipher already logged the low-level cause; this ties the failure to the read path so QA + // can see that a stored/synced book (e.g. one created on iOS) could not be shown to the user. + logger.e("Skipping address book for wallet ${blob.walletId}: decrypt failed with $error") + emptyList() + }, + ifRight = { it.contacts }, + ) } private suspend fun currentContacts(userWalletId: UserWalletId, userWallet: UserWallet): List { @@ -176,9 +197,7 @@ internal class DefaultAddressBookRepository( val updatedAt = DateTime.parse(timestampProvider.now()) return cipher.encrypt(addressBook, userWallet, updatedAt) .mapLeft { error -> - TangemLogger.e( - messageString = "Failed to encrypt address book for wallet ${userWallet.walletId}: $error", - ) + logger.e("Failed to encrypt address book for wallet ${userWallet.walletId}: $error") AddressBookSyncError.Unknown } .flatMap { blob -> pushBlob(userWallet.walletId, blob) } @@ -209,7 +228,7 @@ internal class DefaultAddressBookRepository( Unit.right() }, onError = { error -> - TangemLogger.e(messageString = "Failed to push address book for wallet $userWalletId: $error") + logger.e("Failed to push address book for wallet $userWalletId: $error") val syncError = error.toSyncError() // A 412 means the local etag is stale relative to the backend. Refresh the local blob + etag so the // next save attempt (user re-taps Save) starts from the current backend state. We do NOT re-push here @@ -249,6 +268,7 @@ internal class DefaultAddressBookRepository( userWalletsListRepository.userWalletsSync().find { it.walletId.stringValue == walletId } private companion object { + const val LOG_TAG = "AddressBook" const val MAX_SYNC_WALLETS = 20 } } \ No newline at end of file diff --git a/domain/address-book/src/main/kotlin/com/tangem/domain/addressbook/crypto/AddressBookCipher.kt b/domain/address-book/src/main/kotlin/com/tangem/domain/addressbook/crypto/AddressBookCipher.kt index 4169f94567..685894533d 100644 --- a/domain/address-book/src/main/kotlin/com/tangem/domain/addressbook/crypto/AddressBookCipher.kt +++ b/domain/address-book/src/main/kotlin/com/tangem/domain/addressbook/crypto/AddressBookCipher.kt @@ -10,6 +10,7 @@ import com.tangem.domain.addressbook.model.AddressBookBlob import com.tangem.domain.models.wallet.UserWallet import com.tangem.utils.extensions.hexToBytesOrNull import com.tangem.utils.extensions.toHexString +import com.tangem.utils.logging.TangemLogger import kotlinx.serialization.json.Json import org.joda.time.DateTime import org.joda.time.DateTimeZone @@ -35,6 +36,7 @@ class AddressBookCipher { private val json = Json { ignoreUnknownKeys = true } private val secureRandom = SecureRandom() + private val logger = TangemLogger.withTag(LOG_TAG) fun encrypt( addressBook: AddressBook, @@ -58,24 +60,97 @@ class AddressBookCipher { nonce = nonce.toHexString().lowercase(), ciphertext = ciphertext.toHexString().lowercase(), authTag = authTag.toHexString().lowercase(), - ) + ).also { blob -> + // Metadata only — the plaintext (contact names/addresses/memos) is never logged. + logger.d( + "Encrypted address book for wallet ${blob.walletId}: contacts=${addressBook.contacts.size}, " + + "plaintextBytes=${plaintext.size}, version=${blob.version}, " + + "nonceLen=${blob.nonce.length}, ciphertextLen=${blob.ciphertext.length}, " + + "authTagLen=${blob.authTag.length}", + ) + } } fun decrypt(blob: AddressBookBlob, userWallet: UserWallet): Either = either { - ensure(blob.walletId == userWallet.walletId.stringValue) { AddressBookCryptoError.WalletMismatch } + // Metadata only — helps QA correlate a failing blob with what was received from the backend/other platform. + logger.d( + "Decrypting address book for wallet ${blob.walletId}: version=${blob.version}, " + + "updatedAt=${blob.updatedAt}, nonceLen=${blob.nonce.length}, " + + "ciphertextLen=${blob.ciphertext.length}, authTagLen=${blob.authTag.length}", + ) + + ensure(blob.walletId == userWallet.walletId.stringValue) { + logger.w( + "Wallet mismatch decrypting address book: blob wallet=${blob.walletId}, " + + "target wallet=${userWallet.walletId.stringValue}", + ) + AddressBookCryptoError.WalletMismatch + } val aesKey = deriveKey(userWallet) - val nonce = blob.nonce.hexToBytesOrNull() ?: raise(AddressBookCryptoError.DecryptionFailed) - val ciphertext = blob.ciphertext.hexToBytesOrNull() ?: raise(AddressBookCryptoError.DecryptionFailed) - val authTag = blob.authTag.hexToBytesOrNull() ?: raise(AddressBookCryptoError.DecryptionFailed) + val nonce = blob.nonce.hexToBytesOrNull() ?: raiseNonHex(blob, field = "nonce", value = blob.nonce) + val ciphertext = blob.ciphertext.hexToBytesOrNull() ?: raiseNonHex( + blob = blob, + field = "ciphertext", + value = blob.ciphertext, + ) + val authTag = blob.authTag.hexToBytesOrNull() ?: raiseNonHex(blob, field = "authTag", value = blob.authTag) val plaintext = runCatching { cipher(Cipher.DECRYPT_MODE, aesKey, nonce).doFinal(ciphertext + authTag) - }.getOrElse { raise(AddressBookCryptoError.DecryptionFailed) } + }.getOrElse { error -> + logger.e( + "Failed to AES-GCM decrypt address book for wallet ${blob.walletId} " + + "(nonceBytes=${nonce.size}, ciphertextBytes=${ciphertext.size}, authTagBytes=${authTag.size}): " + + "${error.safeDescription()}. Usually a wrong key/nonce/tag or a corrupted blob.", + error, + ) + raise(AddressBookCryptoError.DecryptionFailed) + } runCatching { json.decodeFromString(AddressBook.serializer(), plaintext.toString(Charsets.UTF_8)) - }.getOrElse { raise(AddressBookCryptoError.MalformedBlob) } + }.getOrElse { error -> + // Decryption succeeded, so this is a payload schema/format mismatch — the prime suspect for a book + + // reason (missing/extra field, wrong type, JSON path) but strips any raw plaintext the exception echoes. + logger.e( + "Failed to parse decrypted address book for wallet ${blob.walletId} " + + "(plaintextBytes=${plaintext.size}, version=${blob.version}): ${error.safeDescription()}. " + + "Decryption OK → cross-platform payload schema/format mismatch.", + ) + raise(AddressBookCryptoError.MalformedBlob) + }.also { addressBook -> + logger.d( + messageString = "Decrypted address book for wallet ${blob.walletId}: " + + "contacts=${addressBook.contacts.size}", + ) + } + } + + private fun Raise.raiseNonHex( + blob: AddressBookBlob, + field: String, + value: String, + ): Nothing { + logger.e( + "Address book blob has non-hex $field for wallet ${blob.walletId} " + + "(${field}Len=${value.length}, version=${blob.version}).", + ) + raise(AddressBookCryptoError.DecryptionFailed) + } + + /** + * A log-safe, one-line description of a failure: exception type + message, with any raw decrypted payload + * stripped. kotlinx.serialization appends the offending input after a `JSON input:` marker; everything before + * it (the reason and the `at path: …` location) is structural and safe to log. + */ + private fun Throwable.safeDescription(): String { + val safeMessage = message.orEmpty().substringBefore("JSON input:").trim() + return buildString { + append(this@safeDescription::class.simpleName) + if (safeMessage.isNotEmpty()) append(": ").append(safeMessage) + } } private fun Raise.deriveKey(userWallet: UserWallet): ByteArray { @@ -91,6 +166,7 @@ class AddressBookCipher { } private companion object { + const val LOG_TAG = "AddressBook" const val AES_GCM_TRANSFORMATION = "AES/GCM/NoPadding" const val AES_ALGORITHM = "AES" const val NONCE_SIZE_BYTES = 12 diff --git a/domain/address-book/src/main/kotlin/com/tangem/domain/addressbook/model/AddressEntry.kt b/domain/address-book/src/main/kotlin/com/tangem/domain/addressbook/model/AddressEntry.kt index 3678c6f7f1..45cc5cd25d 100644 --- a/domain/address-book/src/main/kotlin/com/tangem/domain/addressbook/model/AddressEntry.kt +++ b/domain/address-book/src/main/kotlin/com/tangem/domain/addressbook/model/AddressEntry.kt @@ -5,7 +5,6 @@ import com.tangem.domain.models.network.Network import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -/** A single saved address belonging to a [Contact]. */ @Serializable data class AddressEntry( @SerialName("id") @@ -15,10 +14,8 @@ data class AddressEntry( @SerialName("networkId") @Serializable(with = NetworkRawIdAsStringSerializer::class) val networkId: Network.RawID, - @SerialName("networkName") - val networkName: String, @SerialName("memo") - val memo: String?, + val memo: String? = null, @SerialName("signature") val signature: String, ) \ No newline at end of file diff --git a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/crypto/AddressBookCipherTest.kt b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/crypto/AddressBookCipherTest.kt index 0da38d0d70..4393d21bfb 100644 --- a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/crypto/AddressBookCipherTest.kt +++ b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/crypto/AddressBookCipherTest.kt @@ -266,7 +266,6 @@ internal class AddressBookCipherTest { networkId = Network.RawID("ethereum"), memo = memo, signature = "", - networkName = "Ethereum", ) private fun String.flipFirstHexNibble(): String = (if (first() == '0') '1' else '0') + substring(1) diff --git a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/interactor/GetVerifiedContactsInteractorTest.kt b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/interactor/GetVerifiedContactsInteractorTest.kt index 9f2c7c87d1..9965ba099e 100644 --- a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/interactor/GetVerifiedContactsInteractorTest.kt +++ b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/interactor/GetVerifiedContactsInteractorTest.kt @@ -70,7 +70,6 @@ class GetVerifiedContactsInteractorTest { id = AddressEntryId("addr-1"), address = "0xabc", networkId = Network.RawID("ethereum"), - networkName = "Ethereum", memo = null, signature = "AABB", ), diff --git a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/interactor/SaveContactInteractorTest.kt b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/interactor/SaveContactInteractorTest.kt index 9af600b7b8..3a2c8531b1 100644 --- a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/interactor/SaveContactInteractorTest.kt +++ b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/interactor/SaveContactInteractorTest.kt @@ -321,7 +321,6 @@ internal class SaveContactInteractorTest { networkId = networkRawId, memo = memo, signature = "sig", - networkName = "Ethereum", ) private fun expectedHash(contact: Contact, entry: AddressEntry): ByteArray { diff --git a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/model/AddressBookSerializationTest.kt b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/model/AddressBookSerializationTest.kt index fdd1c4bd70..4a74bfad4d 100644 --- a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/model/AddressBookSerializationTest.kt +++ b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/model/AddressBookSerializationTest.kt @@ -34,7 +34,6 @@ internal class AddressBookSerializationTest { id = AddressEntryId("addr-1"), address = "0xabc", networkId = Network.RawID("ethereum"), - networkName = "Ethereum", memo = null, signature = "", ), @@ -71,7 +70,6 @@ internal class AddressBookSerializationTest { id = AddressEntryId("addr-1"), address = "0xabc", networkId = Network.RawID("ethereum"), - networkName = "Ethereum", memo = "memo", signature = "sig", ), @@ -102,4 +100,23 @@ internal class AddressBookSerializationTest { // Assert assertThat(error).isNotNull() } + + @Test + fun `GIVEN entry with null memo WHEN serialized THEN memo key is omitted`() { + // Arrange — kotlinx omits properties equal to their default, so a null memo must not appear in the JSON, + // matching iOS's encodeIfPresent for String? optionals. + val entry = AddressEntry( + id = AddressEntryId("a1"), + address = "0xabc", + networkId = Network.RawID("ethereum"), + memo = null, + signature = "sig", + ) + + // Act + val obj = json.parseToJsonElement(json.encodeToString(AddressEntry.serializer(), entry)).jsonObject + + // Assert + assertThat(obj.keys).doesNotContain("memo") + } } \ No newline at end of file diff --git a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/usecase/CheckAddressDuplicateUseCaseTest.kt b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/usecase/CheckAddressDuplicateUseCaseTest.kt index f7560f26a9..d1ccfe1602 100644 --- a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/usecase/CheckAddressDuplicateUseCaseTest.kt +++ b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/usecase/CheckAddressDuplicateUseCaseTest.kt @@ -90,7 +90,6 @@ class CheckAddressDuplicateUseCaseTest { networkId = Network.RawID(networkId), memo = null, signature = "sig", - networkName = "Ethereum", ), ), ) diff --git a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/usecase/GetContactsUseCaseTest.kt b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/usecase/GetContactsUseCaseTest.kt index 1f340d06b4..35ab2b38ab 100644 --- a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/usecase/GetContactsUseCaseTest.kt +++ b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/usecase/GetContactsUseCaseTest.kt @@ -119,7 +119,6 @@ class GetContactsUseCaseTest { networkId = Network.RawID("ethereum"), memo = null, signature = "sig", - networkName = "Ethereum", ), ), ) diff --git a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/validation/ContactNameValidatorTest.kt b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/validation/ContactNameValidatorTest.kt index cfe8b37d2b..62d0769e52 100644 --- a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/validation/ContactNameValidatorTest.kt +++ b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/validation/ContactNameValidatorTest.kt @@ -102,7 +102,6 @@ class ContactNameValidatorTest { networkId = Network.RawID("ethereum"), memo = null, signature = "AABB", - networkName = "Ethereum", ), ), ) diff --git a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/verification/ContactSignatureVerifierTest.kt b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/verification/ContactSignatureVerifierTest.kt index fd4a322926..4f7dd9705b 100644 --- a/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/verification/ContactSignatureVerifierTest.kt +++ b/domain/address-book/src/test/kotlin/com/tangem/domain/addressbook/verification/ContactSignatureVerifierTest.kt @@ -253,7 +253,6 @@ class ContactSignatureVerifierTest { id = AddressEntryId(id), address = address, networkId = Network.RawID("ethereum"), - networkName = "Ethereum", memo = memo, signature = signature, ) diff --git a/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/common/ContactMatcher.kt b/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/common/ContactMatcher.kt index 1ee320ff34..df3eeaa60a 100644 --- a/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/common/ContactMatcher.kt +++ b/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/common/ContactMatcher.kt @@ -1,6 +1,9 @@ package com.tangem.features.addressbook.common +import com.tangem.blockchain.common.Blockchain +import com.tangem.blockchainsdk.utils.fromNetworkId import com.tangem.common.ui.account.AccountIconUM +import com.tangem.domain.addressbook.model.AddressEntry import com.tangem.domain.addressbook.model.Contact import com.tangem.domain.models.account.CryptoPortfolioIcon import com.tangem.features.addressbook.MatchedContact @@ -27,7 +30,7 @@ internal object ContactMatcher { MatchedContact.ContactAddress( address = entry.address, memo = entry.memo, - networkName = entry.networkName, + networkName = entry.displayNetworkName(), ) }.toImmutableList(), ) @@ -40,4 +43,8 @@ internal object ContactMatcher { color = CryptoPortfolioIcon.Color.entries.firstOrNull { it.name == iconColor } ?: CryptoPortfolioIcon.Color.Azure, ) + + /** Display network name is derived from [AddressEntry.networkId] — it is not stored in the encrypted payload. */ + private fun AddressEntry.displayNetworkName(): String = + Blockchain.fromNetworkId(networkId.value)?.fullName ?: networkId.value } \ No newline at end of file diff --git a/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/editcontact/model/ContactAddressEntriesConverter.kt b/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/editcontact/model/ContactAddressEntriesConverter.kt index 403ef3e8a4..eb91cfb48a 100644 --- a/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/editcontact/model/ContactAddressEntriesConverter.kt +++ b/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/editcontact/model/ContactAddressEntriesConverter.kt @@ -37,7 +37,6 @@ internal class ContactAddressEntriesConverter { id = AddressEntryId(UUID.randomUUID().toString()), address = address, networkId = Network.RawID(rawId), - networkName = blockchain?.fullName ?: rawId, memo = memo?.takeIf { hasExtrasSupport }, signature = "", ) diff --git a/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/list/DefaultAddressBookListComponent.kt b/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/list/DefaultAddressBookListComponent.kt index 7b5ba6c1bb..735b5798b6 100644 --- a/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/list/DefaultAddressBookListComponent.kt +++ b/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/list/DefaultAddressBookListComponent.kt @@ -63,7 +63,7 @@ internal class DefaultAddressBookListComponent( is AddressBookListUM.Content -> AddressBookListScreen( state = addressBookListUM, onBackClick = router::pop, - modifier = modifier.background(TangemTheme.colors3.bg.primary), + modifier = Modifier.background(TangemTheme.colors3.bg.primary), ) } selector.child?.instance?.BottomSheet() diff --git a/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/list/ui/AddressBookListScreen.kt b/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/list/ui/AddressBookListScreen.kt index 334be305e6..312c482ab2 100644 --- a/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/list/ui/AddressBookListScreen.kt +++ b/features/address-book/impl/src/main/kotlin/com/tangem/features/addressbook/list/ui/AddressBookListScreen.kt @@ -43,7 +43,7 @@ internal fun AddressBookListScreen( ) { val density = LocalDensity.current val bottomBarHeight = with(density) { WindowInsets.systemBars.getBottom(this).toDp() } - Column(modifier = modifier) { + Column(modifier = modifier.fillMaxSize()) { TangemTopBar( modifier = Modifier.statusBarsPadding(), title = resourceReference(R.string.address_book_title), diff --git a/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/common/ContactMatcherTest.kt b/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/common/ContactMatcherTest.kt index 7d9ec53b6b..dc7437ffe8 100644 --- a/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/common/ContactMatcherTest.kt +++ b/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/common/ContactMatcherTest.kt @@ -90,7 +90,6 @@ internal class ContactMatcherTest { networkId = Network.RawID(networkId), memo = memo, signature = "sig", - networkName = "Ethereum", ) private companion object { diff --git a/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/editcontact/model/EditContactModelTest.kt b/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/editcontact/model/EditContactModelTest.kt index 0a5558d152..422c0bdfec 100644 --- a/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/editcontact/model/EditContactModelTest.kt +++ b/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/editcontact/model/EditContactModelTest.kt @@ -835,7 +835,6 @@ internal class EditContactModelTest { id = AddressEntryId("e-1"), address = "0xAAA", networkId = Network.RawID("ethereum"), - networkName = "Ethereum", memo = null, signature = "sig", ), @@ -843,7 +842,6 @@ internal class EditContactModelTest { id = AddressEntryId("e-2"), address = "0xBBB", networkId = Network.RawID("bsc"), - networkName = "BSC", memo = null, signature = "sig", ), @@ -896,7 +894,6 @@ internal class EditContactModelTest { id = AddressEntryId("e-1"), address = address, networkId = Network.RawID("ethereum"), - networkName = "Ethereum", memo = null, signature = "sig", ), diff --git a/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/list/model/AddressBookListModelTest.kt b/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/list/model/AddressBookListModelTest.kt index 198584da64..066a398d55 100644 --- a/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/list/model/AddressBookListModelTest.kt +++ b/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/list/model/AddressBookListModelTest.kt @@ -133,7 +133,6 @@ internal class AddressBookListModelTest { id = AddressEntryId("e-$id"), address = "0xABC", networkId = Network.RawID("ethereum"), - networkName = "Ethereum", memo = null, signature = "sig", ), diff --git a/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/list/state/transformers/UpdateAddressBookListContentTransformerTest.kt b/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/list/state/transformers/UpdateAddressBookListContentTransformerTest.kt index 7242a5cd38..95c466ec60 100644 --- a/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/list/state/transformers/UpdateAddressBookListContentTransformerTest.kt +++ b/features/address-book/impl/src/test/kotlin/com/tangem/features/addressbook/list/state/transformers/UpdateAddressBookListContentTransformerTest.kt @@ -172,7 +172,6 @@ internal class UpdateAddressBookListContentTransformerTest { networkId = Network.RawID("ethereum"), memo = null, signature = "sig", - networkName = "Ethereum", ), ), ), diff --git a/features/send/impl/src/test/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationModelTest.kt b/features/send/impl/src/test/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationModelTest.kt index e059bc5313..7c6d850a07 100644 --- a/features/send/impl/src/test/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationModelTest.kt +++ b/features/send/impl/src/test/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationModelTest.kt @@ -567,7 +567,6 @@ internal class SendDestinationModelTest { id = AddressEntryId("e1"), address = address, networkId = Network.RawID(networkRawId), - networkName = "Ethereum", memo = null, signature = "", ),