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( LoginUri(
uri = uri, uri = uri,
match = uriMatchType?.toSdkMatchType(), match = uriMatchType?.toSdkMatchType(),
uriChecksum = null,
) )
/** /**

View file

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

View file

@ -208,5 +208,5 @@ private fun VaultAddEditState.Custom.toFieldView(): FieldView =
private fun List<UriItem>?.toLoginUriView(): List<LoginUriView>? = private fun List<UriItem>?.toLoginUriView(): List<LoginUriView>? =
this this
?.filter { it.uri?.isNotBlank() == true } ?.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() } .takeUnless { it.isNullOrEmpty() }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -81,6 +81,7 @@ class VaultAddItemStateExtensionsTest {
LoginUriView( LoginUriView(
uri = "mockUri-1", uri = "mockUri-1",
match = UriMatchType.DOMAIN, match = UriMatchType.DOMAIN,
uriChecksum = null,
), ),
), ),
totp = "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example", totp = "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example",
@ -160,6 +161,7 @@ class VaultAddItemStateExtensionsTest {
LoginUriView( LoginUriView(
uri = "mockUri-1", uri = "mockUri-1",
match = null, match = null,
uriChecksum = null,
), ),
), ),
totp = "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example", 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( LoginUriView(
uri = "www.example.com", uri = "www.example.com",
match = null, match = null,
uriChecksum = null,
), ),
), ),
totp = "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example", totp = "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example",

View file

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

View file

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