From 9555abc795327478b9dd1c36b82a033bddf8ed6b Mon Sep 17 00:00:00 2001 From: "Fabrice SUMSA (Fabrice Fabio)" <35635121+Fabrice-Fabio@users.noreply.github.com> Date: Sat, 25 Nov 2023 16:56:31 +0100 Subject: [PATCH] Update README.md - Setting up verify Api - Setting up deeplink with wallet connect --- README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cea39b26..e222e7fb 100644 --- a/README.md +++ b/README.md @@ -110,9 +110,19 @@ Web3Wallet wcClient = await Web3Wallet.createInstance( // For a wallet, setup the proposal handler that will display the proposal to the user after the URI has been scanned. late int id; wcClient.onSessionProposal.subscribe((SessionProposal? args) async { - // Handle UI updates using the args.params - // Keep track of the args.id for the approval response - id = args!.id; + if (args != null) { + // Handle UI updates using the args.params + // Keep track of the args.id for the approval response + id = args.id; + + // To check the Verify API validations and whether or not your user is interacting with potentially malicious dapp, + // you can do so by accessing the `verifyContext` included in the `SessionProposalEvent`: + final scamApp = args.verifyContext?.validation.scam; + final invalidApp = args.verifyContext?.validation.invalid; + final validApp = args.verifyContext?.validation.valid; + final unknown = args.verifyContext?.validation.unknown; + } + }); // Also setup the methods and chains that your wallet supports @@ -267,6 +277,11 @@ await wcClient.disconnectSession( ); ``` +### Setting up Deeplinks + +If you want to set up deeplinks on wallet connect, you must configure your device so that the scheme of your deeplink is compatible with "wc://" +[More details there](https://docs.walletconnect.com/web3wallet/mobileLinking). + ### Reconnecting the WebSocket ```dart