From 0cf41a60cbf184d2c3c55ef1c524c3b1e29dc8fd Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 16 May 2024 19:19:24 +0300 Subject: [PATCH] chore(dapp) update SDK interface and the generated code Updates: #14615 --- .../Wallet/services/dapps/sdk/README.md | 29 +++---------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/ui/app/AppLayouts/Wallet/services/dapps/sdk/README.md b/ui/app/AppLayouts/Wallet/services/dapps/sdk/README.md index 710cfd7379..d7ed7ad41b 100644 --- a/ui/app/AppLayouts/Wallet/services/dapps/sdk/README.md +++ b/ui/app/AppLayouts/Wallet/services/dapps/sdk/README.md @@ -1,25 +1,18 @@ # Wallet Connect Integration -## Questions - -- [ ] Do we report **disabled chains**? **Update session** in case of enabled/disabled chains? -- [ ] User error workflow: retry? -- [ ] Check the `Auth` request for verifyContext -- [ ] What `description` and `icons` to use for the app? See `metadata` parameter in `Web3Wallet.init` call - ## WalletConnect SDK management -Install dependencies steps by executing commands in this directory: +To install/updates dependencies follow these steps by running the following commands in this directory: -- update the [`package.json`](./package.json) versions and run `npm install` +- Step 1: update the [`package.json`](./package.json) versions and run `npm install` - alternatively - use the command `npm install @ --save` for individual packages - or to update to the latest run `ncu -u; npm install` in here - run `npm install -g npm-check-updates` for `ncu` command - these commands will also create or update a `package-lock.json` file and populate the `node_modules` directory -- update the [`bundle.js`](./generated/bundle.js) file by running `npm run build` +- Step 2: update the [`bundle.js`](./generated/bundle.js) file by running `npm run build` - the result will be embedded with the app and loaded by [`WalletConnectSDK.qml`](../WalletConnectSDK.qml) component -- add the newly generated files to index `git add --update .` to include in the commit +- Step 3: add the newly generated files to index `git add --update .` to include in the commit ## Testing @@ -36,17 +29,3 @@ npm install --save @walletconnect/web3wallet npm run build # npm run build:dev # for development ``` - -- [x] Do we report all chains and all accounts combination or let user select? - - Wallet Connect require to report all chainIDs that were requested - - Answer: We only report the available chains for the current account. We will look into adding others to he same session instead of requiring a new link -- [x] Can't respond to sign messages if the wallet-connect dialog/view is closed (app is minimized) - - Only apps that use deep links are expected to work seamlessly - - Also the main workflow will be driven by user -- [x] Allow user to **disconnect session**? Manage sessions? - - Yes, in settings -- [x] Support update session if one account is added/removed? - - Not at first -- [X] User awareness of session expiration? - - Support extend session? - - Yes