diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/util/AddSendStateExtensions.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/util/AddSendStateExtensions.kt index a6fb12a75..918596704 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/util/AddSendStateExtensions.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/util/AddSendStateExtensions.kt @@ -18,9 +18,9 @@ fun AddSendState.ViewState.Content.toSendView( accessId = null, name = common.name, notes = common.noteInput, - // TODO: Set this to null after we update the SDK with an encryption fix (BIT-1398) - key = "91Xo3Wdf0N0Cc5AHJRC3SQ", - password = common.passwordInput.takeUnless { it.isBlank() }, + key = null, + newPassword = common.passwordInput.takeUnless { it.isBlank() }, + hasPassword = false, type = selectedType.toSendType(), file = toSendFileView(), text = toSendTextView(), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/util/SendDataExtensions.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/util/SendDataExtensions.kt index 2a3f016f5..7a9fa5fa1 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/util/SendDataExtensions.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/util/SendDataExtensions.kt @@ -40,7 +40,7 @@ private fun List.toSendContent( }, iconList = listOfNotNull( SendStatusIcon.DISABLED.takeIf { sendView.disabled }, - sendView.password?.let { SendStatusIcon.PASSWORD }, + SendStatusIcon.PASSWORD.takeIf { sendView.hasPassword }, SendStatusIcon.MAX_ACCESS_COUNT_REACHED.takeIf { sendView.maxAccessCount?.let { maxCount -> sendView.accessCount >= maxCount diff --git a/app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/SendViewUtil.kt b/app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/SendViewUtil.kt index 4666ad56d..9725f710c 100644 --- a/app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/SendViewUtil.kt +++ b/app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/SendViewUtil.kt @@ -19,7 +19,8 @@ fun createMockSendView( name = "mockName-$number", notes = "mockNotes-$number", key = "mockKey-$number", - password = "mockPassword-$number", + newPassword = "mockPassword-$number", + hasPassword = true, type = type, file = createMockFileView(number = number), text = createMockTextView(number = number), diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/util/AddSendStateExtensionsTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/util/AddSendStateExtensionsTest.kt index 4cf0e4a6e..0767a1d28 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/util/AddSendStateExtensionsTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/util/AddSendStateExtensionsTest.kt @@ -18,7 +18,7 @@ class AddSendStateExtensionsTest { val sendView = createMockSendView(number = 1, type = SendType.FILE).copy( id = null, accessId = null, - key = "91Xo3Wdf0N0Cc5AHJRC3SQ", + key = null, accessCount = 0U, text = null, file = SendFileView( @@ -27,6 +27,7 @@ class AddSendStateExtensionsTest { size = "", sizeName = "", ), + hasPassword = false, ) val result = DEFAULT_VIEW_STATE @@ -41,9 +42,10 @@ class AddSendStateExtensionsTest { val sendView = createMockSendView(number = 1, type = SendType.TEXT).copy( id = null, accessId = null, - key = "91Xo3Wdf0N0Cc5AHJRC3SQ", + key = null, accessCount = 0U, file = null, + hasPassword = false, ) val result = DEFAULT_VIEW_STATE.toSendView(FIXED_CLOCK) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7aeab5445..cbc475602 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -25,7 +25,7 @@ androidXSecurityCrypto = "1.1.0-alpha06" androidxSplash = "1.1.0-alpha02" # Once the app and SDK reach a critical point of completeness we should begin fixing the version # here (BIT-311). -bitwardenSdk = "0.4.0-20240108.121805-25" +bitwardenSdk = "0.4.0-20240111.141006-33" crashlytics = "2.9.9" detekt = "1.23.1" firebaseBom = "32.7.0"