BIT-1398: Update Bitwarden SDK and remove temporary SendViewKey (#572)

This commit is contained in:
David Perez 2024-01-11 09:22:27 -06:00 committed by Álison Fernandes
parent 0aa24d73d9
commit 6d51d514b8
5 changed files with 11 additions and 8 deletions

View file

@ -18,9 +18,9 @@ fun AddSendState.ViewState.Content.toSendView(
accessId = null, accessId = null,
name = common.name, name = common.name,
notes = common.noteInput, notes = common.noteInput,
// TODO: Set this to null after we update the SDK with an encryption fix (BIT-1398) key = null,
key = "91Xo3Wdf0N0Cc5AHJRC3SQ", newPassword = common.passwordInput.takeUnless { it.isBlank() },
password = common.passwordInput.takeUnless { it.isBlank() }, hasPassword = false,
type = selectedType.toSendType(), type = selectedType.toSendType(),
file = toSendFileView(), file = toSendFileView(),
text = toSendTextView(), text = toSendTextView(),

View file

@ -40,7 +40,7 @@ private fun List<SendView>.toSendContent(
}, },
iconList = listOfNotNull( iconList = listOfNotNull(
SendStatusIcon.DISABLED.takeIf { sendView.disabled }, SendStatusIcon.DISABLED.takeIf { sendView.disabled },
sendView.password?.let { SendStatusIcon.PASSWORD }, SendStatusIcon.PASSWORD.takeIf { sendView.hasPassword },
SendStatusIcon.MAX_ACCESS_COUNT_REACHED.takeIf { SendStatusIcon.MAX_ACCESS_COUNT_REACHED.takeIf {
sendView.maxAccessCount?.let { maxCount -> sendView.maxAccessCount?.let { maxCount ->
sendView.accessCount >= maxCount sendView.accessCount >= maxCount

View file

@ -19,7 +19,8 @@ fun createMockSendView(
name = "mockName-$number", name = "mockName-$number",
notes = "mockNotes-$number", notes = "mockNotes-$number",
key = "mockKey-$number", key = "mockKey-$number",
password = "mockPassword-$number", newPassword = "mockPassword-$number",
hasPassword = true,
type = type, type = type,
file = createMockFileView(number = number), file = createMockFileView(number = number),
text = createMockTextView(number = number), text = createMockTextView(number = number),

View file

@ -18,7 +18,7 @@ class AddSendStateExtensionsTest {
val sendView = createMockSendView(number = 1, type = SendType.FILE).copy( val sendView = createMockSendView(number = 1, type = SendType.FILE).copy(
id = null, id = null,
accessId = null, accessId = null,
key = "91Xo3Wdf0N0Cc5AHJRC3SQ", key = null,
accessCount = 0U, accessCount = 0U,
text = null, text = null,
file = SendFileView( file = SendFileView(
@ -27,6 +27,7 @@ class AddSendStateExtensionsTest {
size = "", size = "",
sizeName = "", sizeName = "",
), ),
hasPassword = false,
) )
val result = DEFAULT_VIEW_STATE val result = DEFAULT_VIEW_STATE
@ -41,9 +42,10 @@ class AddSendStateExtensionsTest {
val sendView = createMockSendView(number = 1, type = SendType.TEXT).copy( val sendView = createMockSendView(number = 1, type = SendType.TEXT).copy(
id = null, id = null,
accessId = null, accessId = null,
key = "91Xo3Wdf0N0Cc5AHJRC3SQ", key = null,
accessCount = 0U, accessCount = 0U,
file = null, file = null,
hasPassword = false,
) )
val result = DEFAULT_VIEW_STATE.toSendView(FIXED_CLOCK) val result = DEFAULT_VIEW_STATE.toSendView(FIXED_CLOCK)

View file

@ -25,7 +25,7 @@ androidXSecurityCrypto = "1.1.0-alpha06"
androidxSplash = "1.1.0-alpha02" androidxSplash = "1.1.0-alpha02"
# Once the app and SDK reach a critical point of completeness we should begin fixing the version # Once the app and SDK reach a critical point of completeness we should begin fixing the version
# here (BIT-311). # here (BIT-311).
bitwardenSdk = "0.4.0-20240108.121805-25" bitwardenSdk = "0.4.0-20240111.141006-33"
crashlytics = "2.9.9" crashlytics = "2.9.9"
detekt = "1.23.1" detekt = "1.23.1"
firebaseBom = "32.7.0" firebaseBom = "32.7.0"