Update to the latest Bitwarden SDK (#1198)

This commit is contained in:
David Perez 2024-04-01 12:35:03 -05:00 committed by Álison Fernandes
parent c339895665
commit 0cc28e41ba
11 changed files with 17 additions and 2 deletions

View file

@ -432,6 +432,7 @@ fun SyncResponseJson.Cipher.Login.Uri.toSdkLoginUri(): LoginUri =
LoginUri(
uri = uri,
match = uriMatchType?.toSdkMatchType(),
uriChecksum = null,
)
/**

View file

@ -180,6 +180,7 @@ class SearchViewModel @Inject constructor(
uris = uris + LoginUriView(
uri = state.autofillSelectionData?.uri,
match = null,
uriChecksum = null,
),
),
),

View file

@ -208,5 +208,5 @@ private fun VaultAddEditState.Custom.toFieldView(): FieldView =
private fun List<UriItem>?.toLoginUriView(): List<LoginUriView>? =
this
?.filter { it.uri?.isNotBlank() == true }
?.map { LoginUriView(uri = it.uri.orEmpty(), match = it.match) }
?.map { LoginUriView(uri = it.uri.orEmpty(), match = it.match, uriChecksum = null) }
.takeUnless { it.isNullOrEmpty() }

View file

@ -130,6 +130,7 @@ fun createMockUriView(number: Int): LoginUriView =
LoginUriView(
uri = "www.mockuri$number.com",
match = UriMatchType.HOST,
uriChecksum = null,
)
/**

View file

@ -159,4 +159,5 @@ fun createMockSdkUri(number: Int): LoginUri =
LoginUri(
uri = "mockUri-$number",
match = UriMatchType.HOST,
uriChecksum = null,
)

View file

@ -215,6 +215,7 @@ class SearchViewModelTest : BaseViewModelTest() {
LoginUriView(
uri = AUTOFILL_URI,
match = null,
uriChecksum = null,
),
),
)
@ -266,6 +267,7 @@ class SearchViewModelTest : BaseViewModelTest() {
LoginUriView(
uri = AUTOFILL_URI,
match = null,
uriChecksum = null,
),
),
)
@ -425,6 +427,7 @@ class SearchViewModelTest : BaseViewModelTest() {
LoginUriView(
uri = AUTOFILL_URI,
match = null,
uriChecksum = null,
),
),
)

View file

@ -543,6 +543,7 @@ private val DEFAULT_LOGIN_CIPHER_VIEW: CipherView = DEFAULT_BASE_CIPHER_VIEW.cop
LoginUriView(
uri = "www.example.com",
match = null,
uriChecksum = null,
),
),
totp = "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example",

View file

@ -39,6 +39,7 @@ fun createLoginView(isEmpty: Boolean): LoginView =
LoginUriView(
uri = "www.example.com",
match = null,
uriChecksum = null,
),
)
.takeUnless { isEmpty },

View file

@ -81,6 +81,7 @@ class VaultAddItemStateExtensionsTest {
LoginUriView(
uri = "mockUri-1",
match = UriMatchType.DOMAIN,
uriChecksum = null,
),
),
totp = "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example",
@ -160,6 +161,7 @@ class VaultAddItemStateExtensionsTest {
LoginUriView(
uri = "mockUri-1",
match = null,
uriChecksum = null,
),
),
totp = "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example",
@ -740,6 +742,7 @@ private val DEFAULT_LOGIN_CIPHER_VIEW: CipherView = DEFAULT_BASE_CIPHER_VIEW.cop
LoginUriView(
uri = "www.example.com",
match = null,
uriChecksum = null,
),
),
totp = "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example",

View file

@ -337,6 +337,7 @@ class VaultDataExtensionsTest {
LoginUriView(
uri = "",
match = UriMatchType.HOST,
uriChecksum = null,
),
)
.toLoginIconData(
@ -356,6 +357,7 @@ class VaultDataExtensionsTest {
LoginUriView(
uri = "androidapp://test.com",
match = UriMatchType.HOST,
uriChecksum = null,
),
)
.toLoginIconData(
@ -375,6 +377,7 @@ class VaultDataExtensionsTest {
LoginUriView(
uri = "iosapp://test.com",
match = UriMatchType.HOST,
uriChecksum = null,
),
)
.toLoginIconData(

View file

@ -23,7 +23,7 @@ androidxSplash = "1.1.0-alpha02"
androidXAppCompat = "1.6.1"
androdixAutofill = "1.1.0"
androidxWork = "2.9.0"
bitwardenSdk = "0.4.0-20240314.115913-173"
bitwardenSdk = "0.4.0-20240401.145917-193"
crashlytics = "2.9.9"
detekt = "1.23.5"
firebaseBom = "32.8.0"