diff --git a/cryptography/src/commonTest/kotlin/com/wire/kalium/cryptography/ProteusClientTest.kt b/cryptography/src/commonTest/kotlin/com/wire/kalium/cryptography/ProteusClientTest.kt index 82eca15fece..ec4f95be564 100644 --- a/cryptography/src/commonTest/kotlin/com/wire/kalium/cryptography/ProteusClientTest.kt +++ b/cryptography/src/commonTest/kotlin/com/wire/kalium/cryptography/ProteusClientTest.kt @@ -39,7 +39,7 @@ class ProteusClientTest : BaseProteusClientTest() { private val alice = SampleUser(CryptoUserID("aliceId", "aliceDomain"), "Alice") private val bob = SampleUser(CryptoUserID("bobId", "bobDomain"), "Bob") private val aliceSessionId = CryptoSessionId(alice.id, CryptoClientId("aliceClient")) - private val bobSessionId = CryptoSessionId(alice.id, CryptoClientId("aliceClient")) + private val bobSessionId = CryptoSessionId(bob.id, CryptoClientId("bobClient")) @BeforeTest fun before() { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 56277f7296b..25b0685c396 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -37,7 +37,7 @@ pbandk = "0.14.2" turbine = "1.0.0" avs = "9.6.13" jna = "5.14.0" -core-crypto = "1.0.0-rc.56-hotfix.1" +core-crypto = "1.0.0-rc.56-hotfix.2" core-crypto-multiplatform = "0.6.0-rc.3-multiplatform-pre1" completeKotlin = "1.1.0" desugar-jdk = "2.0.4" diff --git a/logic/src/commonJvmAndroid/kotlin/com/wire/kalium/logic/CoreCryptoExceptionMapper.kt b/logic/src/commonJvmAndroid/kotlin/com/wire/kalium/logic/CoreCryptoExceptionMapper.kt index c67d4c181f0..d4ba1b1e45e 100644 --- a/logic/src/commonJvmAndroid/kotlin/com/wire/kalium/logic/CoreCryptoExceptionMapper.kt +++ b/logic/src/commonJvmAndroid/kotlin/com/wire/kalium/logic/CoreCryptoExceptionMapper.kt @@ -21,19 +21,19 @@ import com.wire.crypto.CoreCryptoException import uniffi.core_crypto.CryptoError actual fun mapMLSException(exception: Exception): MLSFailure = - if (exception is CoreCryptoException.CryptoException) { - when (exception.error) { - is CryptoError.WrongEpoch -> MLSFailure.WrongEpoch - is CryptoError.DuplicateMessage -> MLSFailure.DuplicateMessage - is CryptoError.BufferedFutureMessage -> MLSFailure.BufferedFutureMessage - is CryptoError.SelfCommitIgnored -> MLSFailure.SelfCommitIgnored - is CryptoError.UnmergedPendingGroup -> MLSFailure.UnmergedPendingGroup - is CryptoError.StaleProposal -> MLSFailure.StaleProposal - is CryptoError.StaleCommit -> MLSFailure.StaleCommit - is CryptoError.ConversationAlreadyExists -> MLSFailure.ConversationAlreadyExists - is CryptoError.MessageEpochTooOld -> MLSFailure.MessageEpochTooOld - else -> MLSFailure.Generic(exception) - } - } else { - MLSFailure.Generic(exception) + if (exception is CoreCryptoException.CryptoException) { + when (exception.error) { + is CryptoError.WrongEpoch -> MLSFailure.WrongEpoch + is CryptoError.DuplicateMessage -> MLSFailure.DuplicateMessage + is CryptoError.BufferedFutureMessage -> MLSFailure.BufferedFutureMessage + is CryptoError.SelfCommitIgnored -> MLSFailure.SelfCommitIgnored + is CryptoError.UnmergedPendingGroup -> MLSFailure.UnmergedPendingGroup + is CryptoError.StaleProposal -> MLSFailure.StaleProposal + is CryptoError.StaleCommit -> MLSFailure.StaleCommit + is CryptoError.ConversationAlreadyExists -> MLSFailure.ConversationAlreadyExists + is CryptoError.MessageEpochTooOld -> MLSFailure.MessageEpochTooOld + else -> MLSFailure.Generic(exception) } + } else { + MLSFailure.Generic(exception) + }