diff --git a/.github/workflows/ci_sonarcloud.yml b/.github/workflows/ci_sonarcloud.yml index 42318b3267..e19745af7c 100644 --- a/.github/workflows/ci_sonarcloud.yml +++ b/.github/workflows/ci_sonarcloud.yml @@ -62,4 +62,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./gradlew jacocoDebugTestReport --stacktrace sonar --stacktrace \ No newline at end of file + run: ./gradlew sonar --stacktrace +# jacocoDebugTestReport --stacktrace \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 5ccd264404..2c04f8f5bb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -36,7 +36,7 @@ sonar { "sonar.organization" to "walletconnect", "sonar.host.url" to "https://sonarcloud.io", "sonar.gradle.skipCompile" to true, - "sonar.coverage.exclusions" to "sample/**,**/di/**" + "sonar.coverage.exclusions" to "sample/**,**/di/**,/buildSrc/**,**/gradle/**,**/test/**,**/androidTest/**,**/build.gradle.kts", ) ) } @@ -55,7 +55,7 @@ subprojects { "sonar.gradle.skipCompile" to true, "sonar.sources" to "${projectDir}/src/main/kotlin", "sonar.java.binaries" to layout.buildDirectory, - "sonar.coverage.jacoco.xmlReportPaths" to "${layout.buildDirectory}/reports/jacoco/xml/jacoco.xml" +// "sonar.coverage.jacoco.xmlReportPaths" to "${layout.buildDirectory}/reports/jacoco/xml/jacoco.xml" ) ) } diff --git a/buildSrc/src/main/kotlin/jacoco-report.gradle.kts b/buildSrc/src/main/kotlin/jacoco-report.gradle.kts index 1867a138c7..d29b825460 100644 --- a/buildSrc/src/main/kotlin/jacoco-report.gradle.kts +++ b/buildSrc/src/main/kotlin/jacoco-report.gradle.kts @@ -24,38 +24,38 @@ private val sourceDirectoriesTree = fileTree("${project.projectDir}") { "src/debug/**", ) } -private val classDirectoriesTree = fileTree("${project.buildDir}") { +private val classDirectoriesTree = fileTree("${project.layout.buildDirectory}") { include( "intermediates/javac/debug/classes/**", "tmp/kotlin-classes/debug/**" ) exclude(fileFilter) } -private val executionDataTree = fileTree(project.buildDir) { +private val executionDataTree = fileTree(project.layout.buildDirectory) { include( "jacoco/testDebugUnitTest.exec" ) } -tasks { - register("jacocoDebugTestReport") { - group = "Reporting" - description = "Code coverage report for both Android and Unit tests." - - dependsOn("testDebugUnitTest") - reports { - xml.required.set(true) - html.required.set(true) - html.outputLocation.set(file("${buildDir}/reports/jacoco/html")) - xml.outputLocation.set(file("${buildDir}/reports/jacoco/xml/jacoco.xml")) - } - sourceDirectories.setFrom(sourceDirectoriesTree) - classDirectories.setFrom(files(classDirectoriesTree)) - executionData.setFrom(executionDataTree) - } -} - -afterEvaluate { - project.tasks.getByName("testDebugUnitTest") - .finalizedBy("jacocoDebugTestReport") -} \ No newline at end of file +//tasks { +// register("jacocoDebugTestReport") { +// group = "Reporting" +// description = "Code coverage report for both Android and Unit tests." +// +// dependsOn("testDebugUnitTest") +// reports { +// xml.required.set(true) +// html.required.set(true) +// html.outputLocation.set(file("${layout.buildDirectory}/reports/jacoco/html")) +// xml.outputLocation.set(file("${layout.buildDirectory}/reports/jacoco/xml/jacoco.xml")) +// } +// sourceDirectories.setFrom(sourceDirectoriesTree) +// classDirectories.setFrom(files(classDirectoriesTree)) +// executionData.setFrom(executionDataTree) +// } +//} +// +//afterEvaluate { +// project.tasks.getByName("testDebugUnitTest") +// .finalizedBy("jacocoDebugTestReport") +//} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/publish-module-android.gradle.kts b/buildSrc/src/main/kotlin/publish-module-android.gradle.kts index 33705d1801..098806a22d 100644 --- a/buildSrc/src/main/kotlin/publish-module-android.gradle.kts +++ b/buildSrc/src/main/kotlin/publish-module-android.gradle.kts @@ -12,10 +12,9 @@ tasks { register("javadocJar", Jar::class) { dependsOn(named("dokkaHtml")) archiveClassifier.set("javadoc") - from("$buildDir/dokka/html") + from("${layout.buildDirectory}/dokka/html") } - @Suppress("UnstableApiUsage") register("sourcesJar", Jar::class) { archiveClassifier.set("sources") from( @@ -45,7 +44,6 @@ afterEvaluate { name.set("WalletConnect ${requireNotNull(extra.get(KEY_SDK_NAME))}") description.set("${requireNotNull(extra.get(KEY_SDK_NAME))} SDK for WalletConnect") url.set("https://github.com/WalletConnect/WalletConnectKotlinV2") - licenses { license { name.set("The Apache License, Version 2.0") diff --git a/buildSrc/src/main/kotlin/release-scripts.gradle.kts b/buildSrc/src/main/kotlin/release-scripts.gradle.kts index fc435d680a..412226d0f2 100644 --- a/buildSrc/src/main/kotlin/release-scripts.gradle.kts +++ b/buildSrc/src/main/kotlin/release-scripts.gradle.kts @@ -1,4 +1,5 @@ import org.apache.tools.ant.taskdefs.condition.Os +import java.util.Locale import kotlin.reflect.full.safeCast // Example ./gradlew releaseAllSDKs -Ptype=local @@ -9,7 +10,7 @@ tasks.register("releaseAllSDKs") { ?.run(String::class::safeCast) ?.run { println("Converting parameter to an supported ReleaseType value") - ReleaseType.valueOf(this.toUpperCase()) + ReleaseType.valueOf(this.uppercase(Locale.getDefault())) }?.let { releaseType -> generateListOfModuleTasks(releaseType).forEach { task -> println("Executing Task: $task") diff --git a/core/android/build.gradle.kts b/core/android/build.gradle.kts index 7db20e7316..7d31f79b92 100644 --- a/core/android/build.gradle.kts +++ b/core/android/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") - id("jacoco-report") +// id("jacoco-report") } project.apply { @@ -89,11 +89,8 @@ dependencies { api(libs.coroutines) implementation(libs.scarlet.android) implementation(libs.bundles.sqlDelight) - api(libs.sqlCipher) { - artifact { - type = "aar" - } - } + //noinspection UseTomlInstead + api("net.zetetic:android-database-sqlcipher:4.5.4@aar") implementation(libs.relinker) api(libs.androidx.security) api(libs.koin.android) diff --git a/core/modal/build.gradle.kts b/core/modal/build.gradle.kts index c5dff9bae4..a875f9f91c 100644 --- a/core/modal/build.gradle.kts +++ b/core/modal/build.gradle.kts @@ -38,7 +38,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } buildFeatures { compose = true diff --git a/gradle.properties b/gradle.properties index 275c33e47b..6d0d81c77f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,5 @@ android.useAndroidX=true android.enableJetifier=false # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official -android.enableR8.fullMode=false \ No newline at end of file +android.enableR8.fullMode=false +org.gradle.warning.mode=all \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ef5d84cbc3..5df3fac223 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,59 +1,59 @@ [versions] -jerseyCommon = "3.1.0" -kotlin = "1.9.23" -ksp = "1.9.23-1.0.19" -agp = "8.3.1" +jerseyCommon = "3.1.6" +kotlin = "1.9.24" +ksp = "1.9.24-1.0.20" +agp = "8.4.1" minSdk = "23" targetSdk = "34" compileSdk = "34" -composeCompiler = "1.5.11" -composeBOM = "2024.03.00" -composeViewModel = "2.6.1" -accompanist = "0.31.3-beta" +composeCompiler = "1.5.14" +composeBOM = "2024.05.00" +composeViewModel = "2.8.0" +accompanist = "0.34.0" -coroutines = "1.7.3" +coroutines = "1.8.1" sqlDelight = "2.0.0" -dokka = "1.7.10" -moshi = "1.15.0" -googleService = "4.3.15" +dokka = "1.9.20" +moshi = "1.15.1" +googleService = "4.4.1" scarlet = "1.0.1" -koin = "3.4.2" -retrofit = "2.9.0" -okhttp = "4.11.0" +koin = "3.5.6" +retrofit = "2.11.0" +okhttp = "4.12.0" bouncyCastle = "1.77" -sqlCipher = "4.5.3" +sqlCipher = "4.5.4" multibase = "1.1.1" json = "20220924" timber = "5.0.1" web3j = "4.9.8-hotfix" -kethereum = "0.85.7" -wsRestJava = "3.1.0" +kethereum = "0.86.0" +wsRestJava = "4.0.0" relinker = "1.4.5" -coil = "2.3.0" +coil = "2.6.0" customQrGenerator = "1.6.2" beagle = "2.9.0" coinbase = "1.0.4" -firebaseBOM = "32.2.0" -firebaseAppDistribution = "4.0.0" +firebaseBOM = "33.0.0" +firebaseAppDistribution = "5.0.0" -androidxCore = "1.10.1" +androidxCore = "1.13.1" androidxAppCompat = "1.6.1" -andoridxMaterial = "1.9.0" -androidxLifecycle = "2.6.1" +andoridxMaterial = "1.12.0" +androidxLifecycle = "2.8.0" androidxTest = "1.5.0" androidxTestOrchestration = "1.4.2" androidxSecurity = "1.1.0-alpha06" -androidxDatastore = "1.0.0" -androidxNavigation = "2.5.3" +androidxDatastore = "1.1.1" +androidxNavigation = "2.7.7" jUnit = "4.13.2" -robolectric = "4.9.2" -mockk = "1.13.5" -turbine = "1.0.0" -paparazzi = "1.3.1" +robolectric = "4.12.2" +mockk = "1.13.11" +turbine = "1.1.0" +paparazzi = "1.3.4" [libraries] sqlDelight-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqlDelight" } @@ -73,7 +73,7 @@ androidx-datastore = { module = "androidx.datastore:datastore-preferences", vers androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidxCore" } androidx-appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidxAppCompat" } androidx-material = { module = "com.google.android.material:material", version.ref = "andoridxMaterial" } -androidx-testJunit = { module = "androidx.test.ext:junit-ktx", version = "1.1.3" } +androidx-testJunit = { module = "androidx.test.ext:junit-ktx", version = "1.1.5" } androidx-testCore = { module = "androidx.test:core-ktx", version.ref = "androidxTest" } androidx-testOrchestrator = { module = "androidx.test:orchestrator", version.ref = "androidxTestOrchestration" } androidx-testRunner = { module = "androidx.test:runner", version = "1.5.2" } @@ -84,11 +84,11 @@ androidx-compose-ui = { module = "androidx.compose.ui:ui" } androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } -androidx-compose-ui-test-junit = { module = "androidx.compose.ui:ui-test-junit4", version = "1.5.1" } +androidx-compose-ui-test-junit = { module = "androidx.compose.ui:ui-test-junit4", version = "1.6.7" } androidx-compose-navigation = { module = "androidx.navigation:navigation-compose", version.ref = "androidxNavigation" } androidx-compose-navigation-testing = { module = "androidx.navigation:navigation-testing", version.ref = "androidxNavigation" } androidx-compose-lifecycle = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "composeViewModel" } -androidx-compose-material = { module = "androidx.compose.material:material", version = "1.5.0-alpha04" } +androidx-compose-material = { module = "androidx.compose.material:material", version = "1.6.7" } coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } @@ -190,7 +190,7 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } -firebase-crashlytics = { id = "com.google.firebase.crashlytics", version = "2.9.9" } +firebase-crashlytics = { id = "com.google.firebase.crashlytics", version = "3.0.1" } firebase-distribution = { id = "com.google.firebase.appdistribution", version.ref = "firebaseAppDistribution" } google-services = { id = "com.google.gms.google-services", version.ref = "googleService" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f6b961fd5a..7f93135c49 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5416938db0..8b9f390028 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Jun 21 12:19:25 CEST 2023 +#Mon May 20 12:20:30 CEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists +zipStorePath=wrapper/dists \ No newline at end of file diff --git a/product/walletconnectmodal/build.gradle.kts b/product/walletconnectmodal/build.gradle.kts index 49db4c8d64..e8f4f8d4bc 100644 --- a/product/walletconnectmodal/build.gradle.kts +++ b/product/walletconnectmodal/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.google.ksp) alias(libs.plugins.paparazzi) id("publish-module-android") - id("jacoco-report") +// id("jacoco-report") } project.apply { @@ -44,7 +44,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } buildFeatures { compose = true diff --git a/product/web3modal/build.gradle.kts b/product/web3modal/build.gradle.kts index ae7c59b464..6e2820b734 100644 --- a/product/web3modal/build.gradle.kts +++ b/product/web3modal/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.google.ksp) alias(libs.plugins.paparazzi) id("publish-module-android") - id("jacoco-report") +// id("jacoco-report") } project.apply { @@ -44,7 +44,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } buildFeatures { compose = true diff --git a/product/web3wallet/build.gradle.kts b/product/web3wallet/build.gradle.kts index e490409785..949cdf9e92 100644 --- a/product/web3wallet/build.gradle.kts +++ b/product/web3wallet/build.gradle.kts @@ -3,7 +3,7 @@ plugins { id(libs.plugins.kotlin.android.get().pluginId) alias(libs.plugins.google.ksp) id("publish-module-android") - id("jacoco-report") +// id("jacoco-report") } project.apply { @@ -39,7 +39,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } buildFeatures { diff --git a/protocol/auth/build.gradle.kts b/protocol/auth/build.gradle.kts index 081519b00c..cda72dee11 100644 --- a/protocol/auth/build.gradle.kts +++ b/protocol/auth/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") - id("jacoco-report") +// id("jacoco-report") } project.apply { diff --git a/protocol/chat/build.gradle.kts b/protocol/chat/build.gradle.kts index 5b1250ef7c..b3e98c6b5a 100644 --- a/protocol/chat/build.gradle.kts +++ b/protocol/chat/build.gradle.kts @@ -1,10 +1,10 @@ plugins { - id("com.android.library") + id(libs.plugins.android.library.get().pluginId) id(libs.plugins.kotlin.android.get().pluginId) alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") - id("jacoco-report") +// id("jacoco-report") } project.apply { @@ -60,14 +60,14 @@ dependencies { debugImplementation(project(":core:android")) releaseImplementation("com.walletconnect:android-core:$CORE_VERSION") - retrofit() + implementation(libs.bundles.retrofit) ksp(libs.moshi.ksp) implementation(libs.bundles.sqlDelight) - androidXTest() + testImplementation(libs.bundles.androidxTest) testImplementation(libs.robolectric) testImplementation(libs.json) testImplementation(libs.coroutines.test) - scarletTest() + testImplementation(libs.bundles.scarlet.test) testImplementation(libs.bundles.sqlDelight.test) } \ No newline at end of file diff --git a/protocol/chat/src/main/kotlin/com/walletconnect/chat/engine/use_case/responses/OnInviteResponseUseCase.kt b/protocol/chat/src/main/kotlin/com/walletconnect/chat/engine/use_case/responses/OnInviteResponseUseCase.kt index 7cc151d4d9..91ab7558d4 100644 --- a/protocol/chat/src/main/kotlin/com/walletconnect/chat/engine/use_case/responses/OnInviteResponseUseCase.kt +++ b/protocol/chat/src/main/kotlin/com/walletconnect/chat/engine/use_case/responses/OnInviteResponseUseCase.kt @@ -2,25 +2,16 @@ package com.walletconnect.chat.engine.use_case.responses import com.walletconnect.android.internal.common.JsonRpcResponse import com.walletconnect.android.internal.common.crypto.kmr.KeyManagementRepository -import com.walletconnect.android.internal.common.jwt.did.extractVerifiedDidJwtClaims -import com.walletconnect.android.internal.common.model.SDKError import com.walletconnect.android.internal.common.model.WCResponse -import com.walletconnect.android.internal.common.model.params.ChatNotifyResponseAuthParams import com.walletconnect.android.internal.common.model.type.EngineEvent import com.walletconnect.android.internal.common.model.type.JsonRpcInteractorInterface import com.walletconnect.android.internal.common.scope import com.walletconnect.android.keyserver.domain.IdentitiesInteractor -import com.walletconnect.chat.common.exceptions.InvalidActClaims -import com.walletconnect.chat.common.exceptions.InviteResponseWasAlreadyReceived import com.walletconnect.chat.common.model.Events import com.walletconnect.chat.common.model.InviteStatus -import com.walletconnect.chat.jwt.ChatDidJwtClaims import com.walletconnect.chat.storage.InvitesStorageRepository import com.walletconnect.chat.storage.ThreadsStorageRepository -import com.walletconnect.foundation.common.model.PublicKey import com.walletconnect.foundation.util.Logger -import com.walletconnect.foundation.util.jwt.decodeDidPkh -import com.walletconnect.foundation.util.jwt.decodeX25519DidKey import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.flow.asSharedFlow @@ -53,43 +44,43 @@ internal class OnInviteResponseUseCase( } private suspend fun onAccepted(response: JsonRpcResponse.JsonRpcResult, wcResponse: WCResponse) { - - //TODO this method is called because ChatNotifyResponseAuthParams.ResponseAuth is to generic - //TODO remove return and handle this being called when it shouldn't - return - - val acceptParams = response.result as ChatNotifyResponseAuthParams.ResponseAuth - - // TODO - // Discuss what state is invite in if not verified - // invitesRepository.updateStatusByInviteId(wcResponse.response.id, InviteStatus.?????????) - val claims = extractVerifiedDidJwtClaims(acceptParams.responseAuth).getOrElse() { error -> return@onAccepted logger.error(error) } - if (claims.action != ChatDidJwtClaims.InviteApproval.ACT) return logger.error(InvalidActClaims(ChatDidJwtClaims.InviteApproval.ACT)) - - try { - val sentInvite = invitesRepository.getSentInviteByInviteId(wcResponse.response.id) - - if (sentInvite.status == InviteStatus.APPROVED || sentInvite.status == InviteStatus.REJECTED) return logger.error(InviteResponseWasAlreadyReceived) - - val selfPubKey: PublicKey = sentInvite.inviterPublicKey - val peerPubKey = decodeX25519DidKey(claims.subject) - val symmetricKey = keyManagementRepository.generateSymmetricKeyFromKeyAgreement(selfPubKey, peerPubKey) - val threadTopic = keyManagementRepository.getTopicFromKey(symmetricKey) - keyManagementRepository.setKey(symmetricKey, threadTopic.value) - - val inviteeAccountId = identitiesInteractor.resolveIdentityDidKey(claims.issuer).getOrThrow().value - val inviterAccountId = decodeDidPkh(claims.audience) - threadsRepository.insertThread(threadTopic.value, selfAccount = inviterAccountId, peerAccount = inviteeAccountId) - - jsonRpcInteractor.subscribe(threadTopic) { error -> scope.launch { _events.emit(SDKError(error)) } } - - invitesRepository.updateStatusByInviteId(wcResponse.response.id, InviteStatus.APPROVED) - - _events.emit(Events.OnInviteAccepted(threadTopic.value, sentInvite)) - } catch (e: Exception) { - scope.launch { _events.emit(SDKError(e)) } - return - } +// +// //TODO this method is called because ChatNotifyResponseAuthParams.ResponseAuth is to generic +// //TODO remove return and handle this being called when it shouldn't +// return +// +// val acceptParams = response.result as ChatNotifyResponseAuthParams.ResponseAuth +// +// // TODO +// // Discuss what state is invite in if not verified +// // invitesRepository.updateStatusByInviteId(wcResponse.response.id, InviteStatus.?????????) +// val claims = extractVerifiedDidJwtClaims(acceptParams.responseAuth).getOrElse() { error -> return@onAccepted logger.error(error) } +// if (claims.action != ChatDidJwtClaims.InviteApproval.ACT) return logger.error(InvalidActClaims(ChatDidJwtClaims.InviteApproval.ACT)) +// +// try { +// val sentInvite = invitesRepository.getSentInviteByInviteId(wcResponse.response.id) +// +// if (sentInvite.status == InviteStatus.APPROVED || sentInvite.status == InviteStatus.REJECTED) return logger.error(InviteResponseWasAlreadyReceived) +// +// val selfPubKey: PublicKey = sentInvite.inviterPublicKey +// val peerPubKey = decodeX25519DidKey(claims.subject) +// val symmetricKey = keyManagementRepository.generateSymmetricKeyFromKeyAgreement(selfPubKey, peerPubKey) +// val threadTopic = keyManagementRepository.getTopicFromKey(symmetricKey) +// keyManagementRepository.setKey(symmetricKey, threadTopic.value) +// +// val inviteeAccountId = identitiesInteractor.resolveIdentityDidKey(claims.issuer).getOrThrow().value +// val inviterAccountId = decodeDidPkh(claims.audience) +// threadsRepository.insertThread(threadTopic.value, selfAccount = inviterAccountId, peerAccount = inviteeAccountId) +// +// jsonRpcInteractor.subscribe(threadTopic) { error -> scope.launch { _events.emit(SDKError(error)) } } +// +// invitesRepository.updateStatusByInviteId(wcResponse.response.id, InviteStatus.APPROVED) +// +// _events.emit(Events.OnInviteAccepted(threadTopic.value, sentInvite)) +// } catch (e: Exception) { +// scope.launch { _events.emit(SDKError(e)) } +// return +// } } } \ No newline at end of file diff --git a/protocol/notify/build.gradle.kts b/protocol/notify/build.gradle.kts index e4d7be465a..1ed0feecff 100644 --- a/protocol/notify/build.gradle.kts +++ b/protocol/notify/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") - id("jacoco-report") +// id("jacoco-report") } project.apply { @@ -46,7 +46,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } testOptions { diff --git a/protocol/sign/build.gradle.kts b/protocol/sign/build.gradle.kts index 74c2bec6c8..68881886da 100644 --- a/protocol/sign/build.gradle.kts +++ b/protocol/sign/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") - id("jacoco-report") +// id("jacoco-report") } project.apply { @@ -61,7 +61,7 @@ android { kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } testOptions { diff --git a/settings.gradle.kts b/settings.gradle.kts index 23948ced0c..3358c9dc12 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -11,8 +11,7 @@ val excludedDirs = listOf( "gradle", "docs", "licenses", - "walletconnectv2", - "chat" + "walletconnectv2" ) // TODO: Add to rootModules when new module is added to the project root directory val rootModules = listOf("foundation")