Updated on 2026-08-14
This commit is contained in:
parent
b280cd9e5e
commit
a0f6e4a008
6 changed files with 10 additions and 22 deletions
|
|
@ -297,9 +297,6 @@ abstract class TangemApplication : Application(), ImageLoaderFactory, Configurat
|
|||
appScope.launch {
|
||||
launch(Dispatchers.IO) {
|
||||
loadNativeLibraries()
|
||||
walletConnect2Repository.init(
|
||||
projectId = environmentConfigStorage.getConfigSync().walletConnectProjectId,
|
||||
)
|
||||
updateLogFiles()
|
||||
}
|
||||
}
|
||||
|
|
@ -323,6 +320,9 @@ abstract class TangemApplication : Application(), ImageLoaderFactory, Configurat
|
|||
)
|
||||
|
||||
appStateHolder.mainStore = store
|
||||
walletConnect2Repository.init(
|
||||
projectId = environmentConfigStorage.getConfigSync().walletConnectProjectId,
|
||||
)
|
||||
}
|
||||
|
||||
private fun createReduxStore(): Store<AppState> {
|
||||
|
|
|
|||
|
|
@ -45,10 +45,9 @@ internal class DefaultLegacyWalletConnectRepositoryFacade constructor(
|
|||
if (isNewWc) stub.currentSessions else legacy.currentSessions
|
||||
}
|
||||
|
||||
override suspend fun init(projectId: String) {
|
||||
override fun init(projectId: String) {
|
||||
if (isNewWc) {
|
||||
stub.init(projectId)
|
||||
wcInitializeUseCase.init() // TODO(wc) Nikolai: Delete after RoutingComponent finished.
|
||||
wcInitializeUseCase.init(projectId)
|
||||
} else {
|
||||
legacy.init(projectId)
|
||||
}
|
||||
|
|
@ -96,7 +95,7 @@ internal class LegacyWalletConnectRepositoryStub : LegacyWalletConnectRepository
|
|||
override val activeSessions: Flow<List<WalletConnectSession>> = emptyFlow()
|
||||
override val currentSessions: List<WalletConnectSession> = listOf()
|
||||
|
||||
override suspend fun init(projectId: String) = Unit
|
||||
override fun init(projectId: String) = Unit
|
||||
|
||||
override fun setUserNamespaces(userNamespaces: Map<NetworkNamespace, List<Account>>) = Unit
|
||||
|
||||
|
|
@ -141,7 +140,7 @@ internal class DefaultLegacyWalletConnectRepository(
|
|||
/**
|
||||
* @param projectId Project ID at https://cloud.walletconnect.com/
|
||||
*/
|
||||
override suspend fun init(projectId: String) {
|
||||
override fun init(projectId: String) {
|
||||
val relayUrl = "relay.walletconnect.com"
|
||||
val serverUrl = "wss://$relayUrl?projectId=$projectId"
|
||||
val connectionType = ConnectionType.AUTOMATIC
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ interface LegacyWalletConnectRepository {
|
|||
|
||||
val currentSessions: List<WalletConnectSession>
|
||||
|
||||
suspend fun init(projectId: String)
|
||||
fun init(projectId: String)
|
||||
|
||||
fun setUserNamespaces(userNamespaces: Map<NetworkNamespace, List<Account>>)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue