-
Notifications
You must be signed in to change notification settings - Fork 68
Description
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:
await wcClient.respondAuthRequest(
id: sessionId,
iss: 'did:pkh:eip155:${chainId}:${address}',
signature: CacaoSignature(t: CacaoSignature.EIP191, s: signedDataHex),
);