Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubuid committed Sep 10, 2024
1 parent 3fb9e5a commit bfcd177
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions product/appkit/src/main/kotlin/com/reown/appkit/client/AppKit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,31 @@ object AppKit {
*/
fun getSelectedChain() = selectedChain

/**
* Caution: This function is blocking and runs on the current thread.
* It is advised that this function be called from background operation
*/
@Deprecated(
message = "Getting active session is replaced with getAccount()",
replaceWith = ReplaceWith("com.reown.appkit.client.AppKit.getAccount()"),
level = DeprecationLevel.WARNING
)
internal fun getActiveSessionByTopic(topic: String) = SignClient.getActiveSessionByTopic(topic)?.toModal()

/**
* Caution: This function is blocking and runs on the current thread.
* It is advised that this function be called from background operation
*/
@Deprecated(
message = "Getting active session is replaced with getAccount()",
replaceWith = ReplaceWith("com.reown.appkit.client.AppKit.getAccount()"),
level = DeprecationLevel.WARNING
)
fun getActiveSession(): Modal.Model.Session? {
checkEngineInitialization()
return (appKitEngine.getActiveSession() as? WalletConnect)?.topic?.let { SignClient.getActiveSessionByTopic(it)?.toModal() }
}

/**
* Caution: This function is blocking and runs on the current thread.
* It is advised that this function be called from background operation
Expand Down

0 comments on commit bfcd177

Please sign in to comment.