-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Title: Kotlin SDK: WalletKit.approveSession callback does not provide topic (unlike iOS)
Description:
In the iOS SDK (WalletKitClient.approve), the callback returns a Session object that already contains the topic. This allows saving and using it right away.
In the Kotlin SDK, after calling WalletKit.approveSession, the callback returns a SessionApprove object, but it does not contain topic. The only way to get the topic is by waiting for the onSessionSettleResponse callback.
The issue is that if the dApp website is closed before onSessionSettleResponse is triggered, the callback never arrives, and there is no way to obtain the topic.
Steps to Reproduce:
Call WalletKit.approveSession.
Receive SessionApprove object in the callback.
Notice that it does not contain topic.
Close the dApp site before onSessionSettleResponse.
topic is never available.
Expected behavior:
Just like in the iOS SDK, the topic should be available immediately after approving the session — for example, by including it in the SessionApprove object.
Alternatives / Questions:
Is it possible to add topic to the SessionApprove object returned by the callback?
If not, is there another reliable way to get topic without waiting for onSessionSettleResponse?