Closed DhavalRKansara closed 3 months ago
Hello @DhavalRKansara, I don't understand your issue, could you elaborate a bit more, maybe with some reproducible code? I understand that you were using the connectResponse
parameter which is not available anymore but that parameter has no point to be public. What do you need to do exactly?
Hi @quetool I do use the connectResponse
parameter earlier as show below in code sample. Could you please guide me how I can replace it with latest changes?
SessionData? session =
await (await service).connectResponse?.session.future.timeout(
_mediumRequestWaitingTime,
onTimeout: () => throw TimeoutException('Timed out'),
);
I would first need to know what are you using that method for, it's wasn't supposed to be used from outside that is why it got removed. The only thing that method was used for is to wait for the wallet to respond to the connection request. Can I know what are you using for and which version were you using before?
Hi @quetool I need a SessionData which we go in the response of _web3App!.connect
sharing the ss of code below from version 3.0.1.
As per the latest update, the connectResponse
is not available to access directly How can I get the session data, which stores the result of _web3App!.connect
?
Oh I get it now. Simply, you just use w3mService.session?.sessionData
Oh I get it now. Simply, you just use
w3mService.session?.sessionData
Yes, But where are you setting the response of _web3App!.connect
to session.sessionData
?
You can also subscribe to w3mService.onSessionConnectEvent
like this:
_w3mService.onSessionConnectEvent.subscribe(_onSessionConnect);
void _onSessionConnect(SessionConnect? args) {
// args?.session is what you are looking for
}
This will be triggered once you approve the connection on your wallet.
Have you checked the example app in the repo?
Oh I get it now. Simply, you just use
w3mService.session?.sessionData
Does this will return the same object which we do get from connectResponse?.session
?
Yes!
Need any more help @DhavalRKansara ?
Closing for now. Feel free to re-open if needed!
Hi Team,
I have upgraded the package to the latest release 3.1.0 where I found we removed the public parameter
connectResponse
and we have done other changes as well...I found we do assign the value to
connectResponse
in thebuildConnectionUri
and then we are calling_awaitConnectionCallback
method but over here we are not storing the 'await connectResponse.session.futureanywhere which is needed to me. If we done changes related to to
_currentSessionthen we should assign the value to it in the
_awaitConnectionCallback`.I am stuck here in the production release please let me know the solution for the same using which I can fix the issues.