WalletConnect / WalletConnectSharp

A C# implementation of the WalletConnect client
Apache License 2.0
139 stars 60 forks source link

fix: duplicate wc_sessionRequest handlers issue #187

Closed aliarbak closed 1 month ago

aliarbak commented 1 month ago

Fix: https://github.com/WalletConnect/WalletConnectSharp/issues/188

skibitsky commented 1 month ago

Hey @aliarbak,

Thank you for opening the issue with detailed information and submitting the pull request. I managed to reproduce the issue but cannot approve the pull request due to compatibility issues with the WalletConnect protocol.

The changes made to the Sign project ensure that unit tests pass, as both wallets and dapps in our unit tests use the same Sign project. However, when using the updated Sign project with any third-party wallet or our react sample wallet, you will notice that session requests are not coming through.

Upon comparing the requests generated by your PR to the stable release, I noticed that in your version, the wc_sessionRequest is replaced with the method name from the message payload.

Left: personal_sign session request from the PR. Right: personal_sign session request from the latest stable release. Screenshot 2024-05-06@2x

aliarbak commented 1 month ago

Hey @skibitsky thank you for your reply. Then it would be better to find a safer workaround without changing the request values. nice catch btw :)

skibitsky commented 1 month ago

@aliarbak #193