WalletConnect / WalletConnectModalFlutter

The WalletConnectModal for WalletConnect built using Flutter.
https://pub.dev/packages/walletconnect_modal_flutter
Apache License 2.0
30 stars 19 forks source link

How to redirect to flutter app after sign a message? #21

Closed AscenX closed 1 year ago

AscenX commented 1 year ago

It's can redirect app after connect the Metamask. service.open(context:...)

but how to sign a message and it also can redirect to my app. Now i sign a message like this.

var signMsg = await service.web3App!.request( topic: service.session!.topic, chainId: 'eip155:1', request: SessionRequestParams( method: 'personal_sign', params: ['Welcome to My app!', service.address] )); It can't open the wallet app(like Metamask), but I use url_launcer to open the wallet

launchUrl(Uri.parse('https://metamask.app.link')) and then perform the sign request. It can jump to the wallet app and show the sign dialog.

but how to redirect to my app after sign the message?

Luzzotica commented 1 year ago

There is a function called launchCurrentWallet in the WalletConnectModalService.

Call that, and it will redirect you as you wish..