You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an instance of Web3Wallet created and I can connect to a dApp by listening to wcClient.onSessionProposal.subscribe.
I have also configured walletNamespaces with methods: ['eth_signTransaction', 'eth_sendTransaction', 'personal_sign', 'eth_sign', 'eth_signTypedData', 'eth_signTypedData_v4' ].
I have also setup wcClient.registerRequestHandler for each of those methods.
Next, I am pairing with the dApp using await wcClient.core.pairing.pair(uri: uri, activatePairing: true);.
Finally,
wcClient.onAuthRequest.subscribe((args) async {
// code here never runs when initiating a sign request from the dApp
});
Additional context:
The callbacks registered under registerRequestHandler do fire, but on their own, they cannot seem to authorise sign requests. I get an error saying that there are no pending requests. This is the function I attempt to use to respond to such requests:
Hello @DarksightKellar! Apologize for the late response!
Looks like you are having the same issue as this one here, do you mind checking it? #192 (comment)
TL;DR: onAuthRequest is not called during a sign/send transaction request and that's ok, onAuthRequest is called when creating a authentication request between dApp and wallet.
That's right, yes. That's the original issue I faced, which led me to dig deeper into the codebase, from where I tried to emulate usage of onAuthRequest. I was under the impression from the docs that onSessionProposal is where the connection is established, with wcClient.approveSession to be called in its callback.
I suppose there's still quite a bit lacking WRT to the presentation of the docs, outside whatever bug this issue is, but thanks for getting back to me.
Fingers crossed for a fix (+clarification on setup) soon.
I have an instance of
Web3Wallet
created and I can connect to a dApp by listening towcClient.onSessionProposal.subscribe
.I have also configured
walletNamespaces
withmethods: ['eth_signTransaction', 'eth_sendTransaction', 'personal_sign', 'eth_sign', 'eth_signTypedData', 'eth_signTypedData_v4' ]
.I have also setup
wcClient.registerRequestHandler
for each of those methods.Next, I am pairing with the dApp using
await wcClient.core.pairing.pair(uri: uri, activatePairing: true);
.Finally,
Additional context:
The callbacks registered under
registerRequestHandler
do fire, but on their own, they cannot seem to authorise sign requests. I get an error saying that there are no pending requests. This is the function I attempt to use to respond to such requests:The text was updated successfully, but these errors were encountered: