I have following problem. I just can't figure out how to initialize WalletConnect and connect to Metamask on Android. I always get following exception.
java.lang.NoSuchMethodError: No interface method getInitializationErrorsFlow()Lkotlinx/coroutines/flow/Flow; in class Lcom/walletconnect/android/internal/common/model/JsonRpcInteractorInterface;
My code looks as follows:
val projectId = "15f2b4ae8bb12dsd3d267ce6441d5a9d" // I got the Project ID from https://cloud.walletconnect.com/
val relayUrl = "relay.walletconnect.com"
val serverUrl = "wss://$relayUrl?projectId=$projectId"
val connectionType = ConnectionType.AUTOMATIC
val appMetaData = Core.Model.AppMetaData( // <-- What data should be entered here?
name = "Metamask",
description = "Description",
url = "Wallet Url", // How can I get the wallet url?
icons = listOf(""),
redirect = "kotlin-wallet-wc:/request"
)
CoreClient.initialize(relayServerUrl = serverUrl, connectionType = connectionType, application = application, metaData = appMetaData)
val init = Sign.Params.Init(CoreClient)
SignClient.initialize(init, onError = { error ->
})