Skip to content

Commit b9bc04d

Browse files
authored
Merge pull request #1415 from WalletConnect/develop
BOM_1.32.0
2 parents e18f8dd + 5b13696 commit b9bc04d

File tree

82 files changed

+1352
-957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1352
-957
lines changed

ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies {
2323

2424
| BOM | [Core SDK](core/android) | [Sign SDK](protocol/sign) | [Auth SDK](protocol/auth) | [Chat SDK](protocol/chat) | [Notify SDK](protocol/notify) | [web3wallet](product/web3wallet) | [web3modal](product/web3modal) | [WalletConnectModal](product/walletconnectmodal) |
2525
|-----------------------------------------------------------------------------------------|--------------------------|---------------------------|---------------------------|---------------------------|:------------------------------|----------------------------------|--------------------------------|--------------------------------------------------|
26-
| 1.31.4 | 1.31.3 | 2.31.3 | 1.28.2 | 1.0.0.beta30 | 1.3.3 | 1.31.3 | 1.5.3 | 1.5.3 |
26+
| 1.32.0 | 1.32.0 | 2.32.0 | 1.28.2 | 1.0.0.beta30 | 1.3.4 | 1.32.0 | 1.5.4 | 1.5.4 |
2727
| 1.31.3 | 1.31.2 | 2.31.2 | 1.28.2 | 1.0.0.beta30 | 1.3.2 | 1.31.2 | 1.5.2 | 1.5.2 |
2828
| 1.31.1 | 1.31.1 | 2.31.1 | 1.28.1 | 1.0.0.beta26 | 1.3.1 | 1.31.1 | 1.5.1 | 1.5.1 |
2929
| 1.31.0<sup>[**](https://gist.github.com/TalhaAli00/7b9e1cadf19b9dc5141cd033aa4e6172) | 1.31.0 | 2.31.0 | 1.28.0 | 1.0.0.beta25 | 1.3.0 | 1.31.0 | 1.5.0 | 1.5.0 |

buildSrc/src/main/kotlin/Versions.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ const val KEY_PUBLISH_ARTIFACT_ID = "PUBLISH_ARTIFACT_ID"
55
const val KEY_SDK_NAME = "SDK_NAME"
66

77
//Latest versions
8-
const val BOM_VERSION = "1.31.4"
8+
const val BOM_VERSION = "1.32.0"
99
const val FOUNDATION_VERSION = "1.17.2"
10-
const val CORE_VERSION = "1.31.3"
11-
const val SIGN_VERSION = "2.31.3"
10+
const val CORE_VERSION = "1.32.0"
11+
const val SIGN_VERSION = "2.32.0"
1212
const val AUTH_VERSION = "1.28.2"
1313
const val CHAT_VERSION = "1.0.0-beta30"
14-
const val NOTIFY_VERSION = "1.3.3"
15-
const val WEB_3_WALLET_VERSION = "1.31.3"
16-
const val WEB_3_MODAL_VERSION = "1.5.3"
17-
const val WC_MODAL_VERSION = "1.5.3"
18-
const val MODAL_CORE_VERSION = "1.5.3"
14+
const val NOTIFY_VERSION = "1.3.4"
15+
const val WEB_3_WALLET_VERSION = "1.32.0"
16+
const val WEB_3_MODAL_VERSION = "1.5.4"
17+
const val WC_MODAL_VERSION = "1.5.4"
18+
const val MODAL_CORE_VERSION = "1.5.4"
1919

2020
val jvmVersion = JavaVersion.VERSION_11
2121
const val MIN_SDK: Int = 23

core/android/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ dependencies {
110110
testImplementation(libs.coroutines.test)
111111
testImplementation(libs.bundles.scarlet.test)
112112
testImplementation(libs.bundles.sqlDelight.test)
113+
testImplementation(libs.koin.test)
113114

114115
androidTestUtil(libs.androidx.testOrchestrator)
115116
androidTestImplementation(libs.bundles.androidxAndroidTest)

core/android/src/androidTest/kotlin/com/walletconnect/android/di/OverrideModule.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ private const val KEY_STORE_ALIAS = "wc_keystore_key"
1313

1414
// When called more that once, different `storagePrefix` must be defined.
1515
@JvmSynthetic
16-
internal fun overrideModule(relay: RelayConnectionInterface, pairing: PairingInterface, pairingController: PairingControllerInterface, storagePrefix: String) = module {
16+
internal fun overrideModule(
17+
relay: RelayConnectionInterface,
18+
pairing: PairingInterface,
19+
pairingController: PairingControllerInterface,
20+
storagePrefix: String,
21+
bundleId: String
22+
) = module {
1723
val sharedPrefsFile = storagePrefix + SHARED_PREFS_FILE
1824
val keyStoreAlias = storagePrefix + KEY_STORE_ALIAS
1925

2026
single { relay }
2127

2228
includes(
23-
coreStorageModule(storagePrefix),
29+
coreStorageModule(storagePrefix, bundleId),
2430
corePairingModule(pairing, pairingController),
2531
coreCryptoModule(sharedPrefsFile, keyStoreAlias),
2632
coreJsonRpcModule()

core/android/src/androidTest/kotlin/com/walletconnect/android/test/utils/TestClient.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ internal object TestClient {
7878
Relay = RelayClient(secondaryKoinApp)
7979

8080
// Override of storage instances and depending objects
81-
secondaryKoinApp.modules(overrideModule(Relay, Pairing, PairingController, "test_secondary"))
81+
secondaryKoinApp.modules(overrideModule(Relay, Pairing, PairingController, "test_secondary", app.packageName))
8282

8383
// Necessary reinit of Relay, Pairing and PairingController
8484
Relay.initialize { Timber.e(it) }

core/android/src/debug/kotlin/com/walletconnect/android/di/CoreStorageModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import org.koin.android.ext.koin.androidContext
1212
import org.koin.core.qualifier.named
1313
import org.koin.dsl.module
1414

15-
fun coreStorageModule(storagePrefix: String = String.Empty) = module {
15+
fun coreStorageModule(storagePrefix: String = String.Empty, bundleId: String) = module {
1616

17-
includes(baseStorageModule(storagePrefix))
17+
includes(baseStorageModule(storagePrefix, bundleId))
1818

1919
single<SqlDriver>(named(AndroidBuildVariantDITags.ANDROID_CORE_DATABASE_DRIVER)) {
2020
AndroidSqliteDriver(

core/android/src/main/kotlin/com/walletconnect/android/CoreInterface.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ interface CoreInterface {
3232
relay: RelayConnectionInterface? = null,
3333
keyServerUrl: String? = null,
3434
networkClientTimeout: NetworkClientTimeout? = null,
35+
telemetryEnabled: Boolean = true,
3536
onError: (Core.Model.Error) -> Unit,
3637
)
3738
}

core/android/src/main/kotlin/com/walletconnect/android/CoreProtocol.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.walletconnect.android
22

33
import android.app.Application
44
import com.walletconnect.android.di.coreStorageModule
5+
import com.walletconnect.android.internal.common.di.AndroidCommonDITags
56
import com.walletconnect.android.internal.common.di.coreAndroidNetworkModule
67
import com.walletconnect.android.internal.common.di.coreCommonModule
78
import com.walletconnect.android.internal.common.di.coreCryptoModule
@@ -17,6 +18,7 @@ import com.walletconnect.android.internal.common.explorer.ExplorerProtocol
1718
import com.walletconnect.android.internal.common.model.AppMetaData
1819
import com.walletconnect.android.internal.common.model.ProjectId
1920
import com.walletconnect.android.internal.common.model.Redirect
21+
import com.walletconnect.android.internal.common.model.TelemetryEnabled
2022
import com.walletconnect.android.internal.common.wcKoinApp
2123
import com.walletconnect.android.pairing.client.PairingInterface
2224
import com.walletconnect.android.pairing.client.PairingProtocol
@@ -36,6 +38,7 @@ import com.walletconnect.android.verify.client.VerifyClient
3638
import com.walletconnect.android.verify.client.VerifyInterface
3739
import org.koin.android.ext.koin.androidContext
3840
import org.koin.core.KoinApplication
41+
import org.koin.core.qualifier.named
3942
import org.koin.dsl.module
4043

4144
class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInterface {
@@ -69,6 +72,7 @@ class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInter
6972
relay: RelayConnectionInterface?,
7073
keyServerUrl: String?,
7174
networkClientTimeout: NetworkClientTimeout?,
75+
telemetryEnabled: Boolean,
7276
onError: (Core.Model.Error) -> Unit
7377
) {
7478
try {
@@ -78,6 +82,7 @@ class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInter
7882
require(relayServerUrl.isValidRelayServerUrl()) { "Check the schema and projectId parameter of the Server Url" }
7983
modules(
8084
module { single { ProjectId(relayServerUrl.projectId()) } },
85+
module { single(named(AndroidCommonDITags.TELEMETRY_ENABLED)) { TelemetryEnabled(telemetryEnabled) } },
8186
coreAndroidNetworkModule(relayServerUrl, connectionType.toCommonConnectionType(), BuildConfig.SDK_VERSION, networkClientTimeout, bundleId),
8287
coreCommonModule(),
8388
coreCryptoModule(),
@@ -88,7 +93,7 @@ class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInter
8893
}
8994

9095
modules(
91-
coreStorageModule(),
96+
coreStorageModule(bundleId = bundleId),
9297
pushModule(),
9398
module { single { relay ?: Relay } },
9499
module { single { with(metaData) { AppMetaData(name = name, description = description, url = url, icons = icons, redirect = Redirect(redirect)) } } },

core/android/src/main/kotlin/com/walletconnect/android/internal/common/di/AndroidCommonDITags.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ enum class AndroidCommonDITags {
3939
DECRYPT_AUTH_MESSAGE,
4040
DECRYPT_NOTIFY_MESSAGE,
4141
DECRYPT_USE_CASES,
42-
ENABLE_ANALYTICS,
43-
ENABLE_AUTHENTICATE
42+
ENABLE_WEB_3_MODAL_ANALYTICS,
43+
ENABLE_AUTHENTICATE,
44+
TELEMETRY_ENABLED,
4445
}

core/android/src/main/kotlin/com/walletconnect/android/internal/common/di/BaseStorageModule.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.squareup.moshi.Moshi
66
import com.walletconnect.android.di.AndroidBuildVariantDITags
77
import com.walletconnect.android.internal.common.model.AppMetaDataType
88
import com.walletconnect.android.internal.common.model.Validation
9+
import com.walletconnect.android.internal.common.storage.events.EventsRepository
910
import com.walletconnect.android.internal.common.storage.identity.IdentitiesStorageRepository
1011
import com.walletconnect.android.internal.common.storage.metadata.MetadataStorageRepository
1112
import com.walletconnect.android.internal.common.storage.metadata.MetadataStorageRepositoryInterface
@@ -15,6 +16,7 @@ import com.walletconnect.android.internal.common.storage.push_messages.PushMessa
1516
import com.walletconnect.android.internal.common.storage.rpc.JsonRpcHistory
1617
import com.walletconnect.android.internal.common.storage.verify.VerifyContextStorageRepository
1718
import com.walletconnect.android.sdk.core.AndroidCoreDatabase
19+
import com.walletconnect.android.sdk.storage.data.dao.EventDao
1820
import com.walletconnect.android.sdk.storage.data.dao.MetaData
1921
import com.walletconnect.android.sdk.storage.data.dao.VerifyContext
2022
import com.walletconnect.utils.Empty
@@ -24,7 +26,7 @@ import org.koin.core.scope.Scope
2426
import org.koin.dsl.module
2527
import com.walletconnect.android.internal.common.scope as wcScope
2628

27-
fun baseStorageModule(storagePrefix: String = String.Empty) = module {
29+
fun baseStorageModule(storagePrefix: String = String.Empty, bundleId: String) = module {
2830

2931
fun Scope.createCoreDB(): AndroidCoreDatabase = AndroidCoreDatabase(
3032
driver = get(named(AndroidBuildVariantDITags.ANDROID_CORE_DATABASE_DRIVER)),
@@ -34,6 +36,9 @@ fun baseStorageModule(storagePrefix: String = String.Empty) = module {
3436
),
3537
VerifyContextAdapter = VerifyContext.Adapter(
3638
validationAdapter = get(named(AndroidCommonDITags.COLUMN_ADAPTER_VALIDATION))
39+
),
40+
EventDaoAdapter = EventDao.Adapter(
41+
traceAdapter = get(named(AndroidCommonDITags.COLUMN_ADAPTER_LIST))
3742
)
3843
)
3944

@@ -101,6 +106,8 @@ fun baseStorageModule(storagePrefix: String = String.Empty) = module {
101106

102107
single { get<AndroidCoreDatabase>(named(AndroidBuildVariantDITags.ANDROID_CORE_DATABASE)).pushMessageQueries }
103108

109+
single { get<AndroidCoreDatabase>(named(AndroidBuildVariantDITags.ANDROID_CORE_DATABASE)).eventQueries }
110+
104111
single<MetadataStorageRepositoryInterface> { MetadataStorageRepository(metaDataQueries = get()) }
105112

106113
single<PairingStorageRepositoryInterface> { PairingStorageRepository(pairingQueries = get()) }
@@ -113,5 +120,7 @@ fun baseStorageModule(storagePrefix: String = String.Empty) = module {
113120

114121
single { PushMessagesRepository(pushMessageQueries = get()) }
115122

123+
single { EventsRepository(eventQueries = get(), bundleId = bundleId, telemetryEnabled = get(named(AndroidCommonDITags.TELEMETRY_ENABLED))) }
124+
116125
single { DatabaseConfig(storagePrefix = storagePrefix) }
117126
}

0 commit comments

Comments
 (0)