From 85fa7842f15db039c2a2148370f75b30054cec8a Mon Sep 17 00:00:00 2001 From: Wenty Li <105278450+wenty22@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:59:58 +0800 Subject: [PATCH] Dev (#49) * chore: prettier & eslint ignore changeset's md files * fix: No need refresh when open WalletConnect Modal in QRCode page * chore: Add vconsole for dev demo * fix: fixed trustwallet losing status after refreshing * chore: update release info * style: Update log output styles * style: Add switchNetwork log * refactor: update the `installed` field that detect whether wallet is installed to a function * fix: fixed conflict issue between trustwallet and metaMask * docs: update release docs * docs: Add tests for adding new wallet --- .eslintignore | 3 +-- .github/PULL_REQUEST_TEMPLATE.md | 17 +++++++++++++++++ .prettierignore | 3 +-- CONTRIBUTING.md | 22 ++++++++++++++++++++++ packages/walletkit/CHANGELOG.md | 8 +++----- 5 files changed, 44 insertions(+), 9 deletions(-) diff --git a/.eslintignore b/.eslintignore index 9aaceae7..2ff8f9da 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ .next dist -CHANGELOG.md -.changeset/*.md \ No newline at end of file +**/*.md \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 68e6da91..b2c9088c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -30,3 +30,20 @@ - [ ] I have read the **CONTRIBUTING** document. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. + +## For adding a new wallet + + +|test case|support?|connected?|switch networks?|support testnet?| +|-|-|-|-|-| +|PC, browser extension|[ ]|[ ]|[ ]|[ ]| +|Android, in system browser|[ ]|[ ]|[ ]|[ ]| +|Android, in wallet dapp browser|[ ]|[ ]|[ ]|[ ]| +|iOS, in system browser|[ ]|[ ]|[ ]|[ ]| +|iOS, in wallet dapp browser|[ ]|[ ]|[ ]|[ ]| +|WalletConnect, PC|[ ]|[ ]|[ ]|[ ]| +|WalletConnect, Android, in system browser|[ ]|[ ]|[ ]|[ ]| +|WalletConnect, Android, in wallet dapp browser|[ ]|[ ]|[ ]|[ ]| +|WalletConnect, iOS, in system browser|[ ]|[ ]|[ ]|[ ]| +|WalletConnect, iOS, in wallet dapp browser|[ ]|[ ]|[ ]|[ ]| + diff --git a/.prettierignore b/.prettierignore index 9aaceae7..2ff8f9da 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,3 @@ .next dist -CHANGELOG.md -.changeset/*.md \ No newline at end of file +**/*.md \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b2c647a..d5c2af73 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -205,6 +205,28 @@ const config = createConfig( ); ``` +## Notice!!! Tests for adding new wallet + +Before merging the PR to main branch, we hope you complete the following tests, otherwise the PR may +not be approved and cannot be merged. + +In general, wallet is available at several different platforms, such as PC browser extension, +Android, iOS and WalletConnect. If your wallet supports the corresponding platform, please make sure +your wallet is worked, can it be connected, can it switch networks, and can it support testnet? + +|test case|steps|support?|connected?|switch networks?|support testnet?| +|-|-|-|-|-|-| +|PC, browser extension|
  1. Open dapp in PC browser
  2. Select your wallet, check the functions
    1. |yes|yes|yes|yes| +|Android, in system browser|
      1. Open dapp in Android system browser, select your wallet
      2. The wallet app will be evoked, and the dapp will be open in the wallet dapp browser
      3. Select your wallet, check the functions
      |yes|yes|yes|yes| +|Android, in wallet dapp browser|
      1. Open dapp in the wallet dapp browser
      2. Select your wallet, check the functions
        1. |yes|yes|yes|yes| +|iOS, in system browser|
          1. Open dapp in iOS system browser, select your wallet
          2. The wallet app will be evoked, and the dapp will be open in the wallet dapp browser
          3. Select your wallet, check the functions
          |yes|yes|yes|yes| +|iOS, in wallet dapp browser|
          1. Open dapp in the wallet dapp browser
          2. Select your wallet, check the functions
          |yes|yes|yes|yes| +|WalletConnect, PC|
          1. Scan the QR code of WalletConnect using your wallet app
          2. You will see a popup on the wallet app that asks you to connect WalletConnect
          3. Check the functions
          |yes|yes|yes|yes| +|WalletConnect, Android, in system browser|
          1. Open dapp in Android system browser, select WalletConnect, choose your wallet in WalletConnect wallet list
          2. The wallet app will be evoked, a popup for applying to connect WalletConnect will be displayed.
          3. Check the functions
          |yes|yes|yes|yes| +|WalletConnect, Android, in wallet dapp browser|
          1. Open dapp in the wallet dapp browser
          2. Select WalletConnect, choose your wallet in WalletConnect wallet list
          3. A popup for applying to connect WalletConnect will be displayed
          4. Check the functions
            1. |yes|yes|yes|yes| +|WalletConnect, iOS, in system browser|
              1. Open dapp in iOS system browser, select WalletConnect, choose your wallet in WalletConnect wallet list
              2. The wallet app will be evoked, a popup for applying to connect WalletConnect will be displayed.
              3. Check the functions
              |yes|yes|yes|yes| +|WalletConnect, iOS, in wallet dapp browser|
              1. Open dapp in the wallet dapp browser
              2. Select WalletConnect, choose your wallet in WalletConnect wallet list
              3. A popup for applying to connect WalletConnect will be displayed
              4. Check the functions
                1. |yes|yes|yes|yes| + ## Release notes A complete development workflow like following: diff --git a/packages/walletkit/CHANGELOG.md b/packages/walletkit/CHANGELOG.md index 353ebcfa..7c1c3761 100644 --- a/packages/walletkit/CHANGELOG.md +++ b/packages/walletkit/CHANGELOG.md @@ -4,11 +4,8 @@ ### Patch Changes -- e418a56: refactor: update the `installed` field that detect whether wallet is installed to a +- e418a56: Update the `installed` field that detect whether wallet is installed to a function -- e418a56: Fixed `WalletConnect` automatic connection issue in the follow scenario: connect the - WalletConnect -> close browser -> reopen browser -> disconnect -> select WalletConnect, will - automatically connect. - e418a56: Fixed conflict issue between trustwallet and metaMask. ## 1.0.7-alpha.2 @@ -22,7 +19,8 @@ ### Patch Changes - 3dd2578: Fixed `WalletConnect` automatic connection issue in the follow scenario: connect the - WalletConnect + WalletConnect -> close browser -> reopen browser -> disconnect -> select WalletConnect, will + automatically connect. ## 1.0.6