WalletConnect / WalletConnectFlutterV2

WalletConnect v2 client made in Dart for Flutter.
https://pub.dev/packages/walletconnect_flutter_v2
Apache License 2.0
101 stars 52 forks source link

Unsupported methods. onSessionProposeRequest namespaces methods don't satisfy #242

Closed padi-dev-anhntn closed 5 months ago

padi-dev-anhntn commented 6 months ago

I get this error when using My Wallet scan QR to connect.

Error in web3 dapp Unsupported methods. onSessionProposeRequest namespaces methods don't satisfy requiredNamespaces methods for eip155. Requested: [eth_sendTransaction, eth_signTypedData_v4, personal_sign], Supported: []

Smartphone :

Additional context Add any other context about the problem here.

quetool commented 6 months ago

Hello @anhntn-paditech, please try to send every namespace as optionalNamespace rather than differentiating between required and optional and let me know.

padi-dev-anhntn commented 6 months ago

@quetool Thank you for your answer But I think miss understanding. I want to add a connecting wallet feature to my wallet application, not want to build a dapp. I guess because I haven't configured the supported mainnets for my project. But i'm not sure

quetool commented 6 months ago

In this case then it means you, as a wallet, are not supporting the requested required methods.

How do you support a method? You support a given method by registering a handler to it. For instance, if the dapp connecting to your wallet has personal_sign as required namespaces method, you on your wallet should support with

wallet.registerRequestHandler(
  chainId: '1', // chainId from namespace
  method: 'personal_sign', // method name from namespace
  handler: myHandler, // your handler function
);

In the example wallet it's done here https://github.com/WalletConnect/WalletConnectFlutterV2/blob/master/example/wallet/lib/dependencies/chains/evm_service.dart#L96

padi-dev-anhntn commented 6 months ago

@quetool oh, thank you very much I think this is the problem. I will try it and get back to you later.

quetool commented 5 months ago

Please feel free to reopen if the issue persists. Thanks!