Update SDK to 3.0.0-7824-f0ac1382 (#7145)

Co-authored-by: bw-ghapp[bot] <178206702+bw-ghapp[bot]@users.noreply.github.com>
This commit is contained in:
bw-ghapp[bot]
2026-07-17 18:09:11 +00:00
committed by GitHub
co-authored by bw-ghapp[bot] <178206702+bw-ghapp[bot]@users.noreply.github.com>
parent 109470e92e
commit c89dd5a829
12 changed files with 85 additions and 20 deletions
@@ -15,6 +15,7 @@ import com.bitwarden.network.model.SyncResponseJson
import com.bitwarden.network.model.UriMatchTypeJson
import com.bitwarden.vault.Attachment
import com.bitwarden.vault.BankAccount
import com.bitwarden.vault.BankAccountListView
import com.bitwarden.vault.Card
import com.bitwarden.vault.CardListView
import com.bitwarden.vault.Cipher
@@ -844,14 +845,20 @@ fun Cipher.toFailureCipherListView(): CipherListView =
CipherType.SECURE_NOTE -> CipherListViewType.SecureNote
CipherType.CARD -> CipherListViewType.Card(
CardListView(
v1 = CardListView(
brand = null,
),
)
CipherType.IDENTITY -> CipherListViewType.Identity
CipherType.SSH_KEY -> CipherListViewType.SshKey
CipherType.BANK_ACCOUNT -> CipherListViewType.BankAccount
CipherType.BANK_ACCOUNT -> CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
)
CipherType.DRIVERS_LICENSE -> CipherListViewType.DriversLicense
CipherType.PASSPORT -> CipherListViewType.Passport
},
@@ -281,7 +281,7 @@ private val CipherListViewType.iconRes: Int
is CipherListViewType.Card -> BitwardenDrawable.ic_payment_card
CipherListViewType.Identity -> BitwardenDrawable.ic_id_card
CipherListViewType.SshKey -> BitwardenDrawable.ic_ssh_key
CipherListViewType.BankAccount -> BitwardenDrawable.ic_payment_card
is CipherListViewType.BankAccount -> BitwardenDrawable.ic_payment_card
CipherListViewType.DriversLicense -> BitwardenDrawable.ic_note
CipherListViewType.Passport -> BitwardenDrawable.ic_passport
}
@@ -570,7 +570,7 @@ private fun CipherListView.toIconTestTag(): String =
is CipherListViewType.Card -> "CardCipherIcon"
CipherListViewType.Identity -> "IdentityCipherIcon"
CipherListViewType.SshKey -> "SshKeyCipherIcon"
CipherListViewType.BankAccount -> "BankAccountCipherIcon"
is CipherListViewType.BankAccount -> "BankAccountCipherIcon"
CipherListViewType.DriversLicense -> "LicenseCipherIcon"
CipherListViewType.Passport -> "PassportCipherIcon"
}
@@ -635,7 +635,7 @@ private val CipherListViewType.iconRes: Int
is CipherListViewType.Card -> BitwardenDrawable.ic_payment_card
CipherListViewType.Identity -> BitwardenDrawable.ic_id_card
CipherListViewType.SshKey -> BitwardenDrawable.ic_ssh_key
CipherListViewType.BankAccount -> BitwardenDrawable.ic_payment_card
is CipherListViewType.BankAccount -> BitwardenDrawable.ic_payment_card
CipherListViewType.DriversLicense -> BitwardenDrawable.ic_note
CipherListViewType.Passport -> BitwardenDrawable.ic_passport
}
@@ -372,7 +372,7 @@ private fun CipherListView.toVaultItemOrNull(
hasDecryptionError = hasDecryptionError,
)
CipherListViewType.BankAccount -> VaultState.ViewState.VaultItem.BankAccount(
is CipherListViewType.BankAccount -> VaultState.ViewState.VaultItem.BankAccount(
id = id,
name = name.asText(),
overflowOptions = toOverflowActions(
@@ -13,7 +13,7 @@ fun CipherListViewType.toSdkCipherType(): CipherType =
is CipherListViewType.Login -> CipherType.LOGIN
CipherListViewType.SecureNote -> CipherType.SECURE_NOTE
CipherListViewType.SshKey -> CipherType.SSH_KEY
CipherListViewType.BankAccount -> CipherType.BANK_ACCOUNT
is CipherListViewType.BankAccount -> CipherType.BANK_ACCOUNT
CipherListViewType.DriversLicense -> CipherType.DRIVERS_LICENSE
CipherListViewType.Passport -> CipherType.PASSPORT
}
@@ -20,6 +20,7 @@ import com.bitwarden.network.model.createMockPasswordHistory
import com.bitwarden.network.model.createMockSecureNote
import com.bitwarden.network.model.createMockSshKey
import com.bitwarden.network.model.createMockUri
import com.bitwarden.vault.BankAccountListView
import com.bitwarden.vault.CipherListViewType
import com.bitwarden.vault.CipherRepromptType
import com.bitwarden.vault.CipherType
@@ -536,7 +537,15 @@ class VaultSdkCipherExtensionsTest {
val result = cipher.toFailureCipherListView()
assertEquals(CipherListViewType.BankAccount, result.type)
assertEquals(
CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
result.type,
)
}
@Test
@@ -7,6 +7,7 @@ import com.bitwarden.send.SendView
import com.bitwarden.ui.platform.resource.BitwardenDrawable
import com.bitwarden.ui.platform.resource.BitwardenString
import com.bitwarden.ui.util.asText
import com.bitwarden.vault.BankAccountListView
import com.bitwarden.vault.CipherListView
import com.bitwarden.vault.CipherListViewType
import com.bitwarden.vault.CipherRepromptType
@@ -404,13 +405,23 @@ class SearchTypeDataExtensionsTest {
fun `CipherViews filterAndOrganize should return list with only bank account items`() {
val match1 = createMockCipherListView(
number = 1,
type = CipherListViewType.BankAccount,
type = CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
name = "match1",
)
val match2 = createMockCipherListView(number = 2, name = "match2")
val match3 = createMockCipherListView(
number = 3,
type = CipherListViewType.BankAccount,
type = CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
name = "match3",
)
val ciphers = listOf(match1, match2, match3)
@@ -14,6 +14,7 @@ import com.bitwarden.ui.platform.model.TotpData
import com.bitwarden.ui.platform.resource.BitwardenDrawable
import com.bitwarden.ui.platform.resource.BitwardenString
import com.bitwarden.ui.util.asText
import com.bitwarden.vault.BankAccountListView
import com.bitwarden.vault.CipherListViewType
import com.bitwarden.vault.CipherRepromptType
import com.bitwarden.vault.CipherType
@@ -404,7 +405,12 @@ class VaultItemListingDataExtensionsTest {
val cipherView = createMockCipherListView(
number = 1,
isDeleted = false,
type = CipherListViewType.BankAccount,
type = CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
)
mapOf(
@@ -1,6 +1,7 @@
package com.x8bit.bitwarden.ui.vault.feature.util
import com.bitwarden.ui.platform.components.icon.model.IconData
import com.bitwarden.vault.BankAccountListView
import com.bitwarden.vault.CipherListViewType
import com.bitwarden.vault.CipherType
import com.bitwarden.vault.CopyableCipherFields
@@ -365,7 +366,12 @@ class CipherListViewExtensionsTest {
fun `toOverflowActions should return all copy actions for a bank account cipher`() {
val cipher = createMockCipherListView(
number = 1,
type = CipherListViewType.BankAccount,
type = CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
id = id,
copyableFields = listOf(
CopyableCipherFields.BANK_ACCOUNT_ACCOUNT_NUMBER,
@@ -408,7 +414,12 @@ class CipherListViewExtensionsTest {
fun `toOverflowActions should return only available copy actions for a bank account cipher`() {
val cipher = createMockCipherListView(
number = 1,
type = CipherListViewType.BankAccount,
type = CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
id = id,
copyableFields = listOf(
CopyableCipherFields.BANK_ACCOUNT_ACCOUNT_NUMBER,
@@ -449,7 +460,12 @@ class CipherListViewExtensionsTest {
id = id,
isDeleted = true,
isArchived = true,
type = CipherListViewType.BankAccount,
type = CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
)
val result = cipher.toOverflowActions(
@@ -7,6 +7,7 @@ import com.bitwarden.ui.platform.components.icon.model.IconData
import com.bitwarden.ui.platform.resource.BitwardenDrawable
import com.bitwarden.ui.platform.resource.BitwardenString
import com.bitwarden.ui.util.asText
import com.bitwarden.vault.BankAccountListView
import com.bitwarden.vault.CipherListViewType
import com.bitwarden.vault.CipherRepromptType
import com.bitwarden.vault.CipherType
@@ -1390,19 +1391,34 @@ class VaultDataExtensionsTest {
successes = listOf(
createMockCipherListView(
number = 1,
type = CipherListViewType.BankAccount,
type = CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
favorite = true,
folderId = null,
),
createMockCipherListView(
number = 2,
type = CipherListViewType.BankAccount,
type = CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
reprompt = CipherRepromptType.PASSWORD,
folderId = null,
),
createMockCipherListView(
number = 3,
type = CipherListViewType.BankAccount,
type = CipherListViewType.BankAccount(
v1 = BankAccountListView(
accountNumber = null,
accountType = null,
),
),
folderId = null,
),
),
+1 -1
View File
@@ -29,7 +29,7 @@ androidxRoom = "2.8.4"
androidxSecurityCrypto = "1.1.0"
androidxSplash = "1.2.0"
androidxWork = "2.11.2"
bitwardenSdk = "3.0.0-7673-101364a4"
bitwardenSdk = "3.0.0-7799-d2bd7a3e"
crashlytics = "3.0.7"
detekt = "1.23.8"
firebaseBom = "34.15.0"
@@ -1007,13 +1007,13 @@ data class SyncResponseJson(
@Serializable
data class SshKey(
@SerialName("publicKey")
val publicKey: String,
val publicKey: String?,
@SerialName("privateKey")
val privateKey: String,
@SerialName("keyFingerprint")
val keyFingerprint: String,
val keyFingerprint: String?,
)
/**