diff --git a/.eslintrc.json b/.eslintrc.json index cfa0f94bab..117bf65d6f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -61,7 +61,7 @@ { "name": "lit/decorators.js", "importNames": ["customElement"], - "message": "Use import 'customElement' from '@web3modal/ui' instead." + "message": "Use import 'customElement' from '@reown/appkit-ui' instead." } ] } @@ -96,6 +96,7 @@ "@typescript-eslint/no-confusing-void-expression": "off", "@typescript-eslint/prefer-nullish-coalescing": "off", "@typescript-eslint/no-unnecessary-condition": "off", - "@typescript-eslint/no-unsafe-argument": "off" + "@typescript-eslint/no-unsafe-argument": "off", + "@typescript-eslint/non-nullable-type-assertion-style": "off" } } diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b2e6a1805a..76baa18fd7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -11,8 +11,6 @@ body: You should also test your issue against the latest NPM package version(s) to ensure that it hasn't already been resolved. Sharing a link to a GitHub repository or preview deployment are best. Include any instructions to run the project in the README or the summary field below. - Don't have an available repo/preview to share? You can create online with our [StackBlitz template](https://stackblitz.com/edit/web3modal-next-template) quickly. - IF A REPRODUCIBLE DEMO IS NOT PROVIDED, YOUR ISSUE WILL BE CLOSED. [Learn more about creating a minimal reproducible example](https://stackoverflow.com/help/mcve). validations: @@ -29,6 +27,6 @@ body: - type: textarea attributes: label: List of related npm package versions - description: Include all web3modal, wagmi and other packages that can be related to the issue, including their versions. + description: Include all appkit, wagmi and other packages that can be related to the issue, including their versions. validations: required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 88b0caeb33..aa24330b22 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: โ“ Ask a question - url: https://github.com/WalletConnect/walletconnect-monorepo/discussions/new?category=web3modal + url: https://github.com/WalletConnect/walletconnect-monorepo/discussions/new?category=appkit about: Ask questions and discuss with other community members. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0e683b7799..02d1f33b57 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -25,3 +25,5 @@ If new feature is being introduced, include the link to demo recording. - [ ] My changes generate no new warnings - [ ] I have reviewed my own code - [ ] I have filled out all required sections +- [ ] I have tested my changes on the preview link +- [ ] Approver of this PR confirms that the changes are tested on the preview link diff --git a/.github/workflows/changesets.yml b/.github/workflows/changesets.yml new file mode 100644 index 0000000000..a75b033623 --- /dev/null +++ b/.github/workflows/changesets.yml @@ -0,0 +1,50 @@ +name: Changesets +on: + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + changesets: + name: Changesets + permissions: + contents: write + id-token: write + pull-requests: write + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Clone repository + uses: actions/checkout@v4 + with: + # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits + fetch-depth: 0 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + + - name: setup-node + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + shell: bash + + - name: PR or publish + uses: changesets/action@v1 + with: + title: 'chore: version packages' + commit: 'chore: version packages' + createGithubReleases: ${{ github.ref == 'refs/heads/main' }} + publish: pnpm changeset:publish + version: pnpm changeset:version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index ccd5960501..ba4cf59138 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -4,9 +4,6 @@ on: pull_request: types: [opened, synchronize, reopened, ready_for_review] branches: - - V3 - - V4 - - V5 - main permissions: @@ -32,7 +29,6 @@ jobs: - lint - prettier - typecheck - - danger - build:sample-apps steps: - name: checkout @@ -64,6 +60,9 @@ jobs: bundle_size: runs-on: ubuntu-latest name: Bundle size check + permissions: + contents: write + pull-requests: write steps: - name: checkout uses: actions/checkout@v3 @@ -91,6 +90,9 @@ jobs: test: runs-on: ubuntu-latest continue-on-error: true + permissions: + contents: write + pull-requests: write steps: - name: checkout uses: actions/checkout@v3 diff --git a/.github/workflows/publish_canary.yml b/.github/workflows/publish_canary.yml deleted file mode 100644 index 5d8bec6190..0000000000 --- a/.github/workflows/publish_canary.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Publish Canary Image -on: - workflow_dispatch: - push: - branches: - - main - -concurrency: ${{ github.workflow }} - -env: - TERM: linux - -jobs: - push: - runs-on: ubuntu-latest - permissions: - id-token: write - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.AWS_ROLE_ECR_DEPLOYER }} - aws-region: ${{ vars.AWS_REGION }} - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - with: - mask-password: 'true' - - - name: Checkout - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v4 - name: Install pnpm - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Build, tag, and push image to Amazon ECR - uses: docker/build-push-action@v5 - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY: web3modal-canary - IMAGE_TAG: V4 - with: - context: . - file: Dockerfile.canary - push: true - tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new - - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index bdcee2e0be..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Release - -on: - push: - branches: - - V5 - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - token: ${{ secrets.CHANGESETS_ACTION_TOKEN }} - - - uses: pnpm/action-setup@v4 - name: Install pnpm - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Install Dependencies - run: pnpm install - - - name: Create Release Pull Request - uses: changesets/action@v1 - env: - GITHUB_TOKEN: ${{ secrets.CHANGESETS_ACTION_TOKEN }} diff --git a/.github/workflows/ui_tests.yml b/.github/workflows/ui_tests.yml index 5e02c4bcbe..858066ea3e 100644 --- a/.github/workflows/ui_tests.yml +++ b/.github/workflows/ui_tests.yml @@ -9,7 +9,7 @@ on: required: false type: string base-url: - description: 'The web3modal lab url' + description: 'The AppKit lab url' default: 'http://localhost:3000/' required: false type: string diff --git a/.husky/pre-push b/.husky/pre-push deleted file mode 100644 index 14bdd770ef..0000000000 --- a/.husky/pre-push +++ /dev/null @@ -1 +0,0 @@ -pnpm run typecheck; pnpm run lint; \ No newline at end of file diff --git a/.npmrc b/.npmrc deleted file mode 100644 index f30a5ab542..0000000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -script-shell=sh diff --git a/Dockerfile.canary b/Dockerfile.canary index 4fb248caf5..c2bae3fa81 100644 --- a/Dockerfile.canary +++ b/Dockerfile.canary @@ -18,6 +18,6 @@ RUN pnpm playwright:install ENV TIMING_LOGS=true ENV CI=true ENV SKIP_PLAYWRIGHT_WEBSERVER=true -ENV BASE_URL=https://lab.web3modal.com/ +ENV BASE_URL=https://appkit-lab.reown.org/ CMD ["timeout", "600", "./docker-canary.sh"] diff --git a/LICENSE b/LICENSE index 3a52ea2a8d..78113137a9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ - Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -175,7 +175,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION END OF TERMS AND CONDITIONS -Copyright 2021 WalletConnect, Inc. +Copyright 2024 reown inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/apps/demo/CHANGELOG.md b/apps/demo/CHANGELOG.md index 560b9ef8b4..c871f6c963 100644 --- a/apps/demo/CHANGELOG.md +++ b/apps/demo/CHANGELOG.md @@ -1,563 +1,63 @@ # @apps/demo -## 5.1.8 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/wagmi@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.7 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-wagmi@1.0.1 + - @reown/appkit@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/wagmi@5.1.7 - -## 5.1.6 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/wagmi@5.1.6 - -## 5.1.5 - -### Patch Changes - -- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770 - - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771 - - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772 - - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776 - - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768 - - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779 - - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780 - -- Updated dependencies []: - - @web3modal/wagmi@5.1.5 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/wagmi@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/wagmi@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/wagmi@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/wagmi@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/wagmi@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/wagmi@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 - - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/wagmi@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/wagmi@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/wagmi@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/wagmi@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/wagmi@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/wagmi@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/wagmi@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/wagmi@5.0.1 - -## 5.0.0 - -### Major Changes - -- Release V5 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@5.0.0 - -## 5.0.0-cn-v5.0 +## 1.0.0 ### Major Changes -- Test V5 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@5.0.0-cn-v5.0 - -## 4.2.3 - -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.3 - -## 4.2.3-alpha.0 - -### Patch Changes - -- feat: add support for coinbase smart accounts - -- Updated dependencies []: - - @web3modal/wagmi@4.2.3-alpha.0 - -## 4.2.2 - -### Patch Changes - -- feat: social login refactor. wagmi sendCalls support. refactor theme variables - -- Updated dependencies []: - - @web3modal/wagmi@4.2.2 - -## 4.2.1 - -### Patch Changes - -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.1 - -## 4.2.0 - -### Patch Changes - -- release: 4.2.0 version release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0 - -## 4.2.0-alpha.0 - -### Patch Changes - -- feat: 4.2.0-alpha release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-alpha.0 - -## 4.2.0-03e4f4a8.2 - -### Patch Changes - -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-03e4f4a8.2 - -## 4.2.0-448f7f4.1 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-448f7f4.1 - -## 4.1.12-910a844.0 - -### Patch Changes - -- refactor: sync theme with secure site - -- Updated dependencies []: - - @web3modal/wagmi@4.1.12-910a844.0 - -## 4.1.11 - -### Patch Changes - -- refactor: Solana exported helper methods and program instruction improvements -- refactor: email and smart account improvements -- refactor: unit test CI check improvements -- feat: convert - -- Updated dependencies []: - - @web3modal/wagmi@4.1.11 - -## 4.1.10 - -### Patch Changes - -- Fix activity list styling issue - -- Updated dependencies []: - - @web3modal/wagmi@4.1.10 - -## 4.1.9 - -### Patch Changes - -- Blockchain API fix - -- Updated dependencies []: - - @web3modal/wagmi@4.1.9 - -## 4.1.8 - -### Patch Changes - -- Hotfix for redundant tokenbalance calls - -- Updated dependencies []: - - @web3modal/wagmi@4.1.8 - -## 4.1.7 - -### Patch Changes - -- Hotfix for incorrect state of w3m-button when email is enabled - -- Updated dependencies []: - - @web3modal/wagmi@4.1.7 - -## 4.1.6 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site. - -- Updated dependencies []: - - @web3modal/wagmi@4.1.6 - -## 4.1.6-a0733f5.0 - -### Patch Changes +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -- chore: canary release for siwe dependency +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -- Updated dependencies []: - - @web3modal/ethers@4.1.6-a0733f5.0 - - @web3modal/siwe@4.1.6-a0733f5.0 - - @web3modal/solana@4.1.6-a0733f5.0 - - @web3modal/wagmi@4.1.6-a0733f5.0 +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-wagmi@1.0.0 + - @reown/appkit@1.0.0 -## 4.1.5 +## 0.0.5 ### Patch Changes -- release: v4.1.5 +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -- Updated dependencies []: - - @web3modal/wagmi@4.1.5 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -## 4.1.5-93c81127.0 +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -### Patch Changes - -- fix: polyfill process in wallet package - -- Updated dependencies []: - - @web3modal/wagmi@4.1.5-93c81127.0 +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit-adapter-wagmi@0.0.5 + - @reown/appkit@0.0.5 -## 4.1.4 +## 0.0.4 ### Patch Changes -- feat: wallet info hook +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -- Updated dependencies []: - - @web3modal/wagmi@4.1.4 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-wagmi@0.0.4 + - @reown/appkit@0.0.4 -## 4.1.3 +## 0.0.3 ### Patch Changes -- feat: wallet info hook - -- feat: reset version to 4.1.3 - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3 - -## 4.1.3-5f2ae345.1 - -### Patch Changes - -- canary: test imports - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-5f2ae345.1 - -## 4.1.3-8e039e.0 - -### Patch Changes - -- feat: update optional dependencies - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-8e039e.0 - -## 4.1.2 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- 4.1.2 release +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies []: - - @web3modal/wagmi@4.1.2 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-wagmi@0.0.3 + - @reown/appkit@0.0.3 diff --git a/apps/demo/components/ConfigSection.tsx b/apps/demo/components/ConfigSection.tsx index e845f26b9c..b52e1ffc80 100644 --- a/apps/demo/components/ConfigSection.tsx +++ b/apps/demo/components/ConfigSection.tsx @@ -70,7 +70,7 @@ export default function ConfigSection() { diff --git a/apps/laboratory/src/components/AppKitInfo.tsx b/apps/laboratory/src/components/AppKitInfo.tsx index c3da441df0..ec1f535830 100644 --- a/apps/laboratory/src/components/AppKitInfo.tsx +++ b/apps/laboratory/src/components/AppKitInfo.tsx @@ -12,8 +12,8 @@ import { type AppKitInfoProps = { address?: string - chainId?: number - clientId: string | null + chainId?: number | string + clientId?: string } export function AppKitInfo({ address, chainId, clientId }: AppKitInfoProps) { diff --git a/apps/laboratory/src/components/AppKitNetworkInfo.tsx b/apps/laboratory/src/components/AppKitNetworkInfo.tsx new file mode 100644 index 0000000000..cd1f21a33e --- /dev/null +++ b/apps/laboratory/src/components/AppKitNetworkInfo.tsx @@ -0,0 +1,43 @@ +import * as React from 'react' +import { useAppKitAccount, useAppKitNetwork } from '@reown/appkit/react' +import { + StackDivider, + Card, + CardHeader, + Heading, + CardBody, + Box, + Stack, + Text +} from '@chakra-ui/react' + +export function AppKitNetworkInfo() { + const { address } = useAppKitAccount() + const { chainId } = useAppKitNetwork() + + return ( + + + Account Information + + + + } spacing="4"> + + + Address + + {address} + + + + + Chain Id + + {chainId} + + + + + ) +} diff --git a/apps/laboratory/src/components/Ethers/Ethers5GetCallsStatusTest.tsx b/apps/laboratory/src/components/Ethers/Ethers5GetCallsStatusTest.tsx index 016c7a4d49..b603681bfb 100644 --- a/apps/laboratory/src/components/Ethers/Ethers5GetCallsStatusTest.tsx +++ b/apps/laboratory/src/components/Ethers/Ethers5GetCallsStatusTest.tsx @@ -1,10 +1,15 @@ import { Button, Stack, Text, Input } from '@chakra-ui/react' import { useState } from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers5/react' +import { + useAppKitAccount, + useAppKitNetwork, + useAppKitProvider, + type Provider +} from '@reown/appkit/react' import { EthereumProvider } from '@walletconnect/ethereum-provider' import { useChakraToast } from '../Toast' import { ethers } from 'ethers5' -import { W3mFrameProvider } from '@web3modal/wallet' +import { W3mFrameProvider } from '@reown/appkit-wallet' import { type GetCallsStatusParams } from '../../types/EIP5792' import { EIP_5792_RPC_METHODS } from '../../utils/EIP5792Utils' @@ -12,8 +17,10 @@ export function Ethers5GetCallsStatusTest() { const [isLoading, setLoading] = useState(false) const [batchCallId, setBatchCallId] = useState('') - const { address, chainId, isConnected } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { chainId } = useAppKitNetwork() + const { isConnected, address } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') + const toast = useChakraToast() async function onGetCallsStatus() { diff --git a/apps/laboratory/src/components/Ethers/Ethers5ModalInfo.tsx b/apps/laboratory/src/components/Ethers/Ethers5ModalInfo.tsx index 4949a6395e..034f5c725b 100644 --- a/apps/laboratory/src/components/Ethers/Ethers5ModalInfo.tsx +++ b/apps/laboratory/src/components/Ethers/Ethers5ModalInfo.tsx @@ -1,22 +1,23 @@ import * as React from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers5/react' +import { useAppKitAccount, useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' import EthereumProvider from '@walletconnect/ethereum-provider' import { AppKitInfo } from '../AppKitInfo' export function Ethers5ModalInfo() { - const { isConnected, address, chainId } = useWeb3ModalAccount() const [ready, setReady] = React.useState(false) - const [clientId, setClientId] = React.useState(null) - const { walletProvider, walletProviderType } = useWeb3ModalProvider() + const [clientId, setClientId] = React.useState(undefined) + + const { chainId } = useAppKitNetwork() + const { isConnected, address } = useAppKitAccount() + const { walletProvider, walletProviderType } = useAppKitProvider('eip155') + async function getClientId() { if (walletProviderType === 'walletConnect') { - const ethereumProvider = walletProvider as unknown as EthereumProvider - - return await ethereumProvider?.signer?.client?.core?.crypto?.getClientId() + return await walletProvider?.signer?.client?.core?.crypto?.getClientId() } - return null + return undefined } React.useEffect(() => { @@ -28,6 +29,6 @@ export function Ethers5ModalInfo() { }, []) return ready && isConnected ? ( - + ) : null } diff --git a/apps/laboratory/src/components/Ethers/Ethers5SendCallsTest.tsx b/apps/laboratory/src/components/Ethers/Ethers5SendCallsTest.tsx index 726e8be615..163c22cf82 100644 --- a/apps/laboratory/src/components/Ethers/Ethers5SendCallsTest.tsx +++ b/apps/laboratory/src/components/Ethers/Ethers5SendCallsTest.tsx @@ -1,9 +1,10 @@ import { Button, Stack, Text, Spacer, Heading } from '@chakra-ui/react' import { useState, useEffect } from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers5/react' +import { useAppKitAccount, useAppKitProvider, useAppKitNetwork } from '@reown/appkit/react' import { EthereumProvider } from '@walletconnect/ethereum-provider' import { useChakraToast } from '../Toast' import type { Address } from 'viem' +import type { Provider as RawProvider } from '@reown/appkit' import { vitalikEthAddress } from '../../utils/DataUtil' import { ethers } from 'ethers5' import { @@ -11,15 +12,17 @@ import { WALLET_CAPABILITIES, getCapabilitySupportedChainInfo } from '../../utils/EIP5792Utils' -import { W3mFrameProvider } from '@web3modal/wallet' +import { W3mFrameProvider } from '@reown/appkit-wallet' type Provider = W3mFrameProvider | Awaited> export function Ethers5SendCallsTest() { const [loading, setLoading] = useState(false) - const { address, chainId, isConnected } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { chainId } = useAppKitNetwork() + const { address, isConnected } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') + const toast = useChakraToast() const [atomicBatchSupportedChains, setAtomicBatchSupportedChains] = useState< @@ -32,7 +35,7 @@ export function Ethers5SendCallsTest() { if (address && walletProvider) { getCapabilitySupportedChainInfo( WALLET_CAPABILITIES.ATOMIC_BATCH, - walletProvider as Provider, + walletProvider as unknown as Provider, address ).then(capabilities => setAtomicBatchSupportedChains(capabilities)) } else { diff --git a/apps/laboratory/src/components/Ethers/Ethers5SendCallsWithPaymasterServiceTest.tsx b/apps/laboratory/src/components/Ethers/Ethers5SendCallsWithPaymasterServiceTest.tsx index 1259199e6a..5afb00f9b4 100644 --- a/apps/laboratory/src/components/Ethers/Ethers5SendCallsWithPaymasterServiceTest.tsx +++ b/apps/laboratory/src/components/Ethers/Ethers5SendCallsWithPaymasterServiceTest.tsx @@ -1,6 +1,11 @@ import { Button, Stack, Text, Input, Tooltip } from '@chakra-ui/react' import { useState, useEffect } from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers5/react' +import { + useAppKitAccount, + useAppKitNetwork, + useAppKitProvider, + type Provider +} from '@reown/appkit/react' import { EthereumProvider } from '@walletconnect/ethereum-provider' import { useChakraToast } from '../Toast' import { parseGwei } from 'viem' @@ -11,14 +16,15 @@ import { WALLET_CAPABILITIES, getCapabilitySupportedChainInfo } from '../../utils/EIP5792Utils' -import { W3mFrameProvider } from '@web3modal/wallet' +import { W3mFrameProvider } from '@reown/appkit-wallet' export function Ethers5SendCallsWithPaymasterServiceTest() { const [paymasterServiceUrl, setPaymasterServiceUrl] = useState('') const [isLoading, setLoading] = useState(false) - const { address, chainId, isConnected } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { chainId } = useAppKitNetwork() + const { address, isConnected } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') const toast = useChakraToast() const [paymasterServiceSupportedChains, setPaymasterServiceSupportedChains] = useState< diff --git a/apps/laboratory/src/components/Ethers/Ethers5SignMessageTest.tsx b/apps/laboratory/src/components/Ethers/Ethers5SignMessageTest.tsx index 27ec1723a4..2b632aa138 100644 --- a/apps/laboratory/src/components/Ethers/Ethers5SignMessageTest.tsx +++ b/apps/laboratory/src/components/Ethers/Ethers5SignMessageTest.tsx @@ -1,15 +1,22 @@ import { Button } from '@chakra-ui/react' import { useState } from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers5/react' +import { + useAppKitAccount, + useAppKitNetwork, + useAppKitProvider, + type Provider +} from '@reown/appkit/react' import { ethers } from 'ethers5' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { useChakraToast } from '../Toast' export function Ethers5SignMessageTest() { - const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() const [signature, setSignature] = useState() + const toast = useChakraToast() + + const { chainId } = useAppKitNetwork() + const { address } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') async function onSignMessage() { try { diff --git a/apps/laboratory/src/components/Ethers/Ethers5SignTypedDataTest.tsx b/apps/laboratory/src/components/Ethers/Ethers5SignTypedDataTest.tsx index 03e9784834..4a5d7328c3 100644 --- a/apps/laboratory/src/components/Ethers/Ethers5SignTypedDataTest.tsx +++ b/apps/laboratory/src/components/Ethers/Ethers5SignTypedDataTest.tsx @@ -1,5 +1,10 @@ import { Button } from '@chakra-ui/react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' +import { + useAppKitAccount, + useAppKitNetwork, + useAppKitProvider, + type Provider +} from '@reown/appkit/react' import { ethers } from 'ethers5' import type { TypedDataField } from 'ethers5' import { useChakraToast } from '../Toast' @@ -30,8 +35,10 @@ const message = { export function Ethers5SignTypedDataTest() { const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + + const { address } = useAppKitAccount() + const { chainId } = useAppKitNetwork() + const { walletProvider } = useAppKitProvider('eip155') async function onSignTypedData() { try { diff --git a/apps/laboratory/src/components/Ethers/Ethers5Tests.tsx b/apps/laboratory/src/components/Ethers/Ethers5Tests.tsx index 0b0fbdeab8..e5c150d5d4 100644 --- a/apps/laboratory/src/components/Ethers/Ethers5Tests.tsx +++ b/apps/laboratory/src/components/Ethers/Ethers5Tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { useWeb3ModalAccount } from '@web3modal/ethers5/react' +import { useAppKitAccount } from '@reown/appkit/react' import { EthersSignMessageTest } from './EthersSignMessageTest' import { EthersSignTypedDataTest } from './EthersSignTypedDataTest' import { StackDivider, Card, CardHeader, Heading, CardBody, Box, Stack } from '@chakra-ui/react' @@ -11,7 +11,7 @@ import { EthersSendCallsWithPaymasterServiceTest } from './EthersSendCallsWithPa export function Ethers5Tests() { const [ready, setReady] = React.useState(false) - const { isConnected } = useWeb3ModalAccount() + const { isConnected } = useAppKitAccount() React.useEffect(() => { setReady(true) diff --git a/apps/laboratory/src/components/Ethers/Ethers5TransactionTest.tsx b/apps/laboratory/src/components/Ethers/Ethers5TransactionTest.tsx index bd72836763..cbefc5d5ba 100644 --- a/apps/laboratory/src/components/Ethers/Ethers5TransactionTest.tsx +++ b/apps/laboratory/src/components/Ethers/Ethers5TransactionTest.tsx @@ -1,16 +1,23 @@ import { Button, Stack, Link, Text, Spacer } from '@chakra-ui/react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers5/react' +import { + useAppKitAccount, + useAppKitNetwork, + useAppKitProvider, + type Provider +} from '@reown/appkit/react' import { ethers } from 'ethers5' import { useState } from 'react' -import { mainnet } from '../../utils/ChainsUtil' +import { mainnet } from '@reown/appkit/networks' import { vitalikEthAddress } from '../../utils/DataUtil' import { useChakraToast } from '../Toast' export function Ethers5TransactionTest() { - const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() const [loading, setLoading] = useState(false) + const toast = useChakraToast() + + const { address } = useAppKitAccount() + const { chainId } = useAppKitNetwork() + const { walletProvider } = useAppKitProvider('eip155') async function onSendTransaction() { try { @@ -30,10 +37,11 @@ export function Ethers5TransactionTest() { description: tx.hash, type: 'success' }) - } catch { + } catch (e) { toast({ title: 'Error', - description: 'Failed to sign transaction', + // @ts-expect-error - error is unknown + description: e?.message || 'Failed to sign transaction', type: 'error' }) } finally { diff --git a/apps/laboratory/src/components/Ethers/Ethers5WriteContractTest.tsx b/apps/laboratory/src/components/Ethers/Ethers5WriteContractTest.tsx index d906be6ae7..7c9885dacd 100644 --- a/apps/laboratory/src/components/Ethers/Ethers5WriteContractTest.tsx +++ b/apps/laboratory/src/components/Ethers/Ethers5WriteContractTest.tsx @@ -1,18 +1,25 @@ import { Button, Stack, Link, Text, Spacer } from '@chakra-ui/react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers5/react' +import { + useAppKitAccount, + useAppKitNetwork, + useAppKitProvider, + type Provider +} from '@reown/appkit/react' import { ethers } from 'ethers5' -import { optimism, sepolia } from '../../utils/ChainsUtil' +import { optimism, sepolia } from '@reown/appkit/networks' import { useState } from 'react' import { abi, address as donutAddress } from '../../utils/DonutContract' import { useChakraToast } from '../Toast' export function Ethers5WriteContractTest() { - const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() const [loading, setLoading] = useState(false) + const toast = useChakraToast() + const { address } = useAppKitAccount() + const { chainId } = useAppKitNetwork() + const { walletProvider } = useAppKitProvider('eip155') + async function onSendTransaction() { try { setLoading(true) @@ -29,10 +36,11 @@ export function Ethers5WriteContractTest() { description: tx.hash, type: 'success' }) - } catch { + } catch (e) { toast({ title: 'Error', - description: 'Failed to sign transaction', + // @ts-expect-error - error is unknown + description: e?.message || 'Failed to sign transaction', type: 'error' }) } finally { diff --git a/apps/laboratory/src/components/Ethers/EthersGetCallsStatusTest.tsx b/apps/laboratory/src/components/Ethers/EthersGetCallsStatusTest.tsx index 894ce125c7..5230452dc8 100644 --- a/apps/laboratory/src/components/Ethers/EthersGetCallsStatusTest.tsx +++ b/apps/laboratory/src/components/Ethers/EthersGetCallsStatusTest.tsx @@ -1,10 +1,15 @@ import { Button, Stack, Text, Input } from '@chakra-ui/react' import { useState } from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' +import { + useAppKitAccount, + useAppKitNetwork, + useAppKitProvider, + type Provider +} from '@reown/appkit/react' import { EthereumProvider } from '@walletconnect/ethereum-provider' import { useChakraToast } from '../Toast' import { BrowserProvider } from 'ethers' -import { W3mFrameProvider } from '@web3modal/wallet' +import { W3mFrameProvider } from '@reown/appkit-wallet' import { type GetCallsStatusParams } from '../../types/EIP5792' import { EIP_5792_RPC_METHODS } from '../../utils/EIP5792Utils' @@ -12,8 +17,9 @@ export function EthersGetCallsStatusTest() { const [isLoading, setLoading] = useState(false) const [batchCallId, setBatchCallId] = useState('') - const { address, chainId, isConnected } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { chainId } = useAppKitNetwork() + const { address, isConnected } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') const toast = useChakraToast() async function onGetCallsStatus() { diff --git a/apps/laboratory/src/components/Ethers/EthersModalInfo.tsx b/apps/laboratory/src/components/Ethers/EthersModalInfo.tsx index 6b3e80b5ad..1732bb0fe7 100644 --- a/apps/laboratory/src/components/Ethers/EthersModalInfo.tsx +++ b/apps/laboratory/src/components/Ethers/EthersModalInfo.tsx @@ -1,22 +1,22 @@ import * as React from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' +import { useAppKitAccount, useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' import EthereumProvider from '@walletconnect/ethereum-provider' import { AppKitInfo } from '../AppKitInfo' export function EthersModalInfo() { - const { isConnected, address, chainId } = useWeb3ModalAccount() const [ready, setReady] = React.useState(false) - const [clientId, setClientId] = React.useState(null) - const { walletProvider, walletProviderType } = useWeb3ModalProvider() + const [clientId, setClientId] = React.useState(undefined) + const { isConnected, address } = useAppKitAccount() + const { chainId } = useAppKitNetwork() + const { walletProvider, walletProviderType } = useAppKitProvider('eip155') + async function getClientId() { if (walletProviderType === 'walletConnect') { - const ethereumProvider = walletProvider as unknown as EthereumProvider - - return await ethereumProvider?.signer?.client?.core?.crypto?.getClientId() + return await walletProvider?.signer?.client?.core?.crypto?.getClientId() } - return null + return undefined } React.useEffect(() => { @@ -27,7 +27,7 @@ export function EthersModalInfo() { setReady(true) }, []) - return ready && isConnected ? ( + return ready && isConnected && chainId ? ( ) : null } diff --git a/apps/laboratory/src/components/Ethers/EthersSendCallsTest.tsx b/apps/laboratory/src/components/Ethers/EthersSendCallsTest.tsx index 2eb95463e7..649934b560 100644 --- a/apps/laboratory/src/components/Ethers/EthersSendCallsTest.tsx +++ b/apps/laboratory/src/components/Ethers/EthersSendCallsTest.tsx @@ -1,25 +1,26 @@ import { Button, Stack, Text, Spacer, Heading } from '@chakra-ui/react' import { useState, useEffect } from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' +import { useAppKitAccount, useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' import { EthereumProvider } from '@walletconnect/ethereum-provider' import { useChakraToast } from '../Toast' import type { Address } from 'viem' import { vitalikEthAddress } from '../../utils/DataUtil' -import { BrowserProvider } from 'ethers' +import { BrowserProvider, type Eip1193Provider } from 'ethers' import { EIP_5792_RPC_METHODS, WALLET_CAPABILITIES, getCapabilitySupportedChainInfo } from '../../utils/EIP5792Utils' -import { W3mFrameProvider } from '@web3modal/wallet' +import { W3mFrameProvider } from '@reown/appkit-wallet' type Provider = W3mFrameProvider | Awaited> export function EthersSendCallsTest() { const [loading, setLoading] = useState(false) - const { address, chainId, isConnected } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { chainId } = useAppKitNetwork() + const { address, isConnected } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') const toast = useChakraToast() const [atomicBatchSupportedChains, setAtomicBatchSupportedChains] = useState< diff --git a/apps/laboratory/src/components/Ethers/EthersSendCallsWithPaymasterServiceTest.tsx b/apps/laboratory/src/components/Ethers/EthersSendCallsWithPaymasterServiceTest.tsx index 4ab74d98f7..28ed229523 100644 --- a/apps/laboratory/src/components/Ethers/EthersSendCallsWithPaymasterServiceTest.tsx +++ b/apps/laboratory/src/components/Ethers/EthersSendCallsWithPaymasterServiceTest.tsx @@ -1,24 +1,25 @@ import { Button, Stack, Text, Input, Tooltip } from '@chakra-ui/react' import { useState, useEffect } from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' +import { useAppKitAccount, useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' import { EthereumProvider } from '@walletconnect/ethereum-provider' import { useChakraToast } from '../Toast' import { parseGwei } from 'viem' import { vitalikEthAddress } from '../../utils/DataUtil' -import { BrowserProvider } from 'ethers' +import { BrowserProvider, type Eip1193Provider } from 'ethers' import { EIP_5792_RPC_METHODS, WALLET_CAPABILITIES, getCapabilitySupportedChainInfo } from '../../utils/EIP5792Utils' -import { W3mFrameProvider } from '@web3modal/wallet' +import { W3mFrameProvider } from '@reown/appkit-wallet' export function EthersSendCallsWithPaymasterServiceTest() { const [paymasterServiceUrl, setPaymasterServiceUrl] = useState('') const [isLoading, setLoading] = useState(false) - const { address, chainId, isConnected } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { chainId } = useAppKitNetwork() + const { address, isConnected } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') const toast = useChakraToast() const [paymasterServiceSupportedChains, setPaymasterServiceSupportedChains] = useState< diff --git a/apps/laboratory/src/components/Ethers/EthersSignMessageTest.tsx b/apps/laboratory/src/components/Ethers/EthersSignMessageTest.tsx index 6871620558..f60a3e8586 100644 --- a/apps/laboratory/src/components/Ethers/EthersSignMessageTest.tsx +++ b/apps/laboratory/src/components/Ethers/EthersSignMessageTest.tsx @@ -1,14 +1,14 @@ import { Button } from '@chakra-ui/react' import { useState } from 'react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' +import { useAppKitAccount, useAppKitProvider, type Provider } from '@reown/appkit/react' import { BrowserProvider, JsonRpcSigner } from 'ethers' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { useChakraToast } from '../Toast' export function EthersSignMessageTest() { const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { address } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') const [signature, setSignature] = useState() async function onSignMessage() { @@ -16,7 +16,8 @@ export function EthersSignMessageTest() { if (!walletProvider || !address) { throw Error('user is disconnected') } - const provider = new BrowserProvider(walletProvider, chainId) + + const provider = new BrowserProvider(walletProvider, 1) const signer = new JsonRpcSigner(provider, address) const sig = await signer?.signMessage('Hello AppKit!') setSignature(sig) @@ -25,7 +26,7 @@ export function EthersSignMessageTest() { description: signature, type: 'success' }) - } catch { + } catch (error) { toast({ title: ConstantsUtil.SigningFailedToastTitle, description: 'Failed to sign message', diff --git a/apps/laboratory/src/components/Ethers/EthersSignTypedDataTest.tsx b/apps/laboratory/src/components/Ethers/EthersSignTypedDataTest.tsx index 6effd706f1..de46e77983 100644 --- a/apps/laboratory/src/components/Ethers/EthersSignTypedDataTest.tsx +++ b/apps/laboratory/src/components/Ethers/EthersSignTypedDataTest.tsx @@ -1,5 +1,5 @@ import { Button } from '@chakra-ui/react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' +import { useAppKitAccount, useAppKitProvider, type Provider } from '@reown/appkit/react' import { BrowserProvider, JsonRpcSigner } from 'ethers' import type { TypedDataField } from 'ethers' import { useChakraToast } from '../Toast' @@ -30,20 +30,20 @@ const message = { export function EthersSignTypedDataTest() { const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { address } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') async function onSignTypedData() { try { if (!walletProvider || !address) { throw Error('user is disconnected') } - const provider = new BrowserProvider(walletProvider, chainId) + const provider = new BrowserProvider(walletProvider, 1) const signer = new JsonRpcSigner(provider, address) const domain = { name: 'Ether Mail', version: '1', - chainId, + chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC' } as const diff --git a/apps/laboratory/src/components/Ethers/EthersTests.tsx b/apps/laboratory/src/components/Ethers/EthersTests.tsx index 1e49dc1e84..f2de2244d2 100644 --- a/apps/laboratory/src/components/Ethers/EthersTests.tsx +++ b/apps/laboratory/src/components/Ethers/EthersTests.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { useWeb3ModalAccount } from '@web3modal/ethers/react' +import { useAppKitAccount } from '@reown/appkit/react' import { EthersSignMessageTest } from './EthersSignMessageTest' import { EthersSignTypedDataTest } from './EthersSignTypedDataTest' import { StackDivider, Card, CardHeader, Heading, CardBody, Box, Stack } from '@chakra-ui/react' @@ -11,7 +11,7 @@ import { EthersSendCallsWithPaymasterServiceTest } from './EthersSendCallsWithPa export function EthersTests() { const [ready, setReady] = React.useState(false) - const { isConnected } = useWeb3ModalAccount() + const { isConnected } = useAppKitAccount() React.useEffect(() => { setReady(true) diff --git a/apps/laboratory/src/components/Ethers/EthersTransactionTest.tsx b/apps/laboratory/src/components/Ethers/EthersTransactionTest.tsx index fac590b8d3..7cceb62ca9 100644 --- a/apps/laboratory/src/components/Ethers/EthersTransactionTest.tsx +++ b/apps/laboratory/src/components/Ethers/EthersTransactionTest.tsx @@ -1,15 +1,21 @@ import { Button, Stack, Link, Text, Spacer } from '@chakra-ui/react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' +import { + useAppKitAccount, + useAppKitNetwork, + useAppKitProvider, + type Provider +} from '@reown/appkit/react' import { BrowserProvider, JsonRpcSigner, ethers } from 'ethers' import { useState } from 'react' -import { mainnet } from '../../utils/ChainsUtil' +import { mainnet } from '@reown/appkit/networks' import { vitalikEthAddress } from '../../utils/DataUtil' import { useChakraToast } from '../Toast' export function EthersTransactionTest() { const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { chainId } = useAppKitNetwork() + const { address } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') const [loading, setLoading] = useState(false) async function onSendTransaction() { @@ -30,10 +36,11 @@ export function EthersTransactionTest() { description: tx.hash, type: 'success' }) - } catch { + } catch (e) { toast({ title: 'Error', - description: 'Failed to sign transaction', + // @ts-expect-error - error is unknown + description: e?.message || 'Failed to sign transaction', type: 'error' }) } finally { diff --git a/apps/laboratory/src/components/Ethers/EthersWriteContractTest.tsx b/apps/laboratory/src/components/Ethers/EthersWriteContractTest.tsx index 84bd5a2c09..00bb8c8f2f 100644 --- a/apps/laboratory/src/components/Ethers/EthersWriteContractTest.tsx +++ b/apps/laboratory/src/components/Ethers/EthersWriteContractTest.tsx @@ -1,7 +1,12 @@ import { Button, Stack, Link, Text, Spacer } from '@chakra-ui/react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' +import { + useAppKitAccount, + useAppKitNetwork, + useAppKitProvider, + type Provider +} from '@reown/appkit/react' import { BrowserProvider, JsonRpcSigner, ethers } from 'ethers' -import { optimism, sepolia } from '../../utils/ChainsUtil' +import { optimism, sepolia } from '@reown/appkit/networks' import { useState } from 'react' import { abi, address as donutAddress } from '../../utils/DonutContract' @@ -9,8 +14,9 @@ import { useChakraToast } from '../Toast' export function EthersWriteContractTest() { const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider } = useWeb3ModalProvider() + const { chainId } = useAppKitNetwork() + const { address } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') const [loading, setLoading] = useState(false) async function onSendTransaction() { @@ -29,10 +35,11 @@ export function EthersWriteContractTest() { description: tx.hash, type: 'success' }) - } catch { + } catch (e) { toast({ title: 'Error', - description: 'Failed to sign transaction', + // @ts-expect-error - error is unknown + description: e?.message || 'Failed to sign transaction', type: 'error' }) } finally { diff --git a/apps/laboratory/src/components/MultiChainInfo.tsx b/apps/laboratory/src/components/MultiChainInfo.tsx new file mode 100644 index 0000000000..c0995bf3e0 --- /dev/null +++ b/apps/laboratory/src/components/MultiChainInfo.tsx @@ -0,0 +1,53 @@ +'use client' + +import * as React from 'react' +import { + StackDivider, + Card, + CardHeader, + Heading, + CardBody, + Box, + Stack, + Text +} from '@chakra-ui/react' +import { useAppKitState } from '@reown/appkit/react' +import { useEffect, useState } from 'react' + +export function MultiChainInfo() { + const { activeChain, selectedNetworkId } = useAppKitState() + const [ready, setReady] = useState(false) + + useEffect(() => { + setReady(true) + }, []) + + return ( + <> + {ready && ( + + + Chain Information + + + + } spacing="4"> + + + Active chain + + {activeChain} + + + + Active Network + + {selectedNetworkId} + + + + + )} + + ) +} diff --git a/apps/laboratory/src/components/MultiChainTestsEthersSolana.tsx b/apps/laboratory/src/components/MultiChainTestsEthersSolana.tsx new file mode 100644 index 0000000000..51118f61fc --- /dev/null +++ b/apps/laboratory/src/components/MultiChainTestsEthersSolana.tsx @@ -0,0 +1,22 @@ +import * as React from 'react' +import { useAppKitState } from '@reown/appkit/react' + +import { SolanaTests } from './Solana/SolanaTests' +import { EthersTests } from './Ethers/EthersTests' +import { EthersModalInfo } from './Ethers/EthersModalInfo' + +export function MultiChainTestsEthersSolana() { + const { activeChain } = useAppKitState() + + return ( + <> + {activeChain === 'eip155' ? ( + + + + + ) : null} + {activeChain === 'solana' ? : null} + + ) +} diff --git a/apps/laboratory/src/components/MultiChainTestsWagmiSolana.tsx b/apps/laboratory/src/components/MultiChainTestsWagmiSolana.tsx new file mode 100644 index 0000000000..87945e718f --- /dev/null +++ b/apps/laboratory/src/components/MultiChainTestsWagmiSolana.tsx @@ -0,0 +1,18 @@ +import * as React from 'react' +import { useAppKitState } from '@reown/appkit/react' + +import { SolanaTests } from './Solana/SolanaTests' +import { WagmiTests } from './Wagmi/WagmiTests' +import { AppKitNetworkInfo } from './AppKitNetworkInfo' + +export function MultiChainTestsWagmiSolana() { + const { activeChain } = useAppKitState() + + return ( + <> + + {activeChain === 'eip155' ? : null} + {activeChain === 'solana' ? : null} + + ) +} diff --git a/apps/laboratory/src/components/Siwe/SiweData.tsx b/apps/laboratory/src/components/Siwe/SiweData.tsx index 57cfbf00cf..cf0952c32f 100644 --- a/apps/laboratory/src/components/Siwe/SiweData.tsx +++ b/apps/laboratory/src/components/Siwe/SiweData.tsx @@ -8,20 +8,14 @@ import { Stack, Text } from '@chakra-ui/react' -import { useEffect, useState } from 'react' import { useSession } from 'next-auth/react' -import type { SIWESession } from '@web3modal/siwe' +import type { SIWESession } from '@reown/appkit-siwe' export function SiweData() { - const [ready, setReady] = useState(false) const { data, status } = useSession() const session = data as unknown as SIWESession - useEffect(() => { - setReady(true) - }, []) - - return ready ? ( + return ( SIWE Session Details @@ -58,5 +52,5 @@ export function SiweData() { - ) : null + ) } diff --git a/apps/laboratory/src/components/Solana/SolanaSendTransactionTest.tsx b/apps/laboratory/src/components/Solana/SolanaSendTransactionTest.tsx index 8fff3b998d..898e60c6ed 100644 --- a/apps/laboratory/src/components/Solana/SolanaSendTransactionTest.tsx +++ b/apps/laboratory/src/components/Solana/SolanaSendTransactionTest.tsx @@ -1,6 +1,6 @@ import { useState } from 'react' import { Button, Stack, Text, Spacer, Link } from '@chakra-ui/react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/solana/react' +import { useAppKitAccount, useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' import { PublicKey, Transaction, @@ -9,8 +9,9 @@ import { SystemProgram } from '@solana/web3.js' -import { solana } from '../../utils/ChainsUtil' +import { solana } from '@reown/appkit/networks' import { useChakraToast } from '../Toast' +import { type Provider, useAppKitConnection } from '@reown/appkit-adapter-solana/react' const PHANTOM_TESTNET_ADDRESS = '8vCyX7oB6Pc3pbWMGYYZF5pbSnAdQ7Gyr32JqxqCy8ZR' const recipientAddress = new PublicKey(PHANTOM_TESTNET_ADDRESS) @@ -18,8 +19,10 @@ const amountInLamports = 10_000_000 export function SolanaSendTransactionTest() { const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider, connection } = useWeb3ModalProvider() + const { address } = useAppKitAccount() + const { caipNetwork } = useAppKitNetwork() + const { walletProvider } = useAppKitProvider('solana') + const { connection } = useAppKitConnection() const [loading, setLoading] = useState(false) async function onSendTransaction() { @@ -128,7 +131,7 @@ export function SolanaSendTransactionTest() { return null } - if (chainId === solana.chainId) { + if (caipNetwork?.chainId === solana.chainId) { return ( Switch to Solana Devnet or Testnet to test this feature diff --git a/apps/laboratory/src/components/Solana/SolanaSignAllTransactionsTest.tsx b/apps/laboratory/src/components/Solana/SolanaSignAllTransactionsTest.tsx index e271cd0a32..5400478c28 100644 --- a/apps/laboratory/src/components/Solana/SolanaSignAllTransactionsTest.tsx +++ b/apps/laboratory/src/components/Solana/SolanaSignAllTransactionsTest.tsx @@ -5,14 +5,15 @@ import { Transaction, TransactionMessage, VersionedTransaction, - SystemProgram + SystemProgram, + Connection } from '@solana/web3.js' -import { useWeb3ModalAccount, useWeb3ModalProvider, type Provider } from '@web3modal/solana/react' +import { type Provider, useAppKitConnection } from '@reown/appkit-adapter-solana/react' +import { useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' -import { solana } from '../../utils/ChainsUtil' +import { solana } from '@reown/appkit/networks' import { useChakraToast } from '../Toast' -import type { Connection } from '@web3modal/base/adapters/solana/web3js' import bs58 from 'bs58' const PHANTOM_DEVNET_ADDRESS = '8vCyX7oB6Pc3pbWMGYYZF5pbSnAdQ7Gyr32JqxqCy8ZR' @@ -21,8 +22,9 @@ const amountInLamports = 1_000_000 export function SolanaSignAllTransactionsTest() { const toast = useChakraToast() - const { chainId } = useWeb3ModalAccount() - const { walletProvider, connection } = useWeb3ModalProvider() + const { chainId } = useAppKitNetwork() + const { walletProvider } = useAppKitProvider('solana') + const { connection } = useAppKitConnection() const [loading, setLoading] = useState(false) async function onSignTransaction(type: 'legacy' | 'versioned') { diff --git a/apps/laboratory/src/components/Solana/SolanaSignAndSendTransactionTest.tsx b/apps/laboratory/src/components/Solana/SolanaSignAndSendTransactionTest.tsx index 5cd1fc7000..835d1c473a 100644 --- a/apps/laboratory/src/components/Solana/SolanaSignAndSendTransactionTest.tsx +++ b/apps/laboratory/src/components/Solana/SolanaSignAndSendTransactionTest.tsx @@ -1,6 +1,6 @@ import { useState } from 'react' import { Button, Stack, Text, Spacer, Link } from '@chakra-ui/react' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/solana/react' + import { PublicKey, Transaction, @@ -9,8 +9,10 @@ import { VersionedTransaction } from '@solana/web3.js' -import { solana } from '../../utils/ChainsUtil' +import { solana } from '@reown/appkit/networks' import { useChakraToast } from '../Toast' +import { useAppKitAccount, useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' +import { useAppKitConnection, type Provider } from '@reown/appkit-adapter-solana/react' const PHANTOM_TESTNET_ADDRESS = '8vCyX7oB6Pc3pbWMGYYZF5pbSnAdQ7Gyr32JqxqCy8ZR' const recipientAddress = new PublicKey(PHANTOM_TESTNET_ADDRESS) @@ -18,8 +20,11 @@ const amountInLamports = 10_000_000 export function SolanaSignAndSendTransaction() { const toast = useChakraToast() - const { address, chainId } = useWeb3ModalAccount() - const { walletProvider, connection } = useWeb3ModalProvider() + const { address } = useAppKitAccount() + const { caipNetwork } = useAppKitNetwork() + const { walletProvider } = useAppKitProvider('solana') + const { connection } = useAppKitConnection() + const [loading, setLoading] = useState(false) async function onSendTransaction(mode: 'legacy' | 'versioned') { @@ -87,7 +92,7 @@ export function SolanaSignAndSendTransaction() { return null } - if (chainId === solana.chainId) { + if (caipNetwork?.chainId === solana.chainId) { return ( Switch to Solana Devnet or Testnet to test this feature diff --git a/apps/laboratory/src/components/Solana/SolanaSignJupiterSwapTest.tsx b/apps/laboratory/src/components/Solana/SolanaSignJupiterSwapTest.tsx index 087da33757..82fc16b231 100644 --- a/apps/laboratory/src/components/Solana/SolanaSignJupiterSwapTest.tsx +++ b/apps/laboratory/src/components/Solana/SolanaSignJupiterSwapTest.tsx @@ -2,16 +2,17 @@ import { useState } from 'react' import { Button, Stack, Text, Spacer } from '@chakra-ui/react' import { PublicKey, VersionedTransaction } from '@solana/web3.js' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/solana/react' - -import { solana } from '../../utils/ChainsUtil' +import { useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' +import { solana } from '@reown/appkit/networks' import { useChakraToast } from '../Toast' import bs58 from 'bs58' +import { useAppKitConnection, type Provider } from '@reown/appkit-adapter-solana/react' export function SolanaSignJupiterSwapTest() { const toast = useChakraToast() - const { chainId } = useWeb3ModalAccount() - const { walletProvider, connection } = useWeb3ModalProvider() + const { connection } = useAppKitConnection() + const { caipNetwork } = useAppKitNetwork() + const { walletProvider } = useAppKitProvider('solana') const [loading, setLoading] = useState(false) async function onSignVersionedTransaction() { @@ -51,7 +52,7 @@ export function SolanaSignJupiterSwapTest() { } } - if (chainId === solana.chainId) { + if (caipNetwork?.chainId === solana.chainId) { return ( Switch to Solana Devnet or Testnet to test this feature diff --git a/apps/laboratory/src/components/Solana/SolanaSignMessageTest.tsx b/apps/laboratory/src/components/Solana/SolanaSignMessageTest.tsx index fdfd169976..293a600229 100644 --- a/apps/laboratory/src/components/Solana/SolanaSignMessageTest.tsx +++ b/apps/laboratory/src/components/Solana/SolanaSignMessageTest.tsx @@ -1,13 +1,14 @@ import { Button } from '@chakra-ui/react' -import { useWeb3ModalProvider } from '@web3modal/solana/react' +import { useAppKitProvider } from '@reown/appkit/react' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { useChakraToast } from '../Toast' +import type { Provider } from '@reown/appkit-adapter-solana' export function SolanaSignMessageTest() { const toast = useChakraToast() - const { walletProvider } = useWeb3ModalProvider() + const { walletProvider } = useAppKitProvider('solana') async function onSignMessage() { try { @@ -15,7 +16,7 @@ export function SolanaSignMessageTest() { throw Error('user is disconnected') } - const encodedMessage = new TextEncoder().encode('Hello from Web3Modal') + const encodedMessage = new TextEncoder().encode('Hello from AppKit') const signature = await walletProvider.signMessage(encodedMessage) toast({ diff --git a/apps/laboratory/src/components/Solana/SolanaSignTransactionTest.tsx b/apps/laboratory/src/components/Solana/SolanaSignTransactionTest.tsx index f7b8ec5d60..3148ed5afb 100644 --- a/apps/laboratory/src/components/Solana/SolanaSignTransactionTest.tsx +++ b/apps/laboratory/src/components/Solana/SolanaSignTransactionTest.tsx @@ -8,9 +8,9 @@ import { SystemProgram } from '@solana/web3.js' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/solana/react' - -import { solana } from '../../utils/ChainsUtil' +import { useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' +import { useAppKitConnection, type Provider } from '@reown/appkit-adapter-solana/react' +import { solana } from '@reown/appkit/networks' import { useChakraToast } from '../Toast' import bs58 from 'bs58' @@ -20,8 +20,9 @@ const amountInLamports = 10_000_000 export function SolanaSignTransactionTest() { const toast = useChakraToast() - const { chainId } = useWeb3ModalAccount() - const { walletProvider, connection } = useWeb3ModalProvider() + const { caipNetwork } = useAppKitNetwork() + const { walletProvider } = useAppKitProvider('solana') + const { connection } = useAppKitConnection() const [loading, setLoading] = useState(false) async function onSignTransaction() { @@ -123,7 +124,7 @@ export function SolanaSignTransactionTest() { } } - if (chainId === solana.chainId) { + if (caipNetwork?.chainId === solana.chainId) { return ( Switch to Solana Devnet or Testnet to test this feature diff --git a/apps/laboratory/src/components/Solana/SolanaTests.tsx b/apps/laboratory/src/components/Solana/SolanaTests.tsx index 844a6e12c9..01424b0350 100644 --- a/apps/laboratory/src/components/Solana/SolanaTests.tsx +++ b/apps/laboratory/src/components/Solana/SolanaTests.tsx @@ -1,4 +1,4 @@ -import { useWeb3ModalAccount } from '@web3modal/solana/react' +import { useAppKitAccount, useAppKitNetwork } from '@reown/appkit/react' import { StackDivider, Card, @@ -15,13 +15,14 @@ import { SolanaSignTransactionTest } from './SolanaSignTransactionTest' import { SolanaSendTransactionTest } from './SolanaSendTransactionTest' import { SolanaSignMessageTest } from './SolanaSignMessageTest' import { SolanaWriteContractTest } from './SolanaWriteContractTest' -import { solana, solanaDevnet, solanaTestnet } from '../../utils/ChainsUtil' +import { solana, solanaDevnet, solanaTestnet } from '@reown/appkit/networks' import { SolanaSignAndSendTransaction } from './SolanaSignAndSendTransactionTest' import { SolanaSignAllTransactionsTest } from './SolanaSignAllTransactionsTest' import { SolanaSignJupiterSwapTest } from './SolanaSignJupiterSwapTest' export function SolanaTests() { - const { isConnected, currentChain } = useWeb3ModalAccount() + const { isConnected } = useAppKitAccount() + const { caipNetwork } = useAppKitNetwork() return isConnected ? ( @@ -37,10 +38,10 @@ export function SolanaTests() { - {currentChain?.chainId !== solana.chainId && ( + {caipNetwork?.chainId !== solana.chainId && ( - Please ensure your wallet is connected to the {currentChain?.name} + Please ensure your wallet is connected to the {caipNetwork?.name} )} @@ -97,8 +98,8 @@ export function SolanaTests() { - {(currentChain?.chainId === solanaTestnet.chainId || - currentChain?.chainId === solanaDevnet.chainId) && ( + {(caipNetwork?.chainId === solanaTestnet.chainId || + caipNetwork?.chainId === solanaDevnet.chainId) && ( } spacing="4"> diff --git a/apps/laboratory/src/components/Solana/SolanaWriteContractTest.tsx b/apps/laboratory/src/components/Solana/SolanaWriteContractTest.tsx index ff033a7e7c..441668ef1b 100644 --- a/apps/laboratory/src/components/Solana/SolanaWriteContractTest.tsx +++ b/apps/laboratory/src/components/Solana/SolanaWriteContractTest.tsx @@ -9,22 +9,24 @@ import { VersionedTransaction, TransactionMessage } from '@solana/web3.js' -import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/solana/react' +import { useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' import { COUNTER_ACCOUNT_SIZE } from '../../utils/SolanaConstants' import { deserializeCounterAccount, detectProgramId } from '../../utils/SolanaUtil' import { useChakraToast } from '../Toast' +import { useAppKitConnection, type Provider } from '@reown/appkit-adapter-solana/react' export function SolanaWriteContractTest() { const toast = useChakraToast() - const { currentChain } = useWeb3ModalAccount() - const { walletProvider, connection } = useWeb3ModalProvider() + const { caipNetwork } = useAppKitNetwork() + const { walletProvider } = useAppKitProvider('solana') + const { connection } = useAppKitConnection() const [loading, setLoading] = useState(false) async function onIncrementCounter() { setLoading(true) - const PROGRAM_ID = new PublicKey(detectProgramId(currentChain?.chainId ?? '')) + const PROGRAM_ID = new PublicKey(detectProgramId(caipNetwork?.chainId?.toString() ?? '')) try { if (!walletProvider?.publicKey) { diff --git a/apps/laboratory/src/components/UPA/UpaEvmSignMessageTest.tsx b/apps/laboratory/src/components/UPA/UpaEvmSignMessageTest.tsx new file mode 100644 index 0000000000..757e0bcce2 --- /dev/null +++ b/apps/laboratory/src/components/UPA/UpaEvmSignMessageTest.tsx @@ -0,0 +1,51 @@ +import * as React from 'react' +import { Button } from '@chakra-ui/react' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { useChakraToast } from '../Toast' +import { useAppKitAccount, useAppKitProvider } from '@reown/appkit/react' +import Provider from '@walletconnect/universal-provider' + +export function UpaEvmSignMessageTest() { + const toast = useChakraToast() + const { isConnected, address } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('eip155') + + async function onSignMessage() { + try { + if (!walletProvider || !address) { + throw Error('user is disconnected') + } + + await walletProvider.request({ + method: 'eth_sign', + params: [address, 'Hello AppKit!'] + }) + + toast({ + title: ConstantsUtil.SigningSucceededToastTitle, + description: 'Success', + type: 'success' + }) + } catch (error) { + toast({ + title: ConstantsUtil.SigningFailedToastTitle, + description: 'Failed to sign message', + type: 'error' + }) + } + } + + return ( + <> + + + + ) +} diff --git a/apps/laboratory/src/components/UPA/UpaSolanaSignMessageTest.tsx b/apps/laboratory/src/components/UPA/UpaSolanaSignMessageTest.tsx new file mode 100644 index 0000000000..57209a89b7 --- /dev/null +++ b/apps/laboratory/src/components/UPA/UpaSolanaSignMessageTest.tsx @@ -0,0 +1,58 @@ +import * as React from 'react' +import { Button } from '@chakra-ui/react' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { useChakraToast } from '../Toast' +import { useAppKitAccount, useAppKitNetwork, useAppKitProvider } from '@reown/appkit/react' +import Provider from '@walletconnect/universal-provider' +import base58 from 'bs58' + +export function UpaSolanaSignMessageTest() { + const toast = useChakraToast() + const { isConnected, address } = useAppKitAccount() + const { walletProvider } = useAppKitProvider('solana') + const { caipNetwork } = useAppKitNetwork() + + async function onSignMessage() { + try { + if (!walletProvider || !address) { + throw Error('user is disconnected') + } + + const payload = { + method: 'solana_signMessage', + params: { + message: base58.encode(new TextEncoder().encode('Hello Appkit!')), + pubkey: address + } + } + const chain = caipNetwork?.id + await walletProvider.request(payload, chain) + + toast({ + title: ConstantsUtil.SigningSucceededToastTitle, + description: 'Success', + type: 'success' + }) + } catch (error) { + toast({ + title: ConstantsUtil.SigningFailedToastTitle, + description: 'Failed to sign message', + type: 'error' + }) + } + } + + return ( + <> + + + + ) +} diff --git a/apps/laboratory/src/components/UPA/UpaTests.tsx b/apps/laboratory/src/components/UPA/UpaTests.tsx new file mode 100644 index 0000000000..9c025d249d --- /dev/null +++ b/apps/laboratory/src/components/UPA/UpaTests.tsx @@ -0,0 +1,31 @@ +import { useAppKitNetwork } from '@reown/appkit/react' + +import { StackDivider, Card, CardHeader, Heading, CardBody, Box, Stack } from '@chakra-ui/react' +import { UpaEvmSignMessageTest } from './UpaEvmSignMessageTest' +import { UpaSolanaSignMessageTest } from './UpaSolanaSignMessageTest' + +export function UpaTests() { + const { caipNetwork } = useAppKitNetwork() + + return ( + + + Test Interactions + + + } spacing="4"> + + + Sign Message + + {caipNetwork?.chainNamespace === 'eip155' ? ( + + ) : ( + + )} + + + + + ) +} diff --git a/apps/laboratory/src/components/Wagmi/WagmiGetCallsStatusTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiGetCallsStatusTest.tsx index d8132c9a6f..90c684e65d 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiGetCallsStatusTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiGetCallsStatusTest.tsx @@ -6,13 +6,15 @@ import { EIP_5792_RPC_METHODS } from '../../utils/EIP5792Utils' import { bigIntReplacer } from '../../utils/CommonUtils' import { useCallsStatus } from 'wagmi/experimental' import { useWagmiAvailableCapabilities } from '../../hooks/useWagmiActiveCapabilities' +import { useAppKitAccount } from '@reown/appkit/react' export function WagmiGetCallsStatusTest() { const { supported } = useWagmiAvailableCapabilities({ method: EIP_5792_RPC_METHODS.WALLET_GET_CALLS_STATUS }) - const { status, address } = useAccount() + const { address } = useAppKitAccount() + const { status } = useAccount() const isConnected = status === 'connected' diff --git a/apps/laboratory/src/components/Wagmi/WagmiModalInfo.tsx b/apps/laboratory/src/components/Wagmi/WagmiModalInfo.tsx index 02b1092301..4ad6b4ba4f 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiModalInfo.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiModalInfo.tsx @@ -3,9 +3,11 @@ import EthereumProvider from '@walletconnect/ethereum-provider' import { useAccount } from 'wagmi' import { AppKitInfo } from '../AppKitInfo' +import { useAppKitAccount } from '@reown/appkit/react' export function WagmiModalInfo() { - const { isConnected, address, chainId, connector } = useAccount() + const { address, isConnected } = useAppKitAccount() + const { chainId, connector } = useAccount() const [clientId, setClientId] = React.useState(null) async function getClientId() { @@ -23,5 +25,7 @@ export function WagmiModalInfo() { getClientId().then(setClientId) }, [connector]) - return isConnected ? : null + return isConnected ? ( + + ) : null } diff --git a/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsAsyncTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsAsyncTest.tsx index 12db6bf0cb..5f02f0285b 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsAsyncTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsAsyncTest.tsx @@ -14,12 +14,14 @@ import { bigIntReplacer } from '../../utils/CommonUtils' import { useERC7715Permissions } from '../../hooks/useERC7715Permissions' import { getPurchaseDonutPermissions } from '../../utils/ERC7715Utils' import { KeyTypes } from '../../utils/EncodingUtils' +import { useAppKitAccount } from '@reown/appkit/react' export function WagmiRequestPermissionsAsyncTest() { const { provider, supported } = useWagmiAvailableCapabilities({ method: EIP_7715_RPC_METHODS.WALLET_GRANT_PERMISSIONS }) - const { chain, address, isConnected } = useAccount() + const { address, isConnected } = useAppKitAccount() + const { chain } = useAccount() if (!isConnected || !provider || !address || !chain) { return ( @@ -36,7 +38,7 @@ export function WagmiRequestPermissionsAsyncTest() { ) } - return + return } function ConnectedTestContent({ diff --git a/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsSyncTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsSyncTest.tsx index 734c4b6e1a..fe177cadbc 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsSyncTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsSyncTest.tsx @@ -15,12 +15,14 @@ import { bigIntReplacer } from '../../utils/CommonUtils' import { getPurchaseDonutPermissions } from '../../utils/ERC7715Utils' import { serializePublicKey, type P256Credential } from 'webauthn-p256' import { KeyTypes } from '../../utils/EncodingUtils' +import { useAppKitAccount } from '@reown/appkit/react' export function WagmiRequestPermissionsSyncTest() { const { provider, supported } = useWagmiAvailableCapabilities({ method: EIP_7715_RPC_METHODS.WALLET_GRANT_PERMISSIONS }) - const { chain, address, isConnected } = useAccount() + const { address, isConnected } = useAppKitAccount() + const { chain } = useAccount() if (!isConnected || !provider || !address || !chain) { return ( @@ -37,7 +39,7 @@ export function WagmiRequestPermissionsSyncTest() { ) } - return + return } function ConnectedTestContent({ @@ -47,7 +49,7 @@ function ConnectedTestContent({ }: { chain: Chain provider: Provider - address: Address + address: Address | undefined }) { const [isRequestPermissionLoading, setRequestPermissionLoading] = useState(false) const { passkey } = usePasskey() @@ -57,6 +59,9 @@ function ConnectedTestContent({ const onRequestPermissions = useCallback(async () => { setRequestPermissionLoading(true) try { + if (!address) { + throw new Error('No account address available, Please connect your wallet.') + } if (!passkey) { throw new Error('Passkey not available') } diff --git a/apps/laboratory/src/components/Wagmi/WagmiSendCallsTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiSendCallsTest.tsx index a912458183..c0fbab5281 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiSendCallsTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiSendCallsTest.tsx @@ -7,6 +7,7 @@ import { parseGwei, type Address } from 'viem' import { vitalikEthAddress } from '../../utils/DataUtil' import { EIP_5792_RPC_METHODS, WALLET_CAPABILITIES } from '../../utils/EIP5792Utils' import { useWagmiAvailableCapabilities } from '../../hooks/useWagmiActiveCapabilities' +import { useAppKitAccount } from '@reown/appkit/react' const TEST_TX_1 = { to: vitalikEthAddress as Address, @@ -23,7 +24,8 @@ export function WagmiSendCallsTest() { capability: WALLET_CAPABILITIES.ATOMIC_BATCH, method: EIP_5792_RPC_METHODS.WALLET_SEND_CALLS }) - const { address, status } = useAccount() + const { address } = useAppKitAccount() + const { status } = useAccount() const isConnected = status === 'connected' diff --git a/apps/laboratory/src/components/Wagmi/WagmiSendCallsWithPaymasterServiceTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiSendCallsWithPaymasterServiceTest.tsx index 1dd690130c..59175ac292 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiSendCallsWithPaymasterServiceTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiSendCallsWithPaymasterServiceTest.tsx @@ -7,6 +7,7 @@ import { parseGwei, type Address } from 'viem' import { vitalikEthAddress } from '../../utils/DataUtil' import { EIP_5792_RPC_METHODS, WALLET_CAPABILITIES } from '../../utils/EIP5792Utils' import { useWagmiAvailableCapabilities } from '../../hooks/useWagmiActiveCapabilities' +import { useAppKitAccount } from '@reown/appkit/react' const TEST_TX_1 = { to: vitalikEthAddress as Address, @@ -24,7 +25,8 @@ export function WagmiSendCallsWithPaymasterServiceTest() { method: EIP_5792_RPC_METHODS.WALLET_SEND_CALLS }) - const { address, status } = useAccount() + const { address } = useAppKitAccount() + const { status } = useAccount() const isConnected = status === 'connected' diff --git a/apps/laboratory/src/components/Wagmi/WagmiSignMessageTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiSignMessageTest.tsx index bb7e39db79..83dbf5480f 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiSignMessageTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiSignMessageTest.tsx @@ -1,14 +1,16 @@ import * as React from 'react' import { Button } from '@chakra-ui/react' -import { useSignMessage, useAccount } from 'wagmi' +import { useSignMessage } from 'wagmi' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { useChakraToast } from '../Toast' +import { useAppKitAccount } from '@reown/appkit/react' export function WagmiSignMessageTest() { const toast = useChakraToast() const { signMessageAsync, isPending } = useSignMessage() - const { isConnected } = useAccount() + const { isConnected } = useAppKitAccount() + const [signature, setSignature] = React.useState() async function onSignMessage() { @@ -20,7 +22,7 @@ export function WagmiSignMessageTest() { description: sig, type: 'success' }) - } catch { + } catch (e) { toast({ title: ConstantsUtil.SigningFailedToastTitle, description: 'Failed to sign message', diff --git a/apps/laboratory/src/components/Wagmi/WagmiSignTypedDataTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiSignTypedDataTest.tsx index 9b51997a8e..9785f5dcb7 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiSignTypedDataTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiSignTypedDataTest.tsx @@ -1,6 +1,7 @@ import { Button } from '@chakra-ui/react' import { useAccount, useSignTypedData } from 'wagmi' import { useChakraToast } from '../Toast' +import { useAppKitAccount } from '@reown/appkit/react' // Example data const types = { @@ -29,7 +30,8 @@ const message = { export function WagmiSignTypedDataTest() { const toast = useChakraToast() - const { chain, isConnected } = useAccount() + const { isConnected } = useAppKitAccount() + const { chain } = useAccount() const domain = { name: 'Ether Mail', version: '1', diff --git a/apps/laboratory/src/components/Wagmi/WagmiTests.tsx b/apps/laboratory/src/components/Wagmi/WagmiTests.tsx index f2c2c39f8a..360da53890 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiTests.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiTests.tsx @@ -36,12 +36,14 @@ export function WagmiTests() { + Contract Write + USDC Send @@ -54,12 +56,14 @@ export function WagmiTests() { + Get Calls Status + Send Calls (Paymaster Service) diff --git a/apps/laboratory/src/components/Wagmi/WagmiTransactionTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiTransactionTest.tsx index b7a6bed244..d5d84461ca 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiTransactionTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiTransactionTest.tsx @@ -43,11 +43,11 @@ function AvailableTestContent() { type: 'success' }) }, - onError: () => { + onError: error => { setLoading(false) toast({ title: 'Error', - description: 'Failed to sign transaction', + description: error?.message || 'Failed to sign transaction', type: 'error' }) } @@ -60,7 +60,7 @@ function AvailableTestContent() { if (prepareError) { toast({ title: 'Error', - description: 'Not enough funds for transaction', + description: prepareError?.message || 'Failed to sign transaction', type: 'error' }) } else { diff --git a/apps/laboratory/src/components/Wagmi/WagmiWriteContractTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiWriteContractTest.tsx index 546799ae84..723c010ec7 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiWriteContractTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiWriteContractTest.tsx @@ -1,15 +1,17 @@ import { Button, Stack, Link, Text, Spacer, Flex } from '@chakra-ui/react' -import { parseEther, type Address } from 'viem' +import { parseEther } from 'viem' import { useAccount, useSimulateContract, useWriteContract, useReadContract } from 'wagmi' import { useCallback, useEffect } from 'react' import { optimism, sepolia } from 'wagmi/chains' import { abi, address } from '../../utils/DonutContract' import { useChakraToast } from '../Toast' +import { useAppKitAccount } from '@reown/appkit/react' const ALLOWED_CHAINS = [sepolia.id, optimism.id] as number[] export function WagmiWriteContractTest() { - const { status, chain, address: accountAddress } = useAccount() + const { address: accountAddress } = useAppKitAccount() + const { status, chain } = useAccount() return ALLOWED_CHAINS.includes(Number(chain?.id)) && status === 'connected' ? ( @@ -20,7 +22,7 @@ export function WagmiWriteContractTest() { ) } -function AvailableTestContent({ accountAddress }: { accountAddress: Address }) { +function AvailableTestContent({ accountAddress }: { accountAddress: string | undefined }) { const toast = useChakraToast() const { data: donutsOwned, diff --git a/apps/laboratory/src/hooks/useWagmiActiveCapabilities.ts b/apps/laboratory/src/hooks/useWagmiActiveCapabilities.ts index 53c0435a2a..d4d17cf066 100644 --- a/apps/laboratory/src/hooks/useWagmiActiveCapabilities.ts +++ b/apps/laboratory/src/hooks/useWagmiActiveCapabilities.ts @@ -1,7 +1,7 @@ import { EthereumProvider } from '@walletconnect/ethereum-provider' import { useAccount, type Connector } from 'wagmi' import { useState, useEffect, useMemo } from 'react' -import { type WalletCapabilities } from 'viem' +import { type Address, type WalletCapabilities } from 'viem' import { type Chain } from 'wagmi/chains' import { EIP_5792_RPC_METHODS, @@ -9,7 +9,8 @@ import { getFilteredCapabilitySupportedChainInfo, getProviderCachedCapabilities } from '../utils/EIP5792Utils' -import { W3mFrameProvider } from '@web3modal/wallet' +import { W3mFrameProvider } from '@reown/appkit-wallet' +import { useAppKitAccount } from '@reown/appkit/react' type UseWagmiAvailableCapabilitiesParams = { capability?: string @@ -29,7 +30,8 @@ export function useWagmiAvailableCapabilities({ Record | undefined >() - const { chain, address, connector, isConnected } = useAccount() + const { address, isConnected } = useAppKitAccount() + const { chain, connector } = useAccount() const supportedChains = useMemo( () => @@ -51,7 +53,7 @@ export function useWagmiAvailableCapabilities({ useEffect(() => { if (isConnected && connector && address && chain) { - fetchProviderAndAccountCapabilities(address, connector, chain) + fetchProviderAndAccountCapabilities(address as Address, connector, chain) } }, [connector, address, chain, isConnected]) diff --git a/apps/laboratory/src/layout/CustomWallet.tsx b/apps/laboratory/src/layout/CustomWallet.tsx index a56e48a4a1..14e4ad3c06 100644 --- a/apps/laboratory/src/layout/CustomWallet.tsx +++ b/apps/laboratory/src/layout/CustomWallet.tsx @@ -53,7 +53,7 @@ export function CustomWallet({ controls }: Props) { Learn more. diff --git a/apps/laboratory/src/layout/LayoutHeader.tsx b/apps/laboratory/src/layout/LayoutHeader.tsx index 99e65c6388..3565631e8c 100644 --- a/apps/laboratory/src/layout/LayoutHeader.tsx +++ b/apps/laboratory/src/layout/LayoutHeader.tsx @@ -60,10 +60,10 @@ export function LayoutHeader() { GitHub - + Gallery - + Docs diff --git a/apps/laboratory/src/pages/_app.tsx b/apps/laboratory/src/pages/_app.tsx index 4c2ab7db55..791d7017ab 100644 --- a/apps/laboratory/src/pages/_app.tsx +++ b/apps/laboratory/src/pages/_app.tsx @@ -18,6 +18,10 @@ export default function App({ AppKit Lab + diff --git a/apps/laboratory/src/pages/api/auth/[...nextauth].ts b/apps/laboratory/src/pages/api/auth/[...nextauth].ts index 6d7b199f75..30dc4bdc5c 100644 --- a/apps/laboratory/src/pages/api/auth/[...nextauth].ts +++ b/apps/laboratory/src/pages/api/auth/[...nextauth].ts @@ -1,7 +1,7 @@ import type { NextApiRequest, NextApiResponse } from 'next' import nextAuth from 'next-auth' import credentialsProvider from 'next-auth/providers/credentials' -import { type SIWESession, getChainIdFromMessage, getAddressFromMessage } from '@web3modal/siwe' +import { type SIWESession, getChainIdFromMessage, getAddressFromMessage } from '@reown/appkit-siwe' import { verifySignature } from '../../../utils/SignatureUtil' declare module 'next-auth' { diff --git a/apps/laboratory/src/pages/index.tsx b/apps/laboratory/src/pages/index.tsx index a58ac619e8..ebb251f472 100644 --- a/apps/laboratory/src/pages/index.tsx +++ b/apps/laboratory/src/pages/index.tsx @@ -8,7 +8,8 @@ import { Box, Text, Button, - Link + Link, + Badge } from '@chakra-ui/react' import { IoArrowForward } from 'react-icons/io5' import { @@ -126,7 +127,7 @@ export default function HomePage() { - Ethers5 + Ethers 5 @@ -179,6 +180,79 @@ export default function HomePage() { + + + + + AppKit โ›“๏ธ Multichain โœจ New + + + + + } spacing="4"> + + + + + Wagmi + Solana + + + Configuration with Wagmi and Solana adapters enabled for AppKit + + + + + + + + + + + + Ethers + Solana + + + Configuration with Ethers and Solana adapters enabled for AppKit + + + + + + + + + + + + Ethers5 + Solana + + + Configuration with Ethers and Solana adapters enabled for AppKit + + + + + + + + + + + + Basic + + + Configuration with no adapters enabled for AppKit + + + + + + + + + + ) } diff --git a/apps/laboratory/src/pages/library/ethers-all-internal.tsx b/apps/laboratory/src/pages/library/ethers-all-internal.tsx index dc2ce94568..5d99cb4921 100644 --- a/apps/laboratory/src/pages/library/ethers-all-internal.tsx +++ b/apps/laboratory/src/pages/library/ethers-all-internal.tsx @@ -1,28 +1,27 @@ -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers/react' +import { createAppKit } from '@reown/appkit/react' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { EthersTests } from '../../components/Ethers/EthersTests' import { AppKitButtons } from '../../components/AppKitButtons' import { siweConfig } from '../../utils/SiweUtils' import { SiweData } from '../../components/Siwe/SiweData' import { EthersModalInfo } from '../../components/Ethers/EthersModalInfo' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1, - auth: { - socials: ['google', 'x', 'discord', 'farcaster', 'github', 'apple', 'facebook'] - }, - coinbasePreference: 'smartWalletOnly' - }), - chains: EthersConstants.chains, +const ethersAdapter = new EthersAdapter() + +const modal = createAppKit({ + adapters: [ethersAdapter], + networks: [arbitrum, mainnet, optimism, polygon, zkSync, sepolia], + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true, + socials: ['google', 'x', 'discord', 'farcaster', 'github', 'apple', 'facebook'] + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', siweConfig, customWallets: ConstantsUtil.CustomWallets }) diff --git a/apps/laboratory/src/pages/library/ethers-all.tsx b/apps/laboratory/src/pages/library/ethers-all.tsx index 57ffcaf707..9edf847176 100644 --- a/apps/laboratory/src/pages/library/ethers-all.tsx +++ b/apps/laboratory/src/pages/library/ethers-all.tsx @@ -1,28 +1,27 @@ -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers/react' +import { createAppKit } from '@reown/appkit/react' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { EthersTests } from '../../components/Ethers/EthersTests' import { AppKitButtons } from '../../components/AppKitButtons' import { siweConfig } from '../../utils/SiweUtils' import { SiweData } from '../../components/Siwe/SiweData' import { EthersModalInfo } from '../../components/Ethers/EthersModalInfo' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1, - auth: { - socials: ['google', 'x', 'discord', 'farcaster', 'github', 'apple', 'facebook'] - }, - coinbasePreference: 'smartWalletOnly' - }), - chains: EthersConstants.chains, +const ethersAdapter = new EthersAdapter() + +const modal = createAppKit({ + adapters: [ethersAdapter], + networks: [arbitrum, mainnet, optimism, polygon, zkSync, sepolia], + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true, + socials: ['google', 'x', 'discord', 'farcaster', 'github', 'apple', 'facebook'] + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', siweConfig }) diff --git a/apps/laboratory/src/pages/library/ethers-no-email.tsx b/apps/laboratory/src/pages/library/ethers-no-email.tsx index f526269a4b..4dcbb9cef9 100644 --- a/apps/laboratory/src/pages/library/ethers-no-email.tsx +++ b/apps/laboratory/src/pages/library/ethers-no-email.tsx @@ -1,28 +1,26 @@ -import { EthersTests } from '../../components/Ethers/EthersTests' -import { AppKitButtons } from '../../components/AppKitButtons' -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers/react' +import { createAppKit } from '@reown/appkit/react' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { EthersModalInfo } from '../../components/Ethers/EthersModalInfo' +import { AppKitButtons } from '../../components/AppKitButtons' +import { EthersTests } from '../../components/Ethers/EthersTests' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' + +const ethersAdapter = new EthersAdapter() -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1, - chains: EthersConstants.chains, - coinbasePreference: 'smartWalletOnly', - auth: { - email: false, - socials: [] - } - }), - chains: EthersConstants.chains, +const modal = createAppKit({ + adapters: [ethersAdapter], + networks: [arbitrum, mainnet, optimism, polygon, zkSync, sepolia], + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true, + email: false, + socials: [] + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', customWallets: ConstantsUtil.CustomWallets }) diff --git a/apps/laboratory/src/pages/library/ethers-no-socials.tsx b/apps/laboratory/src/pages/library/ethers-no-socials.tsx index 2fd4689a55..e965b8fd6d 100644 --- a/apps/laboratory/src/pages/library/ethers-no-socials.tsx +++ b/apps/laboratory/src/pages/library/ethers-no-socials.tsx @@ -1,29 +1,25 @@ import { EthersTests } from '../../components/Ethers/EthersTests' import { AppKitButtons } from '../../components/AppKitButtons' -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers/react' +import { createAppKit } from '@reown/appkit/react' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { EthersModalInfo } from '../../components/Ethers/EthersModalInfo' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' +import { siweConfig } from '../../utils/SiweUtils' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1, - chains: EthersConstants.chains, - coinbasePreference: 'smartWalletOnly', - auth: { - email: true, - socials: [] - } - }), - chains: EthersConstants.chains, +const ethersAdapter = new EthersAdapter() + +const modal = createAppKit({ + adapters: [ethersAdapter], + networks: [arbitrum, mainnet, optimism, polygon, zkSync, sepolia], + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', - customWallets: ConstantsUtil.CustomWallets + features: { + analytics: true, + socials: [] + }, + siweConfig }) ThemeStore.setModal(modal) diff --git a/apps/laboratory/src/pages/library/ethers-siwe.tsx b/apps/laboratory/src/pages/library/ethers-siwe.tsx index 582ed2edee..11586db912 100644 --- a/apps/laboratory/src/pages/library/ethers-siwe.tsx +++ b/apps/laboratory/src/pages/library/ethers-siwe.tsx @@ -1,22 +1,23 @@ +import { createAppKit } from '@reown/appkit/react' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' import { SiweData } from '../../components/Siwe/SiweData' import { EthersTests } from '../../components/Ethers/EthersTests' import { AppKitButtons } from '../../components/AppKitButtons' -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers/react' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { siweConfig } from '../../utils/SiweUtils' import { EthersModalInfo } from '../../components/Ethers/EthersModalInfo' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1 - }), - chains: EthersConstants.chains, +const ethersAdapter = new EthersAdapter() + +const modal = createAppKit({ + adapters: [ethersAdapter], + networks: [mainnet, optimism, polygon, zkSync, arbitrum, sepolia], projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, + features: { + analytics: true + }, siweConfig, customWallets: ConstantsUtil.CustomWallets }) diff --git a/apps/laboratory/src/pages/library/ethers.tsx b/apps/laboratory/src/pages/library/ethers.tsx index 95425f6aec..c3d23f5f59 100644 --- a/apps/laboratory/src/pages/library/ethers.tsx +++ b/apps/laboratory/src/pages/library/ethers.tsx @@ -1,25 +1,21 @@ -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers/react' +import { createAppKit } from '@reown/appkit/react' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' import { EthersTests } from '../../components/Ethers/EthersTests' import { AppKitButtons } from '../../components/AppKitButtons' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { EthersModalInfo } from '../../components/Ethers/EthersModalInfo' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1, - chains: EthersConstants.chains, - coinbasePreference: 'smartWalletOnly' - }), - chains: EthersConstants.chains, - defaultChain: EthersConstants.chains[1], +const ethersAdapter = new EthersAdapter() + +const modal = createAppKit({ + adapters: [ethersAdapter], + networks: [mainnet, optimism, polygon, zkSync, arbitrum, sepolia], projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true + }, customWallets: ConstantsUtil.CustomWallets }) diff --git a/apps/laboratory/src/pages/library/ethers5-all-internal.tsx b/apps/laboratory/src/pages/library/ethers5-all-internal.tsx index 4db69633a7..3db542a539 100644 --- a/apps/laboratory/src/pages/library/ethers5-all-internal.tsx +++ b/apps/laboratory/src/pages/library/ethers5-all-internal.tsx @@ -1,28 +1,27 @@ -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5/react' +import { createAppKit } from '@reown/appkit/react' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { AppKitButtons } from '../../components/AppKitButtons' import { siweConfig } from '../../utils/SiweUtils' import { SiweData } from '../../components/Siwe/SiweData' import { Ethers5Tests } from '../../components/Ethers/Ethers5Tests' import { Ethers5ModalInfo } from '../../components/Ethers/Ethers5ModalInfo' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' +import { Ethers5Adapter } from '@reown/appkit-adapter-ethers5' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1, - auth: { - socials: ['google', 'x', 'discord', 'farcaster', 'github', 'apple', 'facebook'] - }, - coinbasePreference: 'smartWalletOnly' - }), - chains: EthersConstants.chains, +const ethers5Adapter = new Ethers5Adapter() + +const modal = createAppKit({ + adapters: [ethers5Adapter], + networks: [arbitrum, mainnet, optimism, polygon, zkSync, sepolia], + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true, + socials: ['google', 'x', 'discord', 'farcaster', 'github', 'apple', 'facebook'] + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', siweConfig, customWallets: ConstantsUtil.CustomWallets }) diff --git a/apps/laboratory/src/pages/library/ethers5-all.tsx b/apps/laboratory/src/pages/library/ethers5-all.tsx index e39cacbe18..ba476c8301 100644 --- a/apps/laboratory/src/pages/library/ethers5-all.tsx +++ b/apps/laboratory/src/pages/library/ethers5-all.tsx @@ -1,28 +1,27 @@ -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5/react' +import { createAppKit } from '@reown/appkit/react' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { AppKitButtons } from '../../components/AppKitButtons' import { siweConfig } from '../../utils/SiweUtils' import { SiweData } from '../../components/Siwe/SiweData' import { Ethers5Tests } from '../../components/Ethers/Ethers5Tests' import { Ethers5ModalInfo } from '../../components/Ethers/Ethers5ModalInfo' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' +import { Ethers5Adapter } from '@reown/appkit-adapter-ethers5' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1, - auth: { - socials: ['google', 'x', 'discord', 'farcaster', 'github', 'apple', 'facebook'] - }, - coinbasePreference: 'smartWalletOnly' - }), - chains: EthersConstants.chains, +const ethers5Adapter = new Ethers5Adapter() + +const modal = createAppKit({ + adapters: [ethers5Adapter], + networks: [arbitrum, mainnet, optimism, polygon, zkSync, sepolia], + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true, + socials: ['google', 'x', 'discord', 'farcaster', 'github', 'apple', 'facebook'] + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', siweConfig }) diff --git a/apps/laboratory/src/pages/library/ethers5-no-email.tsx b/apps/laboratory/src/pages/library/ethers5-no-email.tsx new file mode 100644 index 0000000000..ec4b3ac456 --- /dev/null +++ b/apps/laboratory/src/pages/library/ethers5-no-email.tsx @@ -0,0 +1,37 @@ +import { createAppKit } from '@reown/appkit/react' +import { Ethers5Adapter } from '@reown/appkit-adapter-ethers5' +import { ThemeStore } from '../../utils/StoreUtil' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { Ethers5ModalInfo } from '../../components/Ethers/Ethers5ModalInfo' +import { AppKitButtons } from '../../components/AppKitButtons' +import { Ethers5Tests } from '../../components/Ethers/Ethers5Tests' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' + +const ethers5Adapter = new Ethers5Adapter() + +const modal = createAppKit({ + adapters: [ethers5Adapter], + networks: [arbitrum, mainnet, optimism, polygon, zkSync, sepolia], + defaultNetwork: mainnet, + projectId: ConstantsUtil.ProjectId, + features: { + analytics: true, + email: false, + socials: [] + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', + customWallets: ConstantsUtil.CustomWallets +}) + +ThemeStore.setModal(modal) + +export default function Ethers() { + return ( + <> + + + + + ) +} diff --git a/apps/laboratory/src/pages/library/ethers5-no-socials.tsx b/apps/laboratory/src/pages/library/ethers5-no-socials.tsx index 8b90886600..2d4c82db4c 100644 --- a/apps/laboratory/src/pages/library/ethers5-no-socials.tsx +++ b/apps/laboratory/src/pages/library/ethers5-no-socials.tsx @@ -1,31 +1,26 @@ -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5/react' +import { createAppKit } from '@reown/appkit/react' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { AppKitButtons } from '../../components/AppKitButtons' import { siweConfig } from '../../utils/SiweUtils' import { SiweData } from '../../components/Siwe/SiweData' import { Ethers5Tests } from '../../components/Ethers/Ethers5Tests' import { Ethers5ModalInfo } from '../../components/Ethers/Ethers5ModalInfo' +import { Ethers5Adapter } from '@reown/appkit-adapter-ethers5' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1, - auth: { - email: true, - socials: [] - }, - coinbasePreference: 'smartWalletOnly' - }), - chains: EthersConstants.chains, +const ethersAdapter = new Ethers5Adapter() + +const modal = createAppKit({ + adapters: [ethersAdapter], + networks: [arbitrum, mainnet, optimism, polygon, zkSync, sepolia], + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', - siweConfig, - customWallets: ConstantsUtil.CustomWallets + features: { + analytics: true, + socials: [] + }, + siweConfig }) ThemeStore.setModal(modal) diff --git a/apps/laboratory/src/pages/library/ethers5-siwe.tsx b/apps/laboratory/src/pages/library/ethers5-siwe.tsx index e084adcc30..7bff4ce37d 100644 --- a/apps/laboratory/src/pages/library/ethers5-siwe.tsx +++ b/apps/laboratory/src/pages/library/ethers5-siwe.tsx @@ -1,22 +1,24 @@ +import { createAppKit } from '@reown/appkit/react' import { SiweData } from '../../components/Siwe/SiweData' import { AppKitButtons } from '../../components/AppKitButtons' -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5/react' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { siweConfig } from '../../utils/SiweUtils' import { Ethers5Tests } from '../../components/Ethers/Ethers5Tests' import { Ethers5ModalInfo } from '../../components/Ethers/Ethers5ModalInfo' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' +import { Ethers5Adapter } from '@reown/appkit-adapter-ethers5' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1 - }), - chains: EthersConstants.chains, +const ethers5Adapter = new Ethers5Adapter() + +const modal = createAppKit({ + adapters: [ethers5Adapter], + networks: [arbitrum, mainnet, optimism, polygon, zkSync, sepolia], + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, + features: { + analytics: true + }, siweConfig, customWallets: ConstantsUtil.CustomWallets }) diff --git a/apps/laboratory/src/pages/library/ethers5.tsx b/apps/laboratory/src/pages/library/ethers5.tsx index 4ff220437f..fbc18221ff 100644 --- a/apps/laboratory/src/pages/library/ethers5.tsx +++ b/apps/laboratory/src/pages/library/ethers5.tsx @@ -1,25 +1,25 @@ -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5/react' +import { createAppKit } from '@reown/appkit/react' import { AppKitButtons } from '../../components/AppKitButtons' import { ThemeStore } from '../../utils/StoreUtil' -import { EthersConstants } from '../../utils/EthersConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { Ethers5ModalInfo } from '../../components/Ethers/Ethers5ModalInfo' import { Ethers5Tests } from '../../components/Ethers/Ethers5Tests' +import { Ethers5Adapter } from '@reown/appkit-adapter-ethers5' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' -const modal = createWeb3Modal({ - ethersConfig: defaultConfig({ - metadata: ConstantsUtil.Metadata, - defaultChainId: 1, - chains: EthersConstants.chains, - coinbasePreference: 'smartWalletOnly' - }), - defaultChain: EthersConstants.chains[0], - chains: EthersConstants.chains, +const ethers5Adapter = new Ethers5Adapter() + +const modal = createAppKit({ + adapters: [ethers5Adapter], + networks: [mainnet, optimism, polygon, zkSync, arbitrum, sepolia], projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true, + email: true, + socials: ['google', 'github', 'apple', 'discord'] + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', customWallets: ConstantsUtil.CustomWallets }) diff --git a/apps/laboratory/src/pages/library/external.tsx b/apps/laboratory/src/pages/library/external.tsx index f19ec5748a..95cc985b5e 100644 --- a/apps/laboratory/src/pages/library/external.tsx +++ b/apps/laboratory/src/pages/library/external.tsx @@ -1,53 +1,48 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { useEffect, useState } from 'react' -import { WagmiProvider, createConfig, http } from 'wagmi' +import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' import { ThemeStore } from '../../utils/StoreUtil' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' -import { mainnet } from 'wagmi/chains' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' import { externalTestConnector } from '../../utils/ConnectorUtil' const queryClient = new QueryClient() const connectors = [externalTestConnector()] +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] -const wagmiConfig = createConfig({ - chains: [mainnet], - connectors, - transports: { - 1: http() - }, - multiInjectedProviderDiscovery: false +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId, + connectors }) -const modal = createWeb3Modal({ - wagmiConfig, +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy' + features: { + analytics: true + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy' }) ThemeStore.setModal(modal) export default function Wagmi() { - const [ready, setReady] = useState(false) - - useEffect(() => { - setReady(true) - }, []) - - return ready ? ( - + return ( + - ) : null + ) } diff --git a/apps/laboratory/src/pages/library/multichain-basic.tsx b/apps/laboratory/src/pages/library/multichain-basic.tsx new file mode 100644 index 0000000000..1c1af6796c --- /dev/null +++ b/apps/laboratory/src/pages/library/multichain-basic.tsx @@ -0,0 +1,26 @@ +import { createAppKit } from '@reown/appkit/react' +import { ThemeStore } from '../../utils/StoreUtil' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { AppKitButtons } from '../../components/AppKitButtons' +import { mainnet, optimism, arbitrum, solana } from '@reown/appkit/networks' +import { MultiChainInfo } from '../../components/MultiChainInfo' + +import { UpaTests } from '../../components/UPA/UpaTests' + +const modal = createAppKit({ + networks: [mainnet, optimism, arbitrum, solana], + projectId: ConstantsUtil.ProjectId, + metadata: ConstantsUtil.Metadata +}) + +ThemeStore.setModal(modal) + +export default function MultiChainWagmiAdapterOnly() { + return ( + <> + + + + + ) +} diff --git a/apps/laboratory/src/pages/library/multichain-ethers-solana-siwe.tsx b/apps/laboratory/src/pages/library/multichain-ethers-solana-siwe.tsx new file mode 100644 index 0000000000..6c34241749 --- /dev/null +++ b/apps/laboratory/src/pages/library/multichain-ethers-solana-siwe.tsx @@ -0,0 +1,50 @@ +import { createAppKit } from '@reown/appkit/react' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' +import { SolanaAdapter } from '@reown/appkit-adapter-solana' +import { ThemeStore } from '../../utils/StoreUtil' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { + mainnet, + polygon, + solana, + arbitrum, + optimism, + solanaTestnet, + solanaDevnet +} from '@reown/appkit/networks' +import { AppKitButtons } from '../../components/AppKitButtons' +import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { MultiChainTestsEthersSolana } from '../../components/MultiChainTestsEthersSolana' +import { siweConfig } from '../../utils/SiweUtils' +import { SiweData } from '../../components/Siwe/SiweData' + +const etherAdapter = new EthersAdapter() + +const solanaWeb3JsAdapter = new SolanaAdapter({ + wallets: [new HuobiWalletAdapter(), new SolflareWalletAdapter()] +}) + +const modal = createAppKit({ + adapters: [etherAdapter, solanaWeb3JsAdapter], + projectId: ConstantsUtil.ProjectId, + networks: [mainnet, arbitrum, polygon, optimism, solana, solanaTestnet, solanaDevnet], + defaultNetwork: mainnet, + features: { + analytics: true + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', + siweConfig +}) + +ThemeStore.setModal(modal) + +export default function MultiChainEthersSolana() { + return ( + <> + + + + + ) +} diff --git a/apps/laboratory/src/pages/library/multichain-ethers-solana.tsx b/apps/laboratory/src/pages/library/multichain-ethers-solana.tsx new file mode 100644 index 0000000000..c5c7fb297d --- /dev/null +++ b/apps/laboratory/src/pages/library/multichain-ethers-solana.tsx @@ -0,0 +1,46 @@ +import { createAppKit } from '@reown/appkit/react' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' +import { SolanaAdapter } from '@reown/appkit-adapter-solana' +import { ThemeStore } from '../../utils/StoreUtil' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { + mainnet, + polygon, + solana, + arbitrum, + optimism, + solanaTestnet, + solanaDevnet +} from '@reown/appkit/networks' +import { AppKitButtons } from '../../components/AppKitButtons' +import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { MultiChainTestsEthersSolana } from '../../components/MultiChainTestsEthersSolana' + +const etherAdapter = new EthersAdapter() + +const solanaWeb3JsAdapter = new SolanaAdapter({ + wallets: [new HuobiWalletAdapter(), new SolflareWalletAdapter()] +}) + +const modal = createAppKit({ + adapters: [etherAdapter, solanaWeb3JsAdapter], + projectId: ConstantsUtil.ProjectId, + networks: [mainnet, arbitrum, polygon, optimism, solana, solanaTestnet, solanaDevnet], + defaultNetwork: mainnet, + features: { + analytics: true + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy' +}) + +ThemeStore.setModal(modal) + +export default function MultiChainEthersSolana() { + return ( + <> + + + + ) +} diff --git a/apps/laboratory/src/pages/library/multichain-ethers5-solana-siwe.tsx b/apps/laboratory/src/pages/library/multichain-ethers5-solana-siwe.tsx new file mode 100644 index 0000000000..65c8132585 --- /dev/null +++ b/apps/laboratory/src/pages/library/multichain-ethers5-solana-siwe.tsx @@ -0,0 +1,49 @@ +import { createAppKit } from '@reown/appkit/react' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' +import { SolanaAdapter } from '@reown/appkit-adapter-solana' +import { ThemeStore } from '../../utils/StoreUtil' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { + mainnet, + polygon, + solana, + arbitrum, + optimism, + solanaTestnet, + solanaDevnet +} from '@reown/appkit/networks' +import { AppKitButtons } from '../../components/AppKitButtons' +import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { MultiChainTestsEthersSolana } from '../../components/MultiChainTestsEthersSolana' +import { siweConfig } from '../../utils/SiweUtils' +import { SiweData } from '../../components/Siwe/SiweData' + +const etherAdapter = new EthersAdapter() + +const solanaWeb3JsAdapter = new SolanaAdapter({ + wallets: [new HuobiWalletAdapter(), new SolflareWalletAdapter()] +}) + +const modal = createAppKit({ + adapters: [etherAdapter, solanaWeb3JsAdapter], + projectId: ConstantsUtil.ProjectId, + networks: [mainnet, arbitrum, polygon, optimism, solana, solanaTestnet, solanaDevnet], + features: { + analytics: true + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', + siweConfig +}) + +ThemeStore.setModal(modal) + +export default function MultiChainEthers5Solana() { + return ( + <> + + + + + ) +} diff --git a/apps/laboratory/src/pages/library/multichain-ethers5-solana.tsx b/apps/laboratory/src/pages/library/multichain-ethers5-solana.tsx new file mode 100644 index 0000000000..7e3398f6bf --- /dev/null +++ b/apps/laboratory/src/pages/library/multichain-ethers5-solana.tsx @@ -0,0 +1,45 @@ +import { createAppKit } from '@reown/appkit/react' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' +import { SolanaAdapter } from '@reown/appkit-adapter-solana' +import { ThemeStore } from '../../utils/StoreUtil' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { + mainnet, + polygon, + solana, + arbitrum, + optimism, + solanaTestnet, + solanaDevnet +} from '@reown/appkit/networks' +import { AppKitButtons } from '../../components/AppKitButtons' +import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { MultiChainTestsEthersSolana } from '../../components/MultiChainTestsEthersSolana' + +const etherAdapter = new EthersAdapter() + +const solanaWeb3JsAdapter = new SolanaAdapter({ + wallets: [new HuobiWalletAdapter(), new SolflareWalletAdapter()] +}) + +const modal = createAppKit({ + adapters: [etherAdapter, solanaWeb3JsAdapter], + projectId: ConstantsUtil.ProjectId, + networks: [mainnet, arbitrum, polygon, optimism, solana, solanaTestnet, solanaDevnet], + features: { + analytics: true + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy' +}) + +ThemeStore.setModal(modal) + +export default function MultiChainEthers5Solana() { + return ( + <> + + + + ) +} diff --git a/apps/laboratory/src/pages/library/multichain-wagmi-solana-siwe.tsx b/apps/laboratory/src/pages/library/multichain-wagmi-solana-siwe.tsx new file mode 100644 index 0000000000..5bbb25bf6c --- /dev/null +++ b/apps/laboratory/src/pages/library/multichain-wagmi-solana-siwe.tsx @@ -0,0 +1,75 @@ +import React from 'react' +import { createAppKit } from '@reown/appkit/react' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { SolanaAdapter } from '@reown/appkit-adapter-solana/react' +import { ThemeStore } from '../../utils/StoreUtil' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { WagmiProvider } from 'wagmi' +import { + arbitrum, + mainnet, + polygon, + base, + binanceSmartChain, + solana, + solanaTestnet, + solanaDevnet, + optimism, + zkSync, + sepolia +} from '@reown/appkit/networks' +import { AppKitButtons } from '../../components/AppKitButtons' +import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { MultiChainTestsWagmiSolana } from '../../components/MultiChainTestsWagmiSolana' +import { siweConfig } from '../../utils/SiweUtils' +import { SiweData } from '../../components/Siwe/SiweData' + +const queryClient = new QueryClient() + +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] + +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) + +const solanaWeb3JsAdapter = new SolanaAdapter({ + wallets: [new HuobiWalletAdapter(), new SolflareWalletAdapter()] +}) + +const modal = createAppKit({ + adapters: [wagmiAdapter, solanaWeb3JsAdapter], + networks: [ + mainnet, + polygon, + base, + binanceSmartChain, + arbitrum, + solana, + solanaTestnet, + solanaDevnet + ], + defaultNetwork: mainnet, + projectId: ConstantsUtil.ProjectId, + features: { + analytics: true + }, + metadata: ConstantsUtil.Metadata, + siweConfig +}) + +ThemeStore.setModal(modal) + +export default function MultiChainWagmiSolana() { + return ( + + + + + + + + ) +} diff --git a/apps/laboratory/src/pages/library/multichain-wagmi-solana.tsx b/apps/laboratory/src/pages/library/multichain-wagmi-solana.tsx new file mode 100644 index 0000000000..26add712ef --- /dev/null +++ b/apps/laboratory/src/pages/library/multichain-wagmi-solana.tsx @@ -0,0 +1,71 @@ +import React from 'react' +import { createAppKit } from '@reown/appkit/react' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { SolanaAdapter } from '@reown/appkit-adapter-solana/react' +import { ThemeStore } from '../../utils/StoreUtil' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { WagmiProvider } from 'wagmi' +import { + arbitrum, + mainnet, + polygon, + base, + binanceSmartChain, + solana, + solanaTestnet, + solanaDevnet, + optimism, + zkSync, + sepolia +} from '@reown/appkit/networks' +import { AppKitButtons } from '../../components/AppKitButtons' +import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { MultiChainTestsWagmiSolana } from '../../components/MultiChainTestsWagmiSolana' + +const queryClient = new QueryClient() + +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] + +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) + +const solanaWeb3JsAdapter = new SolanaAdapter({ + wallets: [new HuobiWalletAdapter(), new SolflareWalletAdapter()] +}) + +const modal = createAppKit({ + adapters: [wagmiAdapter, solanaWeb3JsAdapter], + networks: [ + mainnet, + polygon, + base, + binanceSmartChain, + arbitrum, + solana, + solanaTestnet, + solanaDevnet + ], + defaultNetwork: mainnet, + projectId: ConstantsUtil.ProjectId, + features: { + analytics: true + }, + metadata: ConstantsUtil.Metadata +}) + +ThemeStore.setModal(modal) + +export default function MultiChainWagmiSolana() { + return ( + + + + + + + ) +} diff --git a/apps/laboratory/src/pages/library/solana-no-email.tsx b/apps/laboratory/src/pages/library/solana-no-email.tsx index 948898de61..cd7c6d9637 100644 --- a/apps/laboratory/src/pages/library/solana-no-email.tsx +++ b/apps/laboratory/src/pages/library/solana-no-email.tsx @@ -1,38 +1,30 @@ -import { createWeb3Modal, defaultSolanaConfig } from '@web3modal/solana/react' +import { createAppKit } from '@reown/appkit/react' import { ThemeStore } from '../../utils/StoreUtil' -import { solana, solanaDevnet, solanaTestnet } from '../../utils/ChainsUtil' import { AppKitButtons } from '../../components/AppKitButtons' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { SolanaTests } from '../../components/Solana/SolanaTests' -import { SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { solana, solanaDevnet, solanaTestnet } from '@reown/appkit/networks' +import { SolanaAdapter } from '@reown/appkit-adapter-solana/react' -const chains = [solana, solanaTestnet, solanaDevnet] +const solanaWeb3JsAdapter = new SolanaAdapter({ + wallets: [new HuobiWalletAdapter(), new SolflareWalletAdapter()] +}) -export const solanaConfig = defaultSolanaConfig({ - chains, +const modal = createAppKit({ + adapters: [solanaWeb3JsAdapter], projectId: ConstantsUtil.ProjectId, - metadata: ConstantsUtil.Metadata, - auth: { + networks: [solana, solanaTestnet, solanaDevnet], + defaultNetwork: solana, + features: { + analytics: false, + swaps: false, email: false, socials: [] } }) -const modal = createWeb3Modal({ - solanaConfig, - projectId: ConstantsUtil.ProjectId, - metadata: ConstantsUtil.Metadata, - defaultChain: solana, - chains, - enableAnalytics: false, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', - customWallets: ConstantsUtil.CustomWallets, - enableSwaps: false, - wallets: [new SolflareWalletAdapter()] -}) - ThemeStore.setModal(modal) export default function Solana() { diff --git a/apps/laboratory/src/pages/library/solana-no-socials.tsx b/apps/laboratory/src/pages/library/solana-no-socials.tsx index 49de15a2d2..2742031ce7 100644 --- a/apps/laboratory/src/pages/library/solana-no-socials.tsx +++ b/apps/laboratory/src/pages/library/solana-no-socials.tsx @@ -1,36 +1,27 @@ -import { createWeb3Modal, defaultSolanaConfig } from '@web3modal/solana/react' +import { createAppKit } from '@reown/appkit/react' +import { SolanaAdapter } from '@reown/appkit-adapter-solana/react' import { ThemeStore } from '../../utils/StoreUtil' -import { solana, solanaDevnet, solanaTestnet } from '../../utils/ChainsUtil' +import { solana, solanaDevnet, solanaTestnet } from '@reown/appkit/networks' import { AppKitButtons } from '../../components/AppKitButtons' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { SolanaTests } from '../../components/Solana/SolanaTests' -import { SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' -const chains = [solana, solanaTestnet, solanaDevnet] +const networks = [solana, solanaTestnet, solanaDevnet] -export const solanaConfig = defaultSolanaConfig({ - chains, - projectId: ConstantsUtil.ProjectId, - metadata: ConstantsUtil.Metadata, - auth: { - email: true, - socials: [] - } +const solanaWeb3JsAdapter = new SolanaAdapter({ + wallets: [new HuobiWalletAdapter(), new SolflareWalletAdapter()] }) -const modal = createWeb3Modal({ - solanaConfig, +const modal = createAppKit({ + adapters: [solanaWeb3JsAdapter], + networks, projectId: ConstantsUtil.ProjectId, metadata: ConstantsUtil.Metadata, - defaultChain: solana, - chains, - enableAnalytics: false, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', - customWallets: ConstantsUtil.CustomWallets, - enableSwaps: false, - wallets: [new SolflareWalletAdapter()] + features: { + socials: [] + } }) ThemeStore.setModal(modal) diff --git a/apps/laboratory/src/pages/library/solana.tsx b/apps/laboratory/src/pages/library/solana.tsx index 137fc71bff..45358f7802 100644 --- a/apps/laboratory/src/pages/library/solana.tsx +++ b/apps/laboratory/src/pages/library/solana.tsx @@ -1,36 +1,42 @@ -import { createWeb3Modal, defaultSolanaConfig } from '@web3modal/solana/react' - +import { createAppKit, type CaipNetwork } from '@reown/appkit/react' +import { SolanaAdapter } from '@reown/appkit-adapter-solana/react' import { ThemeStore } from '../../utils/StoreUtil' -import { solana, solanaDevnet, solanaTestnet } from '../../utils/ChainsUtil' -import { AppKitButtons } from '../../components/AppKitButtons' import { ConstantsUtil } from '../../utils/ConstantsUtil' -import { SolanaTests } from '../../components/Solana/SolanaTests' -import { SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { solana, solanaDevnet, solanaTestnet } from '@reown/appkit/networks' -const chains = [solana, solanaTestnet, solanaDevnet] +import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets' +import { AppKitButtons } from '../../components/AppKitButtons' +import { SolanaTests } from '../../components/Solana/SolanaTests' -export const solanaConfig = defaultSolanaConfig({ - chains, - projectId: ConstantsUtil.ProjectId, - metadata: ConstantsUtil.Metadata +const solanaWeb3JsAdapter = new SolanaAdapter({ + wallets: [new HuobiWalletAdapter(), new SolflareWalletAdapter()] }) -const modal = createWeb3Modal({ - solanaConfig, +export const solanaNotExist = { + id: 'solana:chaindoesntexist', + chainId: 'chaindoesntexist', + name: 'Solana Unsupported', + currency: 'SOL', + explorerUrl: 'https://explorer.solana.com/?cluster=devnet', + rpcUrl: '', + chainNamespace: 'solana' +} as CaipNetwork + +const modal = createAppKit({ + adapters: [solanaWeb3JsAdapter], + networks: [solana, solanaTestnet, solanaDevnet, solanaNotExist], projectId: ConstantsUtil.ProjectId, - metadata: ConstantsUtil.Metadata, - chains, - enableAnalytics: false, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', - customWallets: ConstantsUtil.CustomWallets, - enableSwaps: false, - wallets: [new SolflareWalletAdapter()] + features: { + analytics: true, + email: true, + socials: ['google', 'github', 'apple', 'discord'] + }, + metadata: ConstantsUtil.Metadata }) ThemeStore.setModal(modal) -export default function Solana() { +export default function MultiChainSolanaAdapterOnly() { return ( <> diff --git a/apps/laboratory/src/pages/library/verify-domain-mismatch.tsx b/apps/laboratory/src/pages/library/verify-domain-mismatch.tsx index 2c2c097b38..c46d3482e8 100644 --- a/apps/laboratory/src/pages/library/verify-domain-mismatch.tsx +++ b/apps/laboratory/src/pages/library/verify-domain-mismatch.tsx @@ -1,47 +1,45 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { useEffect, useState } from 'react' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' import { ThemeStore } from '../../utils/StoreUtil' -import { ConstantsUtil } from '../../utils/ConstantsUtil' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' -import { getWagmiConfig } from '../../utils/WagmiConstants' + +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' // Special project ID with verify enabled on localhost const projectId = 'e4eae1aad4503db9966a04fd045a7e4d' const queryClient = new QueryClient() -const wagmiConfig = getWagmiConfig('default', { +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] + +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, projectId }) -const modal = createWeb3Modal({ - wagmiConfig, +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, projectId, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy' + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy' }) ThemeStore.setModal(modal) export default function Wagmi() { - const [ready, setReady] = useState(false) - - useEffect(() => { - setReady(true) - }, []) - - return ready ? ( - + return ( + - ) : null + ) } diff --git a/apps/laboratory/src/pages/library/verify-evil.tsx b/apps/laboratory/src/pages/library/verify-evil.tsx index f9d7905a2c..f552ccd185 100644 --- a/apps/laboratory/src/pages/library/verify-evil.tsx +++ b/apps/laboratory/src/pages/library/verify-evil.tsx @@ -1,16 +1,16 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { useEffect, useState } from 'react' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' import { ThemeStore } from '../../utils/StoreUtil' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' -import { getWagmiConfig } from '../../utils/WagmiConstants' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' const metadata = { - name: 'Evil Web3Modal', - description: 'Evil Web3Modal Laboratory', + name: 'Evil AppKit', + description: 'Evil AppKit Laboratory', url: 'https://malicious-app-verify-simulation.vercel.app/', icons: ['https://avatars.githubusercontent.com/u/37784886'], verifyUrl: '' @@ -21,35 +21,33 @@ const projectId = '9d176efa3150a1df0a76c8c138b6b657' const queryClient = new QueryClient() -const wagmiConfig = getWagmiConfig('default', { - projectId, - metadata +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] + +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId }) -const modal = createWeb3Modal({ - wagmiConfig, +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, projectId, metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy' + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy' }) ThemeStore.setModal(modal) export default function Wagmi() { - const [ready, setReady] = useState(false) - - useEffect(() => { - setReady(true) - }, []) - - return ready ? ( - + return ( + - ) : null + ) } diff --git a/apps/laboratory/src/pages/library/verify-valid.tsx b/apps/laboratory/src/pages/library/verify-valid.tsx index 7253dfcd41..ec0456b0c2 100644 --- a/apps/laboratory/src/pages/library/verify-valid.tsx +++ b/apps/laboratory/src/pages/library/verify-valid.tsx @@ -1,16 +1,16 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { useEffect, useState } from 'react' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' import { ThemeStore } from '../../utils/StoreUtil' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' -import { getWagmiConfig } from '../../utils/WagmiConstants' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' const metadata = { - name: 'Web3Modal', - description: 'Web3Modal Laboratory', + name: 'AppKit', + description: 'AppKit Laboratory', // Allow localhost url: 'http://localhost:3000', icons: ['https://avatars.githubusercontent.com/u/37784886'], @@ -22,35 +22,33 @@ const projectId = 'e4eae1aad4503db9966a04fd045a7e4d' const queryClient = new QueryClient() -const wagmiConfig = getWagmiConfig('default', { - projectId, - metadata +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] + +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId }) -const modal = createWeb3Modal({ - wagmiConfig, +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, projectId, metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy' + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy' }) ThemeStore.setModal(modal) export default function Wagmi() { - const [ready, setReady] = useState(false) - - useEffect(() => { - setReady(true) - }, []) - - return ready ? ( - + return ( + - ) : null + ) } diff --git a/apps/laboratory/src/pages/library/wagmi-all-internal.tsx b/apps/laboratory/src/pages/library/wagmi-all-internal.tsx index 06f551b313..cbd54ea584 100644 --- a/apps/laboratory/src/pages/library/wagmi-all-internal.tsx +++ b/apps/laboratory/src/pages/library/wagmi-all-internal.tsx @@ -1,27 +1,37 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { useEffect, useState } from 'react' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' import { ThemeStore } from '../../utils/StoreUtil' -import { getWagmiConfig } from '../../utils/WagmiConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { SiweData } from '../../components/Siwe/SiweData' import { siweConfig } from '../../utils/SiweUtils' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' const queryClient = new QueryClient() -const wagmiConfig = getWagmiConfig('email') +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] -const modal = createWeb3Modal({ - wagmiConfig, +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) + +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true + }, + + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', siweConfig, customWallets: ConstantsUtil.CustomWallets }) @@ -29,14 +39,8 @@ const modal = createWeb3Modal({ ThemeStore.setModal(modal) export default function Wagmi() { - const [ready, setReady] = useState(false) - - useEffect(() => { - setReady(true) - }, []) - - return ready ? ( - + return ( + @@ -44,5 +48,5 @@ export default function Wagmi() { - ) : null + ) } diff --git a/apps/laboratory/src/pages/library/wagmi-all.tsx b/apps/laboratory/src/pages/library/wagmi-all.tsx index 7e2c5a4ab8..cd2a651359 100644 --- a/apps/laboratory/src/pages/library/wagmi-all.tsx +++ b/apps/laboratory/src/pages/library/wagmi-all.tsx @@ -1,41 +1,42 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { useEffect, useState } from 'react' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' import { ThemeStore } from '../../utils/StoreUtil' -import { getWagmiConfig } from '../../utils/WagmiConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { SiweData } from '../../components/Siwe/SiweData' import { siweConfig } from '../../utils/SiweUtils' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' const queryClient = new QueryClient() -const wagmiConfig = getWagmiConfig('email') +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] -const modal = createWeb3Modal({ - wagmiConfig, +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) + +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true + }, siweConfig }) ThemeStore.setModal(modal) export default function Wagmi() { - const [ready, setReady] = useState(false) - - useEffect(() => { - setReady(true) - }, []) - - return ready ? ( - + return ( + @@ -43,5 +44,5 @@ export default function Wagmi() { - ) : null + ) } diff --git a/apps/laboratory/src/pages/library/wagmi-no-email.tsx b/apps/laboratory/src/pages/library/wagmi-no-email.tsx index 0f4a87169e..f1c8321b41 100644 --- a/apps/laboratory/src/pages/library/wagmi-no-email.tsx +++ b/apps/laboratory/src/pages/library/wagmi-no-email.tsx @@ -1,24 +1,36 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' import { ThemeStore } from '../../utils/StoreUtil' -import { getWagmiConfig } from '../../utils/WagmiConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' const queryClient = new QueryClient() -const wagmiConfig = getWagmiConfig('default', { auth: { email: false, socials: [] } }) +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] -const modal = createWeb3Modal({ - wagmiConfig, +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) + +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', + features: { + analytics: true, + email: false, + socials: [] + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy', customWallets: ConstantsUtil.CustomWallets }) @@ -26,7 +38,7 @@ ThemeStore.setModal(modal) export default function Wagmi() { return ( - + diff --git a/apps/laboratory/src/pages/library/wagmi-no-socials.tsx b/apps/laboratory/src/pages/library/wagmi-no-socials.tsx index e5dc8e07f4..17b1ed8744 100644 --- a/apps/laboratory/src/pages/library/wagmi-no-socials.tsx +++ b/apps/laboratory/src/pages/library/wagmi-no-socials.tsx @@ -1,32 +1,40 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' import { ThemeStore } from '../../utils/StoreUtil' -import { getWagmiConfig } from '../../utils/WagmiConstants' import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' const queryClient = new QueryClient() -const wagmiConfig = getWagmiConfig('default', { auth: { email: true, socials: [] } }) +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] -const modal = createWeb3Modal({ - wagmiConfig, +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) + +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', - customWallets: ConstantsUtil.CustomWallets + features: { + analytics: true, + socials: [] + } }) ThemeStore.setModal(modal) export default function Wagmi() { return ( - + diff --git a/apps/laboratory/src/pages/library/wagmi-permissions-async.tsx b/apps/laboratory/src/pages/library/wagmi-permissions-async.tsx index 55396e7b11..c27907d628 100644 --- a/apps/laboratory/src/pages/library/wagmi-permissions-async.tsx +++ b/apps/laboratory/src/pages/library/wagmi-permissions-async.tsx @@ -1,41 +1,42 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { ThemeStore } from '../../utils/StoreUtil' import { ConstantsUtil } from '../../utils/ConstantsUtil' -import { getWagmiConfig } from '../../utils/WagmiConstants' -import { ERC7715PermissionsProvider } from '../../context/ERC7715PermissionsContext' -import { walletConnect } from '@wagmi/connectors' -import { OPTIONAL_METHODS } from '@walletconnect/ethereum-provider' import { WagmiPermissionsAsyncTest } from '../../components/Wagmi/WagmiPermissionsAsyncTest' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { ERC7715PermissionsProvider } from '../../context/ERC7715PermissionsContext' import { LocalEcdsaKeyProvider } from '../../context/LocalEcdsaKeyContext' const queryClient = new QueryClient() -const connectors = [ - walletConnect({ - projectId: ConstantsUtil.ProjectId, - metadata: ConstantsUtil.Metadata, - showQrModal: false, - // @ts-expect-error: Overridding optionalMethods - optionalMethods: [...OPTIONAL_METHODS, 'wallet_grantPermissions'] - }) -] -const wagmiEmailConfig = getWagmiConfig('email', { connectors }) -const modal = createWeb3Modal({ - wagmiConfig: wagmiEmailConfig, + +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] + +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) + +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy' + features: { + analytics: true + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy' }) ThemeStore.setModal(modal) export default function Wagmi() { return ( - + diff --git a/apps/laboratory/src/pages/library/wagmi-permissions-sync.tsx b/apps/laboratory/src/pages/library/wagmi-permissions-sync.tsx index 6a715725b9..58604ed6b2 100644 --- a/apps/laboratory/src/pages/library/wagmi-permissions-sync.tsx +++ b/apps/laboratory/src/pages/library/wagmi-permissions-sync.tsx @@ -1,41 +1,42 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { ThemeStore } from '../../utils/StoreUtil' import { ConstantsUtil } from '../../utils/ConstantsUtil' -import { getWagmiConfig } from '../../utils/WagmiConstants' -import { PasskeyProvider } from '../../context/PasskeyContext' -import { walletConnect } from '@wagmi/connectors' -import { OPTIONAL_METHODS } from '@walletconnect/ethereum-provider' import { WagmiPermissionsSyncTest } from '../../components/Wagmi/WagmiPermissionsSyncTest' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { PasskeyProvider } from '../../context/PasskeyContext' import { ERC7715PermissionsProvider } from '../../context/ERC7715PermissionsContext' const queryClient = new QueryClient() -const connectors = [ - walletConnect({ - projectId: ConstantsUtil.ProjectId, - metadata: ConstantsUtil.Metadata, - showQrModal: false, - // @ts-expect-error: Overridding optionalMethods - optionalMethods: [...OPTIONAL_METHODS, 'wallet_grantPermissions'] - }) -] -const wagmiEmailConfig = getWagmiConfig('email', { connectors }) -const modal = createWeb3Modal({ - wagmiConfig: wagmiEmailConfig, + +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] + +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) + +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy' + features: { + analytics: true + }, + termsConditionsUrl: 'https://reown.com/terms-of-service', + privacyPolicyUrl: 'https://reown.com/privacy-policy' }) ThemeStore.setModal(modal) export default function Wagmi() { return ( - + diff --git a/apps/laboratory/src/pages/library/wagmi-siwe.tsx b/apps/laboratory/src/pages/library/wagmi-siwe.tsx index 3266f76117..168bf9ff5b 100644 --- a/apps/laboratory/src/pages/library/wagmi-siwe.tsx +++ b/apps/laboratory/src/pages/library/wagmi-siwe.tsx @@ -1,24 +1,34 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' import { ThemeStore } from '../../utils/StoreUtil' -import { getWagmiConfig } from '../../utils/WagmiConstants' import { SiweData } from '../../components/Siwe/SiweData' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { siweConfig } from '../../utils/SiweUtils' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' const queryClient = new QueryClient() -const wagmiConfig = getWagmiConfig('default') +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] -const modal = createWeb3Modal({ - wagmiConfig, +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) + +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, + defaultNetwork: mainnet, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, + features: { + analytics: true + }, siweConfig, customWallets: ConstantsUtil.CustomWallets }) @@ -27,7 +37,7 @@ ThemeStore.setModal(modal) export default function Wagmi() { return ( - + diff --git a/apps/laboratory/src/pages/library/wagmi.tsx b/apps/laboratory/src/pages/library/wagmi.tsx index dac4b46996..5ee3411b72 100644 --- a/apps/laboratory/src/pages/library/wagmi.tsx +++ b/apps/laboratory/src/pages/library/wagmi.tsx @@ -1,34 +1,40 @@ -import { createWeb3Modal } from '@web3modal/wagmi/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { WagmiProvider } from 'wagmi' import { AppKitButtons } from '../../components/AppKitButtons' import { WagmiTests } from '../../components/Wagmi/WagmiTests' -import { ThemeStore } from '../../utils/StoreUtil' -import { getWagmiConfig } from '../../utils/WagmiConstants' -import { ConstantsUtil } from '../../utils/ConstantsUtil' import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' -import { mainnet } from 'viem/chains' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { createAppKit } from '@reown/appkit/react' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' +import { ConstantsUtil } from '../../utils/ConstantsUtil' +import { ThemeStore } from '../../utils/StoreUtil' const queryClient = new QueryClient() -const wagmiConfig = getWagmiConfig('default') +const networks = [mainnet, optimism, polygon, zkSync, arbitrum, sepolia] + +const wagmiAdapter = new WagmiAdapter({ + ssr: true, + networks, + projectId: ConstantsUtil.ProjectId +}) -const modal = createWeb3Modal({ - wagmiConfig, - defaultChain: mainnet, +const modal = createAppKit({ + adapters: [wagmiAdapter], + networks, projectId: ConstantsUtil.ProjectId, - enableAnalytics: true, - metadata: ConstantsUtil.Metadata, - termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy', - customWallets: ConstantsUtil.CustomWallets + features: { + analytics: true, + email: true, + socials: ['google', 'github', 'apple', 'discord'] + } }) ThemeStore.setModal(modal) export default function Wagmi() { return ( - + diff --git a/apps/laboratory/src/utils/AppKitWagmiConstants.ts b/apps/laboratory/src/utils/AppKitWagmiConstants.ts index 42a0c9304e..9a526afa6e 100644 --- a/apps/laboratory/src/utils/AppKitWagmiConstants.ts +++ b/apps/laboratory/src/utils/AppKitWagmiConstants.ts @@ -1,4 +1,3 @@ -import { defaultWagmiConfig } from '@web3modal/wagmi/react' import { arbitrum, aurora, @@ -17,7 +16,6 @@ import { baseSepolia, type Chain } from 'wagmi/chains' -import { ConstantsUtil } from './ConstantsUtil' export const WagmiConstantsUtil = { chains: [ @@ -38,23 +36,3 @@ export const WagmiConstantsUtil = { baseSepolia ] as [Chain, ...Chain[]] } - -export function getWagmiConfig(type: 'default' | 'email') { - const config = { - chains: WagmiConstantsUtil.chains, - projectId: ConstantsUtil.ProjectId, - metadata: ConstantsUtil.Metadata, - ssr: true - } - - const emailConfig = { - ...config, - auth: { - socials: ['google', 'x', 'discord', 'apple', 'github', 'facebook'] - } - } - - const wagmiConfig = defaultWagmiConfig(type === 'email' ? emailConfig : config) - - return wagmiConfig -} diff --git a/apps/laboratory/src/utils/ChainsUtil.ts b/apps/laboratory/src/utils/ChainsUtil.ts deleted file mode 100644 index 99866210c9..0000000000 --- a/apps/laboratory/src/utils/ChainsUtil.ts +++ /dev/null @@ -1,151 +0,0 @@ -import * as viemChains from 'viem/chains' - -if (!process.env['NEXT_PUBLIC_PROJECT_ID']) { - throw new Error('NEXT_PUBLIC_PROJECT_ID is required') -} - -function getBlockchainApiRpcUrl(chainId: number) { - return `https://rpc.walletconnect.org/v1/?chainId=eip155:${chainId}&projectId=${process.env['NEXT_PUBLIC_PROJECT_ID']}` -} - -export const mainnet = { - chainId: 1, - name: 'Ethereum', - currency: 'ETH', - explorerUrl: 'https://etherscan.io', - rpcUrl: getBlockchainApiRpcUrl(1) -} - -export const arbitrum = { - chainId: 42161, - name: 'Arbitrum', - currency: 'ETH', - explorerUrl: 'https://arbiscan.io', - rpcUrl: getBlockchainApiRpcUrl(42161) -} - -export const avalanche = { - chainId: 43114, - name: 'Avalanche', - currency: 'AVAX', - explorerUrl: 'https://snowtrace.io', - rpcUrl: getBlockchainApiRpcUrl(43114) -} - -export const binanceSmartChain = { - chainId: 56, - name: 'Binance Smart Chain', - currency: 'BNB', - explorerUrl: 'https://bscscan.com', - rpcUrl: getBlockchainApiRpcUrl(56) -} - -export const optimism = { - chainId: 10, - name: 'Optimism', - currency: 'ETH', - explorerUrl: 'https://optimistic.etherscan.io', - rpcUrl: getBlockchainApiRpcUrl(10) -} - -export const polygon = { - chainId: 137, - name: 'Polygon', - currency: 'MATIC', - explorerUrl: 'https://polygonscan.com', - rpcUrl: getBlockchainApiRpcUrl(137) -} - -export const gnosis = { - chainId: 100, - name: 'Gnosis', - currency: 'xDAI', - explorerUrl: 'https://gnosis.blockscout.com', - rpcUrl: getBlockchainApiRpcUrl(100) -} - -export const zkSync = { - chainId: 324, - name: 'ZkSync', - currency: 'ETH', - explorerUrl: 'https://explorer.zksync.io', - rpcUrl: getBlockchainApiRpcUrl(324) -} - -export const zora = { - chainId: 7777777, - name: 'Zora', - currency: 'ETH', - explorerUrl: 'https://explorer.zora.energy', - rpcUrl: getBlockchainApiRpcUrl(7777777) -} - -export const celo = { - chainId: 42220, - name: 'Celo', - currency: 'CELO', - explorerUrl: 'https://explorer.celo.org/mainnet', - rpcUrl: getBlockchainApiRpcUrl(42220) -} - -export const base = { - chainId: 8453, - name: 'Base', - currency: 'BASE', - explorerUrl: 'https://basescan.org', - rpcUrl: getBlockchainApiRpcUrl(8453) -} - -export const aurora = { - chainId: 1313161554, - name: 'Aurora', - currency: 'ETH', - explorerUrl: 'https://explorer.aurora.dev', - rpcUrl: getBlockchainApiRpcUrl(1313161554) -} - -export const sepolia = { - chainId: 11155111, - name: 'Sepolia', - currency: 'ETH', - explorerUrl: 'https://sepolia.etherscan.io', - rpcUrl: getBlockchainApiRpcUrl(11155111) -} - -export const baseSepolia = { - chainId: 84532, - name: 'Base Sepolia', - currency: 'BASE', - explorerUrl: 'https://sepolia.basescan.org', - rpcUrl: getBlockchainApiRpcUrl(84532) -} - -export const solana = { - chainId: '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', - name: 'Solana', - currency: 'SOL', - explorerUrl: 'https://solscan.io', - rpcUrl: 'https://rpc.walletconnect.org/v1' -} - -export const solanaTestnet = { - chainId: '4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z', - name: 'Solana Testnet', - currency: 'SOL', - explorerUrl: 'https://explorer.solana.com/?cluster=testnet', - rpcUrl: 'https://rpc.walletconnect.org/v1' -} - -export const solanaDevnet = { - chainId: 'EtWTRABZaYq6iMfeYKouRu166VU2xqa1', - name: 'Solana Devnet', - currency: 'SOL', - explorerUrl: 'https://explorer.solana.com/?cluster=devnet', - rpcUrl: 'https://rpc.walletconnect.org/v1' -} - -export function getChain(id: number) { - const chains = Object.values(viemChains) as viemChains.Chain[] - - return chains.find(x => x.id === id) -} diff --git a/apps/laboratory/src/utils/ConstantsUtil.ts b/apps/laboratory/src/utils/ConstantsUtil.ts index 99ee2824f4..baba8ee602 100644 --- a/apps/laboratory/src/utils/ConstantsUtil.ts +++ b/apps/laboratory/src/utils/ConstantsUtil.ts @@ -19,7 +19,7 @@ export function getPublicUrl() { return `https://${vercelUrl}` } - return 'https://lab.web3modal.com' + return 'https://appkit-lab.reown.org' } export const CUSTOM_WALLET = 'wc:custom_wallet' diff --git a/apps/laboratory/src/utils/EIP5792Utils.ts b/apps/laboratory/src/utils/EIP5792Utils.ts index 6fd2998ef5..0f3e9aefed 100644 --- a/apps/laboratory/src/utils/EIP5792Utils.ts +++ b/apps/laboratory/src/utils/EIP5792Utils.ts @@ -1,8 +1,8 @@ import { EthereumProvider } from '@walletconnect/ethereum-provider' -import { getChain } from './ChainsUtil' +import { getChain } from './NetworksUtil' import { parseJSON } from './CommonUtils' import { fromHex, type WalletCapabilities } from 'viem' -import { W3mFrameProvider } from '@web3modal/wallet' +import { W3mFrameProvider } from '@reown/appkit-wallet' export const EIP_5792_RPC_METHODS = { WALLET_GET_CAPABILITIES: 'wallet_getCapabilities', @@ -46,8 +46,8 @@ export function getFilteredCapabilitySupportedChainInfo( return chainInfo } -/* eslint-disable @typescript-eslint/no-explicit-any */ export function convertCapabilitiesToRecord( + /* eslint-disable @typescript-eslint/no-explicit-any */ accountCapabilities: Record ): Record { return Object.fromEntries( diff --git a/apps/laboratory/src/utils/EthersConstants.ts b/apps/laboratory/src/utils/EthersConstants.ts index 687127225e..1f35f1181d 100644 --- a/apps/laboratory/src/utils/EthersConstants.ts +++ b/apps/laboratory/src/utils/EthersConstants.ts @@ -13,7 +13,7 @@ import { zora, sepolia, baseSepolia -} from './ChainsUtil' +} from '@reown/appkit/networks' export const EthersConstants = { chains: [ diff --git a/apps/laboratory/src/utils/NetworksUtil.ts b/apps/laboratory/src/utils/NetworksUtil.ts new file mode 100644 index 0000000000..297ee02a11 --- /dev/null +++ b/apps/laboratory/src/utils/NetworksUtil.ts @@ -0,0 +1,11 @@ +import * as viemChains from 'viem/chains' + +if (!process.env['NEXT_PUBLIC_PROJECT_ID']) { + throw new Error('NEXT_PUBLIC_PROJECT_ID is required') +} + +export function getChain(id: number) { + const chains = Object.values(viemChains) as viemChains.Chain[] + + return chains.find(x => x.id === id) +} diff --git a/apps/laboratory/src/utils/SiweUtils.ts b/apps/laboratory/src/utils/SiweUtils.ts index 05576e9127..e655fe9dde 100644 --- a/apps/laboratory/src/utils/SiweUtils.ts +++ b/apps/laboratory/src/utils/SiweUtils.ts @@ -1,7 +1,9 @@ import { getCsrfToken, signIn, signOut, getSession } from 'next-auth/react' -import type { SIWEVerifyMessageArgs, SIWECreateMessageArgs, SIWESession } from '@web3modal/siwe' -import { createSIWEConfig, formatMessage } from '@web3modal/siwe' -import { WagmiConstantsUtil } from './WagmiConstants' +import type { SIWEVerifyMessageArgs, SIWECreateMessageArgs, SIWESession } from '@reown/appkit-siwe' +import { createSIWEConfig, formatMessage } from '@reown/appkit-siwe' +import { arbitrum, base, binanceSmartChain, mainnet, polygon } from '@reown/appkit/networks' + +const chains = [mainnet, polygon, base, binanceSmartChain, arbitrum] export const siweConfig = createSIWEConfig({ signOutOnAccountChange: true, @@ -11,7 +13,7 @@ export const siweConfig = createSIWEConfig({ getMessageParams: async () => ({ domain: window.location.host, uri: window.location.origin, - chains: WagmiConstantsUtil.chains.map(chain => chain.id), + chains: chains.map(chain => chain.chainId as number), statement: 'Please sign with your account', iat: new Date().toISOString() }), diff --git a/apps/laboratory/src/utils/SolanaConstants.ts b/apps/laboratory/src/utils/SolanaConstants.ts index 398d299f9c..4490d49f88 100644 --- a/apps/laboratory/src/utils/SolanaConstants.ts +++ b/apps/laboratory/src/utils/SolanaConstants.ts @@ -1,4 +1,4 @@ -import { solana, solanaDevnet, solanaTestnet } from './ChainsUtil' +import { solana, solanaDevnet, solanaTestnet } from '@reown/appkit/networks' export const COUNTER_ACCOUNT_SIZE = 8 diff --git a/apps/laboratory/src/utils/WagmiConstants.ts b/apps/laboratory/src/utils/WagmiConstants.ts index d661d2a53f..9a526afa6e 100644 --- a/apps/laboratory/src/utils/WagmiConstants.ts +++ b/apps/laboratory/src/utils/WagmiConstants.ts @@ -1,4 +1,3 @@ -import { defaultWagmiConfig } from '@web3modal/wagmi/react' import { arbitrum, aurora, @@ -17,7 +16,6 @@ import { baseSepolia, type Chain } from 'wagmi/chains' -import { ConstantsUtil } from './ConstantsUtil' export const WagmiConstantsUtil = { chains: [ @@ -38,24 +36,3 @@ export const WagmiConstantsUtil = { baseSepolia ] as [Chain, ...Chain[]] } - -export function getWagmiConfig(type: 'default' | 'email', override = {}) { - const config = { - chains: WagmiConstantsUtil.chains, - projectId: ConstantsUtil.ProjectId, - metadata: ConstantsUtil.Metadata, - ssr: true, - ...override - } - - const emailConfig = { - ...config, - auth: { - socials: ['google', 'x', 'discord', 'farcaster', 'github', 'apple', 'facebook'] - } - } - - const wagmiConfig = defaultWagmiConfig(type === 'email' ? emailConfig : config) - - return wagmiConfig -} diff --git a/apps/laboratory/tests/basic-tests.spec.ts b/apps/laboratory/tests/basic-tests.spec.ts index 1c1c4d0a27..558d20ad7a 100644 --- a/apps/laboratory/tests/basic-tests.spec.ts +++ b/apps/laboratory/tests/basic-tests.spec.ts @@ -1,30 +1,63 @@ -import { testMExternal } from './shared/fixtures/w3m-external-fixture' -import { testM, expect } from './shared/fixtures/w3m-fixture' +import { test, type BrowserContext, type Page } from '@playwright/test' +import { expect } from './shared/fixtures/w3m-fixture' +import { ModalPage } from './shared/pages/ModalPage' import { ModalValidator } from './shared/validators/ModalValidator' +import { BASE_URL } from './shared/constants' -testM.describe('Modal only tests', () => { - testM('Should be able to open modal', async ({ modalPage }) => { - await modalPage.page.getByTestId('connect-button').click() - await expect(modalPage.page.getByTestId('all-wallets')).toBeVisible() - }) - - testM('Should be able to open modal with the open hook', async ({ modalPage }) => { - const openHookButton = modalPage.page.getByTestId('w3m-open-hook-button') - await openHookButton.click() - await expect(modalPage.page.getByTestId('all-wallets')).toBeVisible() - }) - - testM('Should show socials enabled by default', async ({ modalPage }) => { - const modalValidator = new ModalValidator(modalPage.page) - await modalPage.page.getByTestId('connect-button').click() - await modalValidator.expectSocialsVisible() - }) +/* eslint-disable init-declarations */ +let modalPage: ModalPage +let modalValidator: ModalValidator +let context: BrowserContext +let browserPage: Page +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +const basicTest = test.extend<{ library: string }>({ + library: ['wagmi', { option: true }] +}) + +basicTest.describe.configure({ mode: 'serial' }) + +basicTest.beforeAll(async ({ browser, library }) => { + context = await browser.newContext() + browserPage = await context.newPage() + + modalPage = new ModalPage(browserPage, library, 'default') + modalValidator = new ModalValidator(modalPage.page) + + await modalPage.load() +}) + +basicTest.afterAll(async () => { + await modalPage.page.close() }) -testMExternal.describe('External connectors tests', () => { - testMExternal('Should show external connectors', async ({ modalPage }) => { - const modalValidator = new ModalValidator(modalPage.page) - await modalPage.page.getByTestId('connect-button').click() - await modalValidator.expectExternalVisible() - }) +// -- Tests -------------------------------------------------------------------- +basicTest('Should be able to open modal', async () => { + await modalPage.page.getByTestId('connect-button').click() + await expect(modalPage.page.getByTestId('all-wallets')).toBeVisible() + await modalPage.closeModal() +}) + +basicTest('Should be able to open modal with the open hook', async () => { + const openHookButton = modalPage.page.getByTestId('w3m-open-hook-button') + await openHookButton.click() + await expect(modalPage.page.getByTestId('all-wallets')).toBeVisible() + await modalPage.closeModal() +}) + +basicTest('Should show socials enabled by default', async () => { + await modalPage.page.getByTestId('connect-button').click() + await modalValidator.expectSocialsVisible() + await modalPage.closeModal() +}) + +basicTest('Should show external connectors', async ({ library }) => { + if (library !== 'wagmi') { + return + } + + await modalPage.page.goto(`${BASE_URL}/library/external/`) + await modalPage.page.getByTestId('connect-button').click() + await modalValidator.expectExternalVisible() }) diff --git a/apps/laboratory/tests/canary.spec.ts b/apps/laboratory/tests/canary.spec.ts index b4de27a175..78ff2d1049 100644 --- a/apps/laboratory/tests/canary.spec.ts +++ b/apps/laboratory/tests/canary.spec.ts @@ -29,7 +29,7 @@ testConnectedMW.afterEach(async ({ browserName, timingRecords }, testInfo) => { await uploadCanaryResultsToCloudWatch( ENV, REGION, - 'https://lab.web3modal.com/', + 'https://appkit-lab.reown.org/', 'HappyPath.sign', testInfo.status === 'passed', duration, diff --git a/apps/laboratory/tests/email.spec.ts b/apps/laboratory/tests/email.spec.ts index e9acc7d284..9284e04c5e 100644 --- a/apps/laboratory/tests/email.spec.ts +++ b/apps/laboratory/tests/email.spec.ts @@ -1,7 +1,7 @@ import { expect, test, type BrowserContext, type Page } from '@playwright/test' import { ModalWalletPage } from './shared/pages/ModalWalletPage' -import { Email } from './shared/utils/email' import { ModalWalletValidator } from './shared/validators/ModalWalletValidator' +import { Email } from './shared/utils/email' import { SECURE_WEBSITE_URL } from './shared/constants' /* eslint-disable init-declarations */ @@ -19,7 +19,6 @@ const emailTest = test.extend<{ library: string }>({ emailTest.describe.configure({ mode: 'serial' }) emailTest.beforeAll(async ({ browser, library }) => { - emailTest.setTimeout(300000) context = await browser.newContext() browserPage = await context.newPage() @@ -63,20 +62,18 @@ emailTest('it should reject sign', async () => { await validator.expectRejectedSign() }) -emailTest('it should switch network and sign', async () => { - let targetChain = 'Polygon' - await page.goToSettings() +emailTest('it should switch network and sign', async ({ library }) => { + let targetChain = library === 'solana' ? 'Solana Testnet' : 'Polygon' await page.switchNetwork(targetChain) - await validator.expectSwitchedNetwork(targetChain) + await validator.expectSwitchedNetworkOnNetworksView(targetChain) await page.closeModal() await page.sign() await page.approveSign() await validator.expectAcceptedSign() - targetChain = 'Ethereum' - await page.goToSettings() + targetChain = library === 'solana' ? 'Solana' : 'Ethereum' await page.switchNetwork(targetChain) - await validator.expectSwitchedNetwork(targetChain) + await validator.expectSwitchedNetworkOnNetworksView(targetChain) await page.closeModal() await page.sign() await page.approveSign() diff --git a/apps/laboratory/tests/multichain/multichain-basic.spec.ts b/apps/laboratory/tests/multichain/multichain-basic.spec.ts new file mode 100644 index 0000000000..f15f680df1 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-basic.spec.ts @@ -0,0 +1,78 @@ +import { test, type BrowserContext } from '@playwright/test' +import { DEFAULT_CHAIN_NAME } from '../shared/constants' +import { ModalPage } from '../shared/pages/ModalPage' +import { ModalValidator } from '../shared/validators/ModalValidator' +import { WalletPage } from '../shared/pages/WalletPage' +import { WalletValidator } from '../shared/validators/WalletValidator' + +/* eslint-disable init-declarations */ +let modalPage: ModalPage +let modalValidator: ModalValidator +let walletPage: WalletPage +let walletValidator: WalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + modalPage = new ModalPage(browserPage, 'multichain-basic', 'default') + walletPage = new WalletPage(await context.newPage()) + modalValidator = new ModalValidator(browserPage) + walletValidator = new WalletValidator(walletPage.page) + + await modalPage.load() + await modalPage.qrCodeFlow(modalPage, walletPage, true) + await modalValidator.expectConnected() +}) + +test.afterAll(async () => { + await modalPage.page.close() +}) + +// -- Tests -------------------------------------------------------------------- + +test('it should switch networks and sign', async () => { + const chains = ['Optimism', 'Solana'] + + async function processChain(index: number) { + if (index >= chains.length) { + return + } + + const chainName = chains[index] ?? DEFAULT_CHAIN_NAME + await modalPage.switchNetwork(chainName) + await modalValidator.expectSwitchedNetwork(chainName) + await modalPage.closeModal() + + // -- Sign ------------------------------------------------------------------ + await modalPage.sign() + await walletValidator.expectReceivedSign({ chainName }) + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAcceptedSign() + + await processChain(index + 1) + } + + // Start processing from the first chain + await processChain(0) +}) + +test('it should disconnect and close modal when connecting from wallet', async () => { + await modalPage.openModal() + await walletPage.disconnectConnection() + await walletValidator.expectSessionCard({ visible: false }) + await modalValidator.expectModalNotVisible() + await walletPage.page.waitForTimeout(500) +}) + +test('it should disconnect as expected', async () => { + await modalPage.qrCodeFlow(modalPage, walletPage, true) + await modalValidator.expectConnected() + await modalPage.disconnect() + await modalValidator.expectDisconnected() +}) diff --git a/apps/laboratory/tests/multichain/multichain-ethers-solana-email-siwe.spec.ts b/apps/laboratory/tests/multichain/multichain-ethers-solana-email-siwe.spec.ts new file mode 100644 index 0000000000..ad812324be --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-ethers-solana-email-siwe.spec.ts @@ -0,0 +1,70 @@ +import { test, type BrowserContext } from '@playwright/test' +import { ModalWalletPage } from '../shared/pages/ModalWalletPage' +import { ModalWalletValidator } from '../shared/validators/ModalWalletValidator' +import { Email } from '../shared/utils/email' + +/* eslint-disable init-declarations */ +let page: ModalWalletPage +let validator: ModalWalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + page = new ModalWalletPage(browserPage, 'multichain-ethers-solana-siwe', 'default') + validator = new ModalWalletValidator(browserPage) + + await page.load() + + const mailsacApiKey = process.env['MAILSAC_API_KEY'] + if (!mailsacApiKey) { + throw new Error('MAILSAC_API_KEY is not set') + } + const email = new Email(mailsacApiKey) + const tempEmail = await email.getEmailAddressToUse() + await page.emailFlow(tempEmail, context, mailsacApiKey) + await page.promptSiwe() + await page.approveSign() + + await validator.expectConnected() + await validator.expectAuthenticated() +}) + +test.afterAll(async () => { + await page.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should switch networks and sign', async () => { + const chainName = 'Polygon' + + await page.switchNetwork(chainName) + await page.promptSiwe() + await page.approveSign() + + // -- Sign ------------------------------------------------------------------ + await page.sign() + await validator.expectReceivedSign({ chainName }) + await page.approveSign() + await validator.expectAcceptedSign() +}) + +test('it should switch to different namespace', async () => { + const chainName = 'Solana' + + await page.switchNetwork(chainName) + await page.openNetworks() + await validator.expectSwitchedNetwork(chainName) + await page.closeModal() + + // -- Sign ------------------------------------------------------------------ + await page.sign() + await validator.expectReceivedSign({ chainName }) + await page.approveSign() + await validator.expectAcceptedSign() +}) diff --git a/apps/laboratory/tests/multichain/multichain-ethers-solana-email.spec.ts b/apps/laboratory/tests/multichain/multichain-ethers-solana-email.spec.ts new file mode 100644 index 0000000000..2bd5be9ce4 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-ethers-solana-email.spec.ts @@ -0,0 +1,68 @@ +import { test, type BrowserContext } from '@playwright/test' +import { DEFAULT_CHAIN_NAME } from '../shared/constants' +import { ModalWalletPage } from '../shared/pages/ModalWalletPage' +import { ModalWalletValidator } from '../shared/validators/ModalWalletValidator' +import { Email } from '../shared/utils/email' + +/* eslint-disable init-declarations */ +let page: ModalWalletPage +let validator: ModalWalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + page = new ModalWalletPage(browserPage, 'multichain-ethers-solana', 'default') + validator = new ModalWalletValidator(browserPage) + + await page.load() + + const mailsacApiKey = process.env['MAILSAC_API_KEY'] + if (!mailsacApiKey) { + throw new Error('MAILSAC_API_KEY is not set') + } + const email = new Email(mailsacApiKey) + const tempEmail = await email.getEmailAddressToUse() + await page.emailFlow(tempEmail, context, mailsacApiKey) + + await validator.expectConnected() +}) + +test.afterAll(async () => { + await page.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should switch networks (including different namespaces) and sign', async () => { + const chains = ['Polygon', 'Solana'] + + async function processChain(index: number) { + if (index >= chains.length) { + return + } + + const chainName = chains[index] ?? DEFAULT_CHAIN_NAME + await page.switchNetwork(chainName) + await page.page.waitForTimeout(200) + await validator.expectSwitchedNetwork(chainName) + await page.closeModal() + + // -- Sign ------------------------------------------------------------------ + await page.sign() + // For Solana, the chain name on the wallet page is Solana Mainnet + const chainNameOnWalletPage = chainName === 'Solana' ? 'Solana Mainnet' : chainName + await validator.expectReceivedSign({ chainName: chainNameOnWalletPage }) + await page.approveSign() + await validator.expectAcceptedSign() + + await processChain(index + 1) + } + + // Start processing from the first chain + await processChain(0) +}) diff --git a/apps/laboratory/tests/multichain/multichain-ethers-solana-siwe.spec.ts b/apps/laboratory/tests/multichain/multichain-ethers-solana-siwe.spec.ts new file mode 100644 index 0000000000..22ec22de75 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-ethers-solana-siwe.spec.ts @@ -0,0 +1,56 @@ +import { test, type BrowserContext } from '@playwright/test' +import { ModalPage } from '../shared/pages/ModalPage' +import { ModalValidator } from '../shared/validators/ModalValidator' +import { WalletPage } from '../shared/pages/WalletPage' +import { WalletValidator } from '../shared/validators/WalletValidator' + +/* eslint-disable init-declarations */ +let modalPage: ModalPage +let modalValidator: ModalValidator +let walletPage: WalletPage +let walletValidator: WalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + modalPage = new ModalPage(browserPage, 'multichain-ethers-solana-siwe', 'default') + walletPage = new WalletPage(await context.newPage()) + modalValidator = new ModalValidator(browserPage) + walletValidator = new WalletValidator(walletPage.page) + + await modalPage.load() + await modalPage.load() + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() +}) + +test.afterAll(async () => { + await modalPage.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should switch networks and sign siwe', async () => { + const chainName = 'Polygon' + await modalPage.switchNetwork(chainName) + await modalPage.promptSiwe() + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAuthenticated() + + // -- Sign ------------------------------------------------------------------ + await modalPage.sign() + await walletValidator.expectReceivedSign({ chainName }) + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAcceptedSign() +}) + +test('it should switch to Solana and validate chain title', async () => { + const chainName = 'Solana' + await modalPage.switchNetwork(chainName) + await modalValidator.expectSwitchChainView(chainName.toLocaleLowerCase()) +}) diff --git a/apps/laboratory/tests/multichain/multichain-ethers-solana.spec.ts b/apps/laboratory/tests/multichain/multichain-ethers-solana.spec.ts new file mode 100644 index 0000000000..acb57c34b3 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-ethers-solana.spec.ts @@ -0,0 +1,103 @@ +import { test, type BrowserContext } from '@playwright/test' +import { DEFAULT_CHAIN_NAME } from '../shared/constants' +import { ModalPage } from '../shared/pages/ModalPage' +import { ModalValidator } from '../shared/validators/ModalValidator' +import { WalletPage } from '../shared/pages/WalletPage' +import { WalletValidator } from '../shared/validators/WalletValidator' + +/* eslint-disable init-declarations */ +let modalPage: ModalPage +let modalValidator: ModalValidator +let walletPage: WalletPage +let walletValidator: WalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + modalPage = new ModalPage(browserPage, 'multichain-ethers-solana', 'default') + walletPage = new WalletPage(await context.newPage()) + modalValidator = new ModalValidator(browserPage) + walletValidator = new WalletValidator(walletPage.page) + + await modalPage.load() + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() +}) + +test.afterAll(async () => { + await modalPage.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should fetch balance as expected', async () => { + await modalValidator.expectBalanceFetched('ETH') +}) + +test.skip('it should show disabled networks', async () => { + const disabledNetworks = 'Arbitrum' + + await modalPage.openModal() + await modalPage.openNetworks() + await modalValidator.expectNetworksDisabled(disabledNetworks) + await modalPage.closeModal() +}) + +test('it should switch networks and sign', async () => { + const chains = ['Polygon', 'Solana'] + + async function processChain(index: number) { + if (index >= chains.length) { + return + } + + const chainName = chains[index] ?? DEFAULT_CHAIN_NAME + await modalPage.switchNetwork(chainName) + await modalValidator.expectSwitchedNetwork(chainName) + await modalPage.closeModal() + + // -- Sign ------------------------------------------------------------------ + await modalPage.sign() + await walletValidator.expectReceivedSign({ chainName }) + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAcceptedSign() + + await processChain(index + 1) + } + + // Start processing from the first chain + await processChain(0) +}) + +test('it should switch between multiple accounts', async () => { + const chainName = 'Ethereum' + await modalPage.switchNetwork(chainName) + await modalPage.page.waitForTimeout(500) + await modalValidator.expectSwitchedNetwork(chainName) + await modalPage.closeModal() + const originalAddress = await modalPage.getAddress() + await modalPage.openAccount() + await modalPage.openProfileView() + await modalPage.switchAccount() + await modalValidator.expectAccountSwitched(originalAddress) +}) + +test('it should disconnect and close modal when connecting from wallet', async () => { + await modalPage.openModal() + await walletPage.disconnectConnection() + await walletValidator.expectSessionCard({ visible: false }) + await modalValidator.expectModalNotVisible() + await walletPage.page.waitForTimeout(500) +}) + +test('it should disconnect as expected', async () => { + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() + await modalPage.disconnect() + await modalValidator.expectDisconnected() +}) diff --git a/apps/laboratory/tests/multichain/multichain-ethers5-solana-email-siwe.spec.ts b/apps/laboratory/tests/multichain/multichain-ethers5-solana-email-siwe.spec.ts new file mode 100644 index 0000000000..64c8ae580c --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-ethers5-solana-email-siwe.spec.ts @@ -0,0 +1,70 @@ +import { test, type BrowserContext } from '@playwright/test' +import { ModalWalletPage } from '../shared/pages/ModalWalletPage' +import { ModalWalletValidator } from '../shared/validators/ModalWalletValidator' +import { Email } from '../shared/utils/email' + +/* eslint-disable init-declarations */ +let page: ModalWalletPage +let validator: ModalWalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + page = new ModalWalletPage(browserPage, 'multichain-ethers5-solana-siwe', 'default') + validator = new ModalWalletValidator(browserPage) + + await page.load() + + const mailsacApiKey = process.env['MAILSAC_API_KEY'] + if (!mailsacApiKey) { + throw new Error('MAILSAC_API_KEY is not set') + } + const email = new Email(mailsacApiKey) + const tempEmail = await email.getEmailAddressToUse() + await page.emailFlow(tempEmail, context, mailsacApiKey) + await page.promptSiwe() + await page.approveSign() + + await validator.expectConnected() + await validator.expectAuthenticated() +}) + +test.afterAll(async () => { + await page.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should switch networks and sign', async () => { + const chainName = 'Polygon' + + await page.switchNetwork(chainName) + await page.promptSiwe() + await page.approveSign() + + // -- Sign ------------------------------------------------------------------ + await page.sign() + await validator.expectReceivedSign({ chainName }) + await page.approveSign() + await validator.expectAcceptedSign() +}) + +test('it should switch to different namespace', async () => { + const chainName = 'Solana' + + await page.switchNetwork(chainName) + await page.openNetworks() + await validator.expectSwitchedNetwork(chainName) + await page.closeModal() + + // -- Sign ------------------------------------------------------------------ + await page.sign() + await validator.expectReceivedSign({ chainName }) + await page.approveSign() + await validator.expectAcceptedSign() +}) diff --git a/apps/laboratory/tests/multichain/multichain-ethers5-solana-email.spec.ts b/apps/laboratory/tests/multichain/multichain-ethers5-solana-email.spec.ts new file mode 100644 index 0000000000..31cb0e93d8 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-ethers5-solana-email.spec.ts @@ -0,0 +1,67 @@ +import { test, type BrowserContext } from '@playwright/test' +import { DEFAULT_CHAIN_NAME } from '../shared/constants' +import { ModalWalletPage } from '../shared/pages/ModalWalletPage' +import { ModalWalletValidator } from '../shared/validators/ModalWalletValidator' +import { Email } from '../shared/utils/email' + +/* eslint-disable init-declarations */ +let page: ModalWalletPage +let validator: ModalWalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + page = new ModalWalletPage(browserPage, 'multichain-ethers5-solana', 'default') + validator = new ModalWalletValidator(browserPage) + + await page.load() + + const mailsacApiKey = process.env['MAILSAC_API_KEY'] + if (!mailsacApiKey) { + throw new Error('MAILSAC_API_KEY is not set') + } + const email = new Email(mailsacApiKey) + const tempEmail = await email.getEmailAddressToUse() + await page.emailFlow(tempEmail, context, mailsacApiKey) + + await validator.expectConnected() +}) + +test.afterAll(async () => { + await page.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should switch networks (including different namespaces) and sign', async () => { + const chains = ['Polygon', 'Solana'] + + async function processChain(index: number) { + if (index >= chains.length) { + return + } + + const chainName = chains[index] ?? DEFAULT_CHAIN_NAME + await page.switchNetwork(chainName) + await validator.expectSwitchedNetwork(chainName) + await page.closeModal() + + // -- Sign ------------------------------------------------------------------ + await page.sign() + // For Solana, the chain name on the wallet page is Solana Mainnet + const chainNameOnWalletPage = chainName === 'Solana' ? 'Solana Mainnet' : chainName + await validator.expectReceivedSign({ chainName: chainNameOnWalletPage }) + await page.approveSign() + await validator.expectAcceptedSign() + + await processChain(index + 1) + } + + // Start processing from the first chain + await processChain(0) +}) diff --git a/apps/laboratory/tests/multichain/multichain-ethers5-solana-siwe.spec.ts b/apps/laboratory/tests/multichain/multichain-ethers5-solana-siwe.spec.ts new file mode 100644 index 0000000000..a161cfd674 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-ethers5-solana-siwe.spec.ts @@ -0,0 +1,56 @@ +import { test, type BrowserContext } from '@playwright/test' +import { ModalPage } from '../shared/pages/ModalPage' +import { ModalValidator } from '../shared/validators/ModalValidator' +import { WalletPage } from '../shared/pages/WalletPage' +import { WalletValidator } from '../shared/validators/WalletValidator' + +/* eslint-disable init-declarations */ +let modalPage: ModalPage +let modalValidator: ModalValidator +let walletPage: WalletPage +let walletValidator: WalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + modalPage = new ModalPage(browserPage, 'multichain-ethers5-solana-siwe', 'default') + walletPage = new WalletPage(await context.newPage()) + modalValidator = new ModalValidator(browserPage) + walletValidator = new WalletValidator(walletPage.page) + + await modalPage.load() + await modalPage.load() + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() +}) + +test.afterAll(async () => { + await modalPage.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should switch networks and sign siwe', async () => { + const chainName = 'Polygon' + await modalPage.switchNetwork(chainName) + await modalPage.promptSiwe() + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAuthenticated() + + // -- Sign ------------------------------------------------------------------ + await modalPage.sign() + await walletValidator.expectReceivedSign({ chainName }) + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAcceptedSign() +}) + +test('it should switch to Solana and validate chain title', async () => { + const chainName = 'Solana' + await modalPage.switchNetwork(chainName) + await modalValidator.expectSwitchChainView(chainName.toLocaleLowerCase()) +}) diff --git a/apps/laboratory/tests/multichain/multichain-ethers5-solana.spec.ts b/apps/laboratory/tests/multichain/multichain-ethers5-solana.spec.ts new file mode 100644 index 0000000000..9957ebb962 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-ethers5-solana.spec.ts @@ -0,0 +1,103 @@ +import { test, type BrowserContext } from '@playwright/test' +import { DEFAULT_CHAIN_NAME } from '../shared/constants' +import { ModalPage } from '../shared/pages/ModalPage' +import { ModalValidator } from '../shared/validators/ModalValidator' +import { WalletPage } from '../shared/pages/WalletPage' +import { WalletValidator } from '../shared/validators/WalletValidator' + +/* eslint-disable init-declarations */ +let modalPage: ModalPage +let modalValidator: ModalValidator +let walletPage: WalletPage +let walletValidator: WalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + modalPage = new ModalPage(browserPage, 'multichain-ethers5-solana', 'default') + walletPage = new WalletPage(await context.newPage()) + modalValidator = new ModalValidator(browserPage) + walletValidator = new WalletValidator(walletPage.page) + + await modalPage.load() + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() +}) + +test.afterAll(async () => { + await modalPage.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should fetch balance as expected', async () => { + await modalValidator.expectBalanceFetched('ETH') +}) + +test.skip('it should show disabled networks', async () => { + const disabledNetworks = 'Arbitrum' + + await modalPage.openModal() + await modalPage.openNetworks() + await modalValidator.expectNetworksDisabled(disabledNetworks) + await modalPage.closeModal() +}) + +test('it should switch networks and sign', async () => { + const chains = ['Polygon', 'Solana'] + + async function processChain(index: number) { + if (index >= chains.length) { + return + } + + const chainName = chains[index] ?? DEFAULT_CHAIN_NAME + await modalPage.switchNetwork(chainName) + await modalValidator.expectSwitchedNetwork(chainName) + await modalPage.closeModal() + + // -- Sign ------------------------------------------------------------------ + await modalPage.sign() + await walletValidator.expectReceivedSign({ chainName }) + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAcceptedSign() + + await processChain(index + 1) + } + + // Start processing from the first chain + await processChain(0) +}) + +test('it should switch between multiple accounts', async () => { + const chainName = 'Ethereum' + await modalPage.switchNetwork(chainName) + await modalPage.page.waitForTimeout(500) + await modalValidator.expectSwitchedNetwork(chainName) + await modalPage.closeModal() + const originalAddress = await modalPage.getAddress() + await modalPage.openAccount() + await modalPage.openProfileView() + await modalPage.switchAccount() + await modalValidator.expectAccountSwitched(originalAddress) +}) + +test('it should disconnect and close modal when connecting from wallet', async () => { + await modalPage.openModal() + await walletPage.disconnectConnection() + await walletValidator.expectSessionCard({ visible: false }) + await modalValidator.expectModalNotVisible() + await walletPage.page.waitForTimeout(500) +}) + +test('it should disconnect as expected', async () => { + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() + await modalPage.disconnect() + await modalValidator.expectDisconnected() +}) diff --git a/apps/laboratory/tests/multichain/multichain-wagmi-solana-email-siwe.spec.ts b/apps/laboratory/tests/multichain/multichain-wagmi-solana-email-siwe.spec.ts new file mode 100644 index 0000000000..96b0cf5546 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-wagmi-solana-email-siwe.spec.ts @@ -0,0 +1,71 @@ +import { test, type BrowserContext } from '@playwright/test' +import { ModalWalletPage } from '../shared/pages/ModalWalletPage' +import { ModalWalletValidator } from '../shared/validators/ModalWalletValidator' +import { Email } from '../shared/utils/email' + +/* eslint-disable init-declarations */ +let page: ModalWalletPage +let validator: ModalWalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + page = new ModalWalletPage(browserPage, 'multichain-wagmi-solana-siwe', 'default') + validator = new ModalWalletValidator(browserPage) + + await page.load() + + const mailsacApiKey = process.env['MAILSAC_API_KEY'] + if (!mailsacApiKey) { + throw new Error('MAILSAC_API_KEY is not set') + } + const email = new Email(mailsacApiKey) + const tempEmail = await email.getEmailAddressToUse() + await page.emailFlow(tempEmail, context, mailsacApiKey) + await page.promptSiwe() + await page.approveSign() + + await validator.expectConnected() + await validator.expectAuthenticated() +}) + +test.afterAll(async () => { + await page.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should switch networks and sign', async () => { + const chainName = 'Polygon' + + await page.switchNetwork(chainName) + await page.promptSiwe() + await page.approveSign() + + // -- Sign ------------------------------------------------------------------ + await page.sign() + await validator.expectReceivedSign({ chainName }) + await page.approveSign() + await validator.expectAcceptedSign() +}) + +test('it should switch to different namespace', async () => { + const chainName = 'Solana' + + await page.switchNetwork(chainName) + await page.openAccount() + await page.openNetworks() + await validator.expectSwitchedNetwork(chainName) + await page.closeModal() + + // -- Sign ------------------------------------------------------------------ + await page.sign() + await validator.expectReceivedSign({ chainName }) + await page.approveSign() + await validator.expectAcceptedSign() +}) diff --git a/apps/laboratory/tests/multichain/multichain-wagmi-solana-email.spec.ts b/apps/laboratory/tests/multichain/multichain-wagmi-solana-email.spec.ts new file mode 100644 index 0000000000..49d4960433 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-wagmi-solana-email.spec.ts @@ -0,0 +1,68 @@ +import { test, type BrowserContext } from '@playwright/test' +import { DEFAULT_CHAIN_NAME } from '../shared/constants' +import { ModalWalletPage } from '../shared/pages/ModalWalletPage' +import { ModalWalletValidator } from '../shared/validators/ModalWalletValidator' +import { Email } from '../shared/utils/email' + +/* eslint-disable init-declarations */ +let page: ModalWalletPage +let validator: ModalWalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + page = new ModalWalletPage(browserPage, 'multichain-wagmi-solana', 'default') + validator = new ModalWalletValidator(browserPage) + + await page.load() + + const mailsacApiKey = process.env['MAILSAC_API_KEY'] + if (!mailsacApiKey) { + throw new Error('MAILSAC_API_KEY is not set') + } + const email = new Email(mailsacApiKey) + const tempEmail = await email.getEmailAddressToUse() + await page.emailFlow(tempEmail, context, mailsacApiKey) + + await validator.expectConnected() +}) + +test.afterAll(async () => { + await page.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should switch networks (including different namespaces) and sign', async () => { + const chains = ['Polygon', 'Solana'] + + async function processChain(index: number) { + if (index >= chains.length) { + return + } + + const chainName = chains[index] ?? DEFAULT_CHAIN_NAME + await page.switchNetwork(chainName) + await page.page.waitForTimeout(200) + await validator.expectSwitchedNetwork(chainName) + await page.closeModal() + + // -- Sign ------------------------------------------------------------------ + await page.sign() + // For Solana, the chain name on the wallet page is Solana Mainnet + const chainNameOnWalletPage = chainName === 'Solana' ? 'Solana Mainnet' : chainName + await validator.expectReceivedSign({ chainName: chainNameOnWalletPage }) + await page.approveSign() + await validator.expectAcceptedSign() + + await processChain(index + 1) + } + + // Start processing from the first chain + await processChain(0) +}) diff --git a/apps/laboratory/tests/multichain/multichain-wagmi-solana-siwe.spec.ts b/apps/laboratory/tests/multichain/multichain-wagmi-solana-siwe.spec.ts new file mode 100644 index 0000000000..a3837cc086 --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-wagmi-solana-siwe.spec.ts @@ -0,0 +1,56 @@ +import { test, type BrowserContext } from '@playwright/test' +import { ModalPage } from '../shared/pages/ModalPage' +import { ModalValidator } from '../shared/validators/ModalValidator' +import { WalletPage } from '../shared/pages/WalletPage' +import { WalletValidator } from '../shared/validators/WalletValidator' + +/* eslint-disable init-declarations */ +let modalPage: ModalPage +let modalValidator: ModalValidator +let walletPage: WalletPage +let walletValidator: WalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + modalPage = new ModalPage(browserPage, 'multichain-wagmi-solana-siwe', 'default') + walletPage = new WalletPage(await context.newPage()) + modalValidator = new ModalValidator(browserPage) + walletValidator = new WalletValidator(walletPage.page) + + await modalPage.load() + await modalPage.load() + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() +}) + +test.afterAll(async () => { + await modalPage.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should switch networks and sign siwe', async () => { + const chainName = 'Polygon' + await modalPage.switchNetwork(chainName) + await modalPage.promptSiwe() + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAuthenticated() + + // -- Sign ------------------------------------------------------------------ + await modalPage.sign() + await walletValidator.expectReceivedSign({ chainName }) + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAcceptedSign() +}) + +test('it should switch to Solana and validate chain title', async () => { + const chainName = 'Solana' + await modalPage.switchNetwork(chainName) + await modalValidator.expectSwitchChainView(chainName.toLocaleLowerCase()) +}) diff --git a/apps/laboratory/tests/multichain/multichain-wagmi-solana.spec.ts b/apps/laboratory/tests/multichain/multichain-wagmi-solana.spec.ts new file mode 100644 index 0000000000..3aa394866d --- /dev/null +++ b/apps/laboratory/tests/multichain/multichain-wagmi-solana.spec.ts @@ -0,0 +1,103 @@ +import { test, type BrowserContext } from '@playwright/test' +import { DEFAULT_CHAIN_NAME } from '../shared/constants' +import { ModalPage } from '../shared/pages/ModalPage' +import { ModalValidator } from '../shared/validators/ModalValidator' +import { WalletPage } from '../shared/pages/WalletPage' +import { WalletValidator } from '../shared/validators/WalletValidator' + +/* eslint-disable init-declarations */ +let modalPage: ModalPage +let modalValidator: ModalValidator +let walletPage: WalletPage +let walletValidator: WalletValidator +let context: BrowserContext +/* eslint-enable init-declarations */ + +// -- Setup -------------------------------------------------------------------- +test.describe.configure({ mode: 'serial' }) + +test.beforeAll(async ({ browser }) => { + context = await browser.newContext() + const browserPage = await context.newPage() + + modalPage = new ModalPage(browserPage, 'multichain-wagmi-solana', 'default') + walletPage = new WalletPage(await context.newPage()) + modalValidator = new ModalValidator(browserPage) + walletValidator = new WalletValidator(walletPage.page) + + await modalPage.load() + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() +}) + +test.afterAll(async () => { + await modalPage.page.close() +}) + +// -- Tests -------------------------------------------------------------------- +test('it should fetch balance as expected', async () => { + await modalValidator.expectBalanceFetched('ETH') +}) + +test.skip('it should show disabled networks', async () => { + const disabledNetworks = 'Arbitrum' + + await modalPage.openModal() + await modalPage.openNetworks() + await modalValidator.expectNetworksDisabled(disabledNetworks) + await modalPage.closeModal() +}) + +test('it should switch networks and sign', async () => { + const chains = ['Polygon', 'Solana'] + + async function processChain(index: number) { + if (index >= chains.length) { + return + } + + const chainName = chains[index] ?? DEFAULT_CHAIN_NAME + await modalPage.switchNetwork(chainName) + await modalValidator.expectSwitchedNetwork(chainName) + await modalPage.closeModal() + + // -- Sign ------------------------------------------------------------------ + await modalPage.sign() + await walletValidator.expectReceivedSign({ chainName }) + await walletPage.handleRequest({ accept: true }) + await modalValidator.expectAcceptedSign() + + await processChain(index + 1) + } + + // Start processing from the first chain + await processChain(0) +}) + +test('it should switch between multiple accounts', async () => { + const chainName = 'Ethereum' + await modalPage.switchNetwork(chainName) + await modalPage.page.waitForTimeout(500) + await modalValidator.expectSwitchedNetwork(chainName) + await modalPage.closeModal() + const originalAddress = await modalPage.getAddress() + await modalPage.openAccount() + await modalPage.openProfileView() + await modalPage.switchAccount() + await modalValidator.expectAccountSwitched(originalAddress) +}) + +test('it should disconnect and close modal when connecting from wallet', async () => { + await modalPage.openModal() + await walletPage.disconnectConnection() + await walletValidator.expectSessionCard({ visible: false }) + await modalValidator.expectModalNotVisible() + await walletPage.page.waitForTimeout(500) +}) + +test('it should disconnect as expected', async () => { + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() + await modalPage.disconnect() + await modalValidator.expectDisconnected() +}) diff --git a/apps/laboratory/tests/shared/fixtures/w3m-fixture.ts b/apps/laboratory/tests/shared/fixtures/w3m-fixture.ts index 886b56f0c5..ee20e24f7f 100644 --- a/apps/laboratory/tests/shared/fixtures/w3m-fixture.ts +++ b/apps/laboratory/tests/shared/fixtures/w3m-fixture.ts @@ -2,6 +2,7 @@ import { ModalPage } from '../pages/ModalPage' import { timeStart, timeEnd } from '../utils/logs' +import { ModalValidator } from '../validators/ModalValidator' import { timingFixture } from './timing-fixture' // Declare the types of fixtures to use @@ -10,6 +11,12 @@ export interface ModalFixture { library: string } +interface ModalWalletFixture { + modalPage: ModalPage + modalValidator: ModalValidator + library: string +} + // M -> test Modal export const testM = timingFixture.extend({ library: ['wagmi', { option: true }], @@ -33,4 +40,17 @@ export const testMSiwe = timingFixture.extend({ } }) +export const testMultiChainM = timingFixture.extend({ + library: ['multichain', { option: true }], + modalPage: async ({ page, library }, use) => { + const modalPage = new ModalPage(page, library, 'all') + await modalPage.load() + await use(modalPage) + }, + modalValidator: async ({ modalPage }, use) => { + const modalValidator = new ModalValidator(modalPage.page) + await use(modalValidator) + } +}) + export { expect } from '@playwright/test' diff --git a/apps/laboratory/tests/shared/fixtures/w3m-multi-chain-fixture.ts b/apps/laboratory/tests/shared/fixtures/w3m-multi-chain-fixture.ts new file mode 100644 index 0000000000..a65e79e612 --- /dev/null +++ b/apps/laboratory/tests/shared/fixtures/w3m-multi-chain-fixture.ts @@ -0,0 +1,26 @@ +/* eslint no-console: 0 */ + +import { testM as base } from './w3m-fixture' +import { ModalPage } from '../pages/ModalPage' +import { ModalValidator } from '../validators/ModalValidator' + +interface ModalWalletFixture { + modalPage: ModalPage + modalValidator: ModalValidator + library: string +} + +export const testMultiChainM = base.extend({ + library: 'multichain', + modalPage: async ({ page, library }, use) => { + const modalPage = new ModalPage(page, library, 'all') + await modalPage.load() + await use(modalPage) + }, + modalValidator: async ({ modalPage }, use) => { + const modalValidator = new ModalValidator(modalPage.page) + await use(modalValidator) + } +}) + +export { expect } from '@playwright/test' diff --git a/apps/laboratory/tests/shared/fixtures/w3m-wallet-fixture.ts b/apps/laboratory/tests/shared/fixtures/w3m-wallet-fixture.ts index 8b494ef9f8..0b8275896c 100644 --- a/apps/laboratory/tests/shared/fixtures/w3m-wallet-fixture.ts +++ b/apps/laboratory/tests/shared/fixtures/w3m-wallet-fixture.ts @@ -1,6 +1,6 @@ /* eslint no-console: 0 */ -import { testM as base, testMSiwe as siwe } from './w3m-fixture' +import { testM as base, testMSiwe as siwe, testMultiChainM as multiChain } from './w3m-fixture' import { WalletPage } from '../pages/WalletPage' import { WalletValidator } from '../validators/WalletValidator' @@ -96,4 +96,20 @@ export const testMWSiwe = siwe.extend({ } }) +export const testMWMultiChain = multiChain.extend({ + walletPage: async ({ context, modalPage, modalValidator }, use) => { + const walletPage = new WalletPage(await context.newPage()) + await walletPage.load() + const uri = await modalPage.getConnectUri() + await walletPage.connectWithUri(uri) + await walletPage.handleSessionProposal(DEFAULT_SESSION_PARAMS) + await modalValidator.expectConnected() + await use(walletPage) + }, + walletValidator: async ({ walletPage }, use) => { + const walletValidator = new WalletValidator(walletPage.page) + await use(walletValidator) + } +}) + export { expect } from '@playwright/test' diff --git a/apps/laboratory/tests/shared/pages/ModalPage.ts b/apps/laboratory/tests/shared/pages/ModalPage.ts index 05c1567997..303821b1f6 100644 --- a/apps/laboratory/tests/shared/pages/ModalPage.ts +++ b/apps/laboratory/tests/shared/pages/ModalPage.ts @@ -20,6 +20,7 @@ export type ModalFlavor = | 'verify-evil' | 'no-email' | 'no-socials' + | 'siwe' | 'all' function getUrlByFlavor(baseUrl: string, library: string, flavor: ModalFlavor) { @@ -47,7 +48,11 @@ export class ModalPage { public readonly flavor: ModalFlavor ) { this.connectButton = this.page.getByTestId('connect-button') - this.url = getUrlByFlavor(this.baseURL, library, flavor) + if (library === 'multichain-ethers-solana') { + this.url = `${this.baseURL}library/multichain-ethers-solana/` + } else { + this.url = getUrlByFlavor(this.baseURL, library, flavor) + } } async load() { @@ -91,10 +96,37 @@ export class ModalPage { return uri } - async qrCodeFlow(page: ModalPage, walletPage: WalletPage): Promise { + async getImmidiateConnectUri(timingRecords?: TimingRecords): Promise { + await this.connectButton.click() + const qrLoadInitiatedTime = new Date() + + // Using getByTestId() doesn't work on my machine, I'm guessing because this element is inside of a + const qrCode = this.page.locator('wui-qr-code') + await expect(qrCode).toBeVisible() + + const uri = this.assertDefined(await qrCode.getAttribute('uri')) + const qrLoadedTime = new Date() + if (timingRecords) { + timingRecords.push({ + item: 'qrLoad', + timeMs: qrLoadedTime.getTime() - qrLoadInitiatedTime.getTime() + }) + } + + return uri + } + + async qrCodeFlow(page: ModalPage, walletPage: WalletPage, immediate?: boolean): Promise { + // eslint-disable-next-line init-declarations + let uri: string await walletPage.load() - const uri = await page.getConnectUri() + if (immediate) { + uri = await page.getImmidiateConnectUri() + } else { + uri = await page.getConnectUri() + } await walletPage.connectWithUri(uri) + await walletPage.handleSessionProposal(DEFAULT_SESSION_PARAMS) const walletValidator = new WalletValidator(walletPage.page) await walletValidator.expectConnected() @@ -309,6 +341,8 @@ export class ModalPage { await this.page.getByTestId('account-button').click() await this.page.getByTestId('w3m-account-select-network').click() await this.page.getByTestId(`w3m-network-switch-${network}`).click() + // The state is chaing too fast and test runner doesn't wait the loading page. It's fastly checking the network selection button and detect that it's switched already. + await this.page.waitForTimeout(300) } async clickWalletDeeplink() { @@ -386,7 +420,6 @@ export class ModalPage { const networkToSwitchButton = this.page.getByTestId(`w3m-network-switch-${networkName}`) await networkToSwitchButton.click() - await networkToSwitchButton.waitFor({ state: 'hidden' }) } async openModal() { diff --git a/apps/laboratory/tests/shared/pages/ModalWalletPage.ts b/apps/laboratory/tests/shared/pages/ModalWalletPage.ts index 69e62811a4..c4c50d828c 100644 --- a/apps/laboratory/tests/shared/pages/ModalWalletPage.ts +++ b/apps/laboratory/tests/shared/pages/ModalWalletPage.ts @@ -7,7 +7,7 @@ export class ModalWalletPage extends ModalPage { constructor( public override readonly page: Page, public override readonly library: string, - public override readonly flavor: 'default' | 'all' + public override readonly flavor: 'default' | 'all' | 'siwe' ) { super(page, library, flavor) } @@ -34,12 +34,6 @@ export class ModalWalletPage extends ModalPage { await this.page.getByTestId('wui-ens-input').getByTestId('wui-input-text').fill(name) } - override async switchNetwork(network: string) { - await this.page.getByTestId('account-switch-network-button').click() - const networkToSwitchButton = this.page.getByTestId(`w3m-network-switch-${network}`) - await networkToSwitchButton.click() - } - async togglePreferredAccountType() { const toggleButton = this.page.getByTestId('account-toggle-preferred-account-type') await expect(toggleButton, 'Toggle button should be visible').toBeVisible() diff --git a/apps/laboratory/tests/shared/pages/WalletPage.ts b/apps/laboratory/tests/shared/pages/WalletPage.ts index f442d681dd..7027c09159 100644 --- a/apps/laboratory/tests/shared/pages/WalletPage.ts +++ b/apps/laboratory/tests/shared/pages/WalletPage.ts @@ -27,6 +27,7 @@ export class WalletPage { /** * Connect by inserting provided URI into the input element */ + async connectWithUri(uri: string) { const isVercelPreview = (await this.vercelPreview.count()) > 0 if (isVercelPreview) { @@ -99,4 +100,17 @@ export class WalletPage { await switchNetworkButton.click() await expect(switchNetworkButton).toHaveText('โœ…') } + + /** + * Disconnects the current connection in the wallet + */ + async disconnectConnection() { + await this.page.waitForLoadState() + const sessionsButton = this.page.getByTestId('sessions') + await sessionsButton.click() + const sessionCard = this.page.getByTestId(`session-card`) + await sessionCard.click() + const disconnectButton = this.page.getByText('Delete') + await disconnectButton.click() + } } diff --git a/apps/laboratory/tests/shared/utils/email.ts b/apps/laboratory/tests/shared/utils/email.ts index 89b82f1f39..0ecf33be52 100644 --- a/apps/laboratory/tests/shared/utils/email.ts +++ b/apps/laboratory/tests/shared/utils/email.ts @@ -85,7 +85,6 @@ export class Email { const email = `w3m-w${id}@${domain}` // eslint-disable-next-line no-console - console.log(`allocating email: ${email}`) return email } diff --git a/apps/laboratory/tests/shared/utils/project.ts b/apps/laboratory/tests/shared/utils/project.ts index 1838a2bfec..1f6f3e04a8 100644 --- a/apps/laboratory/tests/shared/utils/project.ts +++ b/apps/laboratory/tests/shared/utils/project.ts @@ -1,16 +1,24 @@ import { devices } from '@playwright/test' import { getAvailableDevices } from './device' -import { getValue } from './config' -import { getLocalBravePath, BRAVE_LINUX_PATH } from '../constants/browsers' const availableDevices = getAvailableDevices() -const LIBRARIES = ['ethers5', 'ethers', 'wagmi', 'solana'] as const +const LIBRARIES = ['ethers', 'ethers5', 'wagmi', 'solana'] as const +const MULTICHAIN_LIBRARIES = [ + 'multichain-basic', + 'multichain-ethers-solana', + 'multichain-ethers5-solana', + 'multichain-wagmi-solana' +] as const -const PERMUTATIONS = availableDevices.flatMap(device => +const LIBRARY_PERMUTATIONS = availableDevices.flatMap(device => LIBRARIES.map(library => ({ device, library })) ) +const MULTICHAIN_PERMUTATIONS = availableDevices.flatMap(device => + MULTICHAIN_LIBRARIES.map(library => ({ device, library })) +) + interface UseOptions { launchOptions: { executablePath: string @@ -19,7 +27,7 @@ interface UseOptions { interface CustomProperties { testIgnore?: RegExp | string - testMatch?: string + testMatch?: RegExp | string useOptions?: UseOptions grep?: RegExp } @@ -28,83 +36,87 @@ export type CustomProjectProperties = { [T in string]: CustomProperties } -const braveOptions: UseOptions = { - launchOptions: { - executablePath: getValue(BRAVE_LINUX_PATH, getLocalBravePath()) - } -} - -const SOLANA_DISABLED_TESTS = [ +const SINGLE_ADAPTER_EVM_TESTS = [ + 'basic-tests.spec.ts', 'canary.spec.ts', 'email.spec.ts', - 'siwe.spec.ts', + 'no-email.spec.ts', + 'no-socials.spec.ts', 'siwe-email.spec.ts', 'siwe-sa.spec.ts', + 'siwe.spec.ts', 'smart-account.spec.ts', 'wallet-features.spec.ts', - 'metamask.spec.ts' + 'wallet.spec.ts' ] -const WAGMI_DISABLED_TESTS = ['metamask.spec.ts'] -const ETHERS_DISABLED_TESTS = ['metamask.spec.ts'] -const ETHERS5_DISABLED_TESTS = [ - 'metamask.spec.ts', + +const SINGLE_ADAPTER_SOLANA_TESTS = [ + 'basic-tests.spec.ts', 'email.spec.ts', - 'wallet-features.spec.ts', - 'smart-account.spec.ts', - 'siwe-email.spec.ts', - 'siwe-sa.spec.ts' + 'no-email.spec.ts', + 'no-socials.spec.ts', + 'wallet.spec.ts' ] -const ETHERS_EMAIL_BASED_REGEX = new RegExp(ETHERS_DISABLED_TESTS.join('|'), 'u') -const ETHERS5_EMAIL_BASED_REGEX = new RegExp(ETHERS5_DISABLED_TESTS.join('|'), 'u') -const WAGMI_DISABLED_TESTS_REGEX = new RegExp(WAGMI_DISABLED_TESTS.join('|'), 'u') -const WAGMI_DISABLED_TESTS_REGEX_FF = new RegExp([...WAGMI_DISABLED_TESTS].join('|'), 'u') -const SOLANA_DISABLED_TESTS_REGEX = new RegExp(SOLANA_DISABLED_TESTS.join('|'), 'u') +const SINGLE_ADAPTER_EVM_TESTS_REGEX = new RegExp( + `^(?!.*/multichain/).*(?:${SINGLE_ADAPTER_EVM_TESTS.join('|')})`, + 'u' +) +const SINGLE_ADAPTER_SOLANA_TESTS_REGEX = new RegExp( + `^(?!.*/multichain/).*(?:${SINGLE_ADAPTER_SOLANA_TESTS.join('|')})`, + 'u' +) const customProjectProperties: CustomProjectProperties = { 'Desktop Chrome/ethers': { - testIgnore: ETHERS_EMAIL_BASED_REGEX - }, - 'Desktop Brave/ethers': { - testIgnore: ETHERS_EMAIL_BASED_REGEX, - useOptions: braveOptions + testMatch: SINGLE_ADAPTER_EVM_TESTS_REGEX }, 'Desktop Firefox/ethers': { - testIgnore: ETHERS_EMAIL_BASED_REGEX + testMatch: SINGLE_ADAPTER_EVM_TESTS_REGEX }, 'Desktop Chrome/ethers5': { - testIgnore: ETHERS5_EMAIL_BASED_REGEX - }, - 'Desktop Brave/ethers5': { - testIgnore: ETHERS5_EMAIL_BASED_REGEX, - useOptions: braveOptions + testMatch: SINGLE_ADAPTER_EVM_TESTS_REGEX }, 'Desktop Firefox/ethers5': { - testIgnore: ETHERS5_EMAIL_BASED_REGEX - }, - 'Desktop Brave/wagmi': { - testIgnore: WAGMI_DISABLED_TESTS_REGEX, - useOptions: braveOptions + testMatch: SINGLE_ADAPTER_EVM_TESTS_REGEX }, 'Desktop Chrome/wagmi': { - testIgnore: WAGMI_DISABLED_TESTS_REGEX + testMatch: SINGLE_ADAPTER_EVM_TESTS_REGEX }, 'Desktop Firefox/wagmi': { - testIgnore: WAGMI_DISABLED_TESTS_REGEX_FF + testMatch: SINGLE_ADAPTER_EVM_TESTS_REGEX }, - // Exclude social.spec.ts, email.spec.ts, siwe.spec.ts, and canary.spec.ts from solana, not yet implemented 'Desktop Chrome/solana': { - testIgnore: SOLANA_DISABLED_TESTS_REGEX - }, - 'Desktop Brave/solana': { - useOptions: braveOptions, - testIgnore: SOLANA_DISABLED_TESTS_REGEX + testMatch: SINGLE_ADAPTER_SOLANA_TESTS_REGEX, + testIgnore: 'siwe-email.spec.ts' }, 'Desktop Firefox/solana': { - testIgnore: SOLANA_DISABLED_TESTS_REGEX + testMatch: SINGLE_ADAPTER_SOLANA_TESTS_REGEX, + testIgnore: 'siwe-email.spec.ts' + }, + 'Desktop Firefox/multichain-ethers-solana': { + testMatch: /^.*\/multichain-ethers-.*\.spec\.ts$/u + }, + 'Desktop Firefox/multichain-wagmi-solana': { + testMatch: /^.*\/multichain-wagmi-.*\.spec\.ts$/u + }, + 'Desktop Firefox/multichain-ethers5-solana': { + testMatch: /^.*\/multichain-ethers5-.*\.spec\.ts$/u }, - 'Desktop Safari/solana': { - testIgnore: SOLANA_DISABLED_TESTS_REGEX + 'Desktop Firefox/multichain-basic': { + testMatch: /^.*\/multichain-basic\.spec\.ts$/u + }, + 'Desktop Chrome/multichain-ethers-solana': { + testMatch: /^.*\/multichain-ethers-.*\.spec\.ts$/u + }, + 'Desktop Chrome/multichain-wagmi-solana': { + testMatch: /^.*\/multichain-wagmi-.*\.spec\.ts$/u + }, + 'Desktop Chrome/multichain-ethers5-solana': { + testMatch: /^.*\/multichain-ethers5-.*\.spec\.ts$/u + }, + 'Desktop Chrome/multichain-basic': { + testMatch: /^.*\/multichain-basic\.spec\.ts$/u } } @@ -114,11 +126,10 @@ export interface Permutation { } export function getProjects() { - return PERMUTATIONS.map(({ device, library }) => { - const deviceName = device === 'Desktop Brave' ? 'Desktop Chrome' : device + const libraryProjects = LIBRARY_PERMUTATIONS.map(({ device, library }) => { let project = { name: `${device}/${library}`, - use: { ...devices[deviceName], library }, + use: { ...devices[device], library }, storageState: 'playwright/.auth/user.json' } const props = customProjectProperties[project.name] @@ -131,4 +142,25 @@ export function getProjects() { return project }) + + const multichainProjects = MULTICHAIN_PERMUTATIONS.map(({ device, library }) => { + let project = { + name: `${device}/${library}`, + use: { ...devices[device], library }, + storageState: 'playwright/.auth/user.json' + } + const props = customProjectProperties[project.name] + if (props) { + project = { ...project, ...props } + if (props.useOptions) { + project.use = { ...project.use, ...props.useOptions } + } + } + + return project + }) + + const projects = [...libraryProjects, ...multichainProjects] + + return projects } diff --git a/apps/laboratory/tests/shared/utils/test-status b/apps/laboratory/tests/shared/utils/test-status new file mode 100644 index 0000000000..795c6c0cbc --- /dev/null +++ b/apps/laboratory/tests/shared/utils/test-status @@ -0,0 +1,46 @@ +Single Adapters + +Wallet (QR code) +- โœ… Wagmi +- โœ… Ethers +- โœ… Ethers5 +- โœ… Solana + +SIWE +- โœ… Wagmi +- โœ… Ethers +- โœ… Ethers5 + +Email +- โœ… Wagmi +- โœ… Ethers +- โœ… Ethers5 + +Email SIWE +- โœ… Wagmi +- โœ… Ethers +- โœ… Ethers5 + +Multiple Adapters + +Wallet (QR code): Connecting with UPA; switching between different namespaces and signing messages +- โœ… Ethers + Solana +- โœ… Ethers5 + Solana +- โœ… Wagmi + Solana + +Email: Connecting with auth provider; switching between different namespaces and signing messages +- โœ… Ethers + Solana +- โœ… Ethers5 + Solana +- โœ… Wagmi + Solana + +SIWE: Connecting with UPA; switching between different namespaces and signing messages & SIWE messages +- โœ… Ethers + Solana +- โœ… Ethers5 + Solana +- โœ… Wagmi + Solana + +Email SIWE: Connecting with auth provider; switching between different namespaces and signing messages & SIWE messages +- โœ… Ethers + Solana +- โœ… Ethers5 + Solana +- โœ… Wagmi + Solana โš ๏ธ After switching to Solana, it closes the modal instead going back, somethings is off, handled differently on tests + + diff --git a/apps/laboratory/tests/shared/validators/ModalValidator.ts b/apps/laboratory/tests/shared/validators/ModalValidator.ts index 260f1ca1ff..23eb041ecf 100644 --- a/apps/laboratory/tests/shared/validators/ModalValidator.ts +++ b/apps/laboratory/tests/shared/validators/ModalValidator.ts @@ -23,6 +23,13 @@ export class ModalValidator { await this.page.waitForTimeout(500) } + async expectBalanceFetched(currency: 'SOL' | 'ETH') { + const accountButton = this.page.locator('w3m-account-button') + await expect(accountButton, `Account button should show balance as ${currency}`).toContainText( + `0.000 ${currency}` + ) + } + async expectAuthenticated() { await expect( this.page.getByTestId('w3m-authentication-status'), @@ -92,9 +99,18 @@ export class ModalValidator { } async expectSwitchedNetwork(network: string) { - const switchNetworkButton = this.page.getByTestId('w3m-account-select-network') + const switchNetworkButton = this.page.getByTestId(`w3m-network-switch-${network}`) await expect(switchNetworkButton).toBeVisible() - await expect(switchNetworkButton).toHaveAttribute('active-network', network) + } + + async expectSwitchChainView(chainName: string) { + const title = this.page.getByTestId(`w3m-switch-active-chain-to-${chainName}`) + await expect(title).toBeVisible() + } + + async expectSwitchedNetworkOnNetworksView(name: string) { + const networkOptions = this.page.getByTestId(`w3m-network-switch-${name}`) + await expect(networkOptions.locator('wui-icon')).toBeVisible() } expectSecureSiteFrameNotInjected() { @@ -186,8 +202,8 @@ export class ModalValidator { } async expectNetworksDisabled(name: string) { - const networkOptions = this.page.getByTestId(`w3m-network-switch-${name}`) - await expect(networkOptions).toBeDisabled() + const disabledNetwork = this.page.getByTestId(`w3m-network-switch-${name}`) + await expect(disabledNetwork.locator('button')).toBeDisabled() } async expectConnectButtonLoading() { @@ -204,4 +220,9 @@ export class ModalValidator { const socials = this.page.getByTestId('w3m-social-login-widget') await expect(socials).toBeVisible() } + + async expectModalNotVisible() { + const modal = this.page.getByTestId('w3m-modal') + await expect(modal).toBeHidden() + } } diff --git a/apps/laboratory/tests/shared/validators/ModalWalletValidator.ts b/apps/laboratory/tests/shared/validators/ModalWalletValidator.ts index 579f28d821..b9a93e1383 100644 --- a/apps/laboratory/tests/shared/validators/ModalWalletValidator.ts +++ b/apps/laboratory/tests/shared/validators/ModalWalletValidator.ts @@ -36,18 +36,23 @@ export class ModalWalletValidator extends ModalValidator { await expect(this.page.getByTestId('w3m-address')).not.toHaveText(previousAddress) } - override async expectSwitchedNetwork(network: string) { - const switchNetworkButton = this.page.getByTestId('account-switch-network-button') - await expect(switchNetworkButton).toBeVisible() - await expect(switchNetworkButton, `Switched network should include ${network}`).toContainText( - network - ) - } - async expectCallStatusPending() { const closeButton = this.page.locator('#toast-close-button') await expect(closeButton).toBeVisible() await closeButton.click() } + + async expectReceivedSign({ chainName = 'Ethereum' }) { + await expect( + this.page.getByText('Approve Transaction'), + 'Approve Transaction text should be visible' + ).toBeVisible({ + timeout: 10_000 + }) + expect( + this.page.getByText(chainName), + `${chainName} should be visible on approve transaction page` + ).toBeTruthy() + } } diff --git a/apps/laboratory/tests/shared/validators/WalletValidator.ts b/apps/laboratory/tests/shared/validators/WalletValidator.ts index e2cb23ea4e..91d327f721 100644 --- a/apps/laboratory/tests/shared/validators/WalletValidator.ts +++ b/apps/laboratory/tests/shared/validators/WalletValidator.ts @@ -22,16 +22,25 @@ export class WalletValidator { 'Approve screen should be closed and sessions tab visible' ).toBeVisible() await this.gotoSessions.click() - await this.expectSessionCard() + await this.expectSessionCard({ visible: true }) } - async expectSessionCard() { - await expect( - this.page.getByTestId('session-card'), - 'Session card should be visible' - ).toBeVisible({ - timeout: MAX_WAIT - }) + async expectSessionCard({ visible = true }: { visible?: boolean }) { + if (visible) { + await expect( + this.page.getByTestId('session-card'), + 'Session card should be visible' + ).toBeVisible({ + timeout: MAX_WAIT + }) + } else { + await expect( + this.page.getByTestId('session-card'), + 'Session card should not be visible' + ).not.toBeVisible({ + timeout: MAX_WAIT + }) + } } async expectDisconnected() { diff --git a/apps/laboratory/tests/siwe-email.spec.ts b/apps/laboratory/tests/siwe-email.spec.ts index f8f8db8823..dc516d1660 100644 --- a/apps/laboratory/tests/siwe-email.spec.ts +++ b/apps/laboratory/tests/siwe-email.spec.ts @@ -22,7 +22,7 @@ emailSiweTest.beforeAll(async ({ browser, library }) => { context = await browser.newContext() const browserPage = await context.newPage() - page = new ModalWalletPage(browserPage, library, 'all') + page = new ModalWalletPage(browserPage, library, 'siwe') validator = new ModalWalletValidator(browserPage) await page.load() @@ -67,23 +67,19 @@ emailSiweTest('it should reject sign', async () => { emailSiweTest('it should switch network and sign', async () => { let targetChain = 'Polygon' - await page.goToSettings() await page.switchNetwork(targetChain) await page.promptSiwe() await page.approveSign() - await validator.expectSwitchedNetwork(targetChain) - await page.closeModal() + await page.sign() await page.approveSign() await validator.expectAcceptedSign() targetChain = 'Ethereum' - await page.goToSettings() await page.switchNetwork(targetChain) await page.promptSiwe() await page.approveSign() - await validator.expectSwitchedNetwork(targetChain) - await page.closeModal() + await page.sign() await page.approveSign() await validator.expectAcceptedSign() diff --git a/apps/laboratory/tests/siwe-sa.spec.ts b/apps/laboratory/tests/siwe-sa.spec.ts index 4def107de1..0fe55ee16f 100644 --- a/apps/laboratory/tests/siwe-sa.spec.ts +++ b/apps/laboratory/tests/siwe-sa.spec.ts @@ -66,44 +66,31 @@ smartAccountSiweTest('it should upgrade wallet', async () => { smartAccountSiweTest('it should switch to a smart account enabled network and sign', async () => { const targetChain = 'Sepolia' - await page.goToSettings() await page.switchNetwork(targetChain) await page.promptSiwe() await page.approveSign() - await validator.expectSwitchedNetwork(targetChain) - await page.closeModal() + await page.sign() await page.approveSign() await validator.expectAcceptedSign() }) -/** - * After switching to Etherum, the signing the SIWE throws the following Magic error: - * "Magic RPC Error: [-32603] Internal error: User denied signing." - */ -smartAccountSiweTest.skip( - 'it should switch to a not enabled network and sign with EOA', - async () => { - const targetChain = 'Ethereum' - await page.goToSettings() - await page.switchNetwork(targetChain) - /* - * Flaky as network switch to non-enabled network changes network AND address causing 2 siwe popups - * Test goes too fast and the second siwe popup is not handled - */ - await page.page.waitForTimeout(1000) - await page.promptSiwe() - await page.approveSign() - await validator.expectSwitchedNetwork(targetChain) - // Shouldn't show the toggle on a non enabled network - await validator.expectTogglePreferredTypeVisible(false) - await page.closeModal() - - await page.sign() - await page.approveSign() - await validator.expectAcceptedSign() - } -) +smartAccountSiweTest('it should switch to a not enabled network and sign with EOA', async () => { + const targetChain = 'Ethereum' + await page.switchNetwork(targetChain) + await page.page.waitForTimeout(1000) + await page.promptSiwe() + await page.approveSign() + + await page.openAccount() + // Shouldn't show the toggle on a non enabled network + await validator.expectTogglePreferredTypeVisible(false) + await page.closeModal() + + await page.sign() + await page.approveSign() + await validator.expectAcceptedSign() +}) smartAccountSiweTest('it should disconnect correctly', async () => { await page.goToSettings() diff --git a/apps/laboratory/tests/siwe.spec.ts b/apps/laboratory/tests/siwe.spec.ts index e2025b14a5..f4c98f7c4d 100644 --- a/apps/laboratory/tests/siwe.spec.ts +++ b/apps/laboratory/tests/siwe.spec.ts @@ -1,13 +1,16 @@ -import { test, type BrowserContext } from '@playwright/test' +import { test, type BrowserContext, type Page } from '@playwright/test' import { ModalPage } from './shared/pages/ModalPage' import { WalletPage } from './shared/pages/WalletPage' import { ModalValidator } from './shared/validators/ModalValidator' +import { WalletValidator } from './shared/validators/WalletValidator' /* eslint-disable init-declarations */ let modalPage: ModalPage let modalValidator: ModalValidator let walletPage: WalletPage +let walletValidator: WalletValidator let context: BrowserContext +let browserPage: Page /* eslint-enable init-declarations */ // -- Setup -------------------------------------------------------------------- @@ -19,15 +22,14 @@ siweWalletTest.describe.configure({ mode: 'serial' }) siweWalletTest.beforeAll(async ({ browser, library }) => { context = await browser.newContext() - const browserPage = await context.newPage() + browserPage = await context.newPage() - modalPage = new ModalPage(browserPage, library, 'all') + modalPage = new ModalPage(browserPage, library, 'siwe') walletPage = new WalletPage(await context.newPage()) + walletValidator = new WalletValidator(walletPage.page) modalValidator = new ModalValidator(browserPage) await modalPage.load() - await modalPage.qrCodeFlow(modalPage, walletPage) - await modalValidator.expectConnected() }) siweWalletTest.afterAll(async () => { @@ -36,20 +38,42 @@ siweWalletTest.afterAll(async () => { // -- Tests -------------------------------------------------------------------- siweWalletTest('it should be authenticated', async () => { + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() await modalValidator.expectAuthenticated() }) siweWalletTest('it should require re-authentication when switching networks', async () => { - await modalPage.switchNetwork('Polygon') + await modalPage.switchNetwork('ZkSync') await modalValidator.expectUnauthenticated() await modalPage.promptSiwe() await walletPage.handleRequest({ accept: true }) await modalValidator.expectAuthenticated() - await modalValidator.expectAccountPageVisible() - await modalPage.closeModal() +}) + +siweWalletTest('it should disconnect when cancel siwe from AppKit', async () => { + await modalPage.switchNetwork('Ethereum') + await modalValidator.expectUnauthenticated() + await modalPage.cancelSiwe() + await modalValidator.expectDisconnected() + await modalValidator.expectUnauthenticated() + await walletValidator.expectSessionCard({ visible: false }) +}) + +// WARNING: refreshing on wagmi-siwe doesn't auto connect +siweWalletTest.skip('it should be authenticated when refresh page', async () => { + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() + await modalPage.page.reload() + await modalValidator.expectConnected() + await modalValidator.expectAuthenticated() }) siweWalletTest('it should be unauthenticated when disconnect', async () => { + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() await modalPage.disconnect() + await modalValidator.expectDisconnected() await modalValidator.expectUnauthenticated() + await walletValidator.expectSessionCard({ visible: false }) }) diff --git a/apps/laboratory/tests/smart-account.spec.ts b/apps/laboratory/tests/smart-account.spec.ts index 15f4bd2be1..ba10bea139 100644 --- a/apps/laboratory/tests/smart-account.spec.ts +++ b/apps/laboratory/tests/smart-account.spec.ts @@ -70,9 +70,11 @@ smartAccountTest('it should sign with smart account 6492 signature', async () => smartAccountTest('it should switch to a not enabled network and sign with EOA', async () => { const targetChain = 'Ethereum' - await page.goToSettings() await page.switchNetwork(targetChain) await validator.expectSwitchedNetwork(targetChain) + await page.closeModal() + + await page.goToSettings() await validator.expectTogglePreferredTypeVisible(false) await page.closeModal() @@ -83,9 +85,11 @@ smartAccountTest('it should switch to a not enabled network and sign with EOA', smartAccountTest('it should switch to smart account and sign', async () => { const targetChain = 'Polygon' - await page.goToSettings() await page.switchNetwork(targetChain) await validator.expectSwitchedNetwork(targetChain) + await page.closeModal() + + await page.goToSettings() await page.togglePreferredAccountType() await validator.expectChangePreferredAccountToShow(EOA) await page.closeModal() diff --git a/apps/laboratory/tests/wallet-features.spec.ts b/apps/laboratory/tests/wallet-features.spec.ts index 6226e74cb7..e7482d9bb3 100644 --- a/apps/laboratory/tests/wallet-features.spec.ts +++ b/apps/laboratory/tests/wallet-features.spec.ts @@ -67,9 +67,6 @@ walletFeaturesTest('it should initialize onramp as expected', async () => { walletFeaturesTest('it should find account name as expected', async () => { await page.goToSettings() - await page.switchNetwork('Polygon') - await validator.expectSwitchedNetwork('Polygon') - await page.openChooseNameIntro() await page.openChooseName() await page.typeName('test-ens-check') diff --git a/apps/laboratory/tests/wallet.spec.ts b/apps/laboratory/tests/wallet.spec.ts index ffbcb5659b..7e22d70590 100644 --- a/apps/laboratory/tests/wallet.spec.ts +++ b/apps/laboratory/tests/wallet.spec.ts @@ -39,6 +39,19 @@ sampleWalletTest.afterAll(async () => { }) // -- Tests -------------------------------------------------------------------- +sampleWalletTest('it should fetch balance as expected', async ({ library }) => { + await modalValidator.expectBalanceFetched(library === 'solana' ? 'SOL' : 'ETH') +}) + +sampleWalletTest.skip('it should show disabled networks', async ({ library }) => { + const disabledNetworks = library === 'solana' ? 'Solana Unsupported' : 'Arbitrum' + + await modalPage.openModal() + await modalPage.openNetworks() + await modalValidator.expectNetworksDisabled(disabledNetworks) + await modalPage.closeModal() +}) + sampleWalletTest('it should switch networks and sign', async ({ library }) => { const chains = library === 'solana' ? ['Solana Testnet', 'Solana'] : ['Polygon', 'Ethereum'] @@ -77,8 +90,8 @@ sampleWalletTest('it should reject sign', async ({ library }) => { }) sampleWalletTest('it should switch between multiple accounts', async ({ library }) => { - // Multi address not available in Solana wallet and wagmi does not allow programatic account switching - if (library === 'solana' || library === 'wagmi') { + // Multi address not available in Solana wallet + if (library === 'solana') { return } const originalAddress = await modalPage.getAddress() @@ -93,6 +106,7 @@ sampleWalletTest('it should show multiple accounts', async ({ library }) => { if (library === 'solana') { return } + await modalPage.openAccount() await modalPage.openProfileView() await modalValidator.expectMultipleAccounts() @@ -105,6 +119,7 @@ sampleWalletTest( if (library === 'solana') { return } + await walletPage.enableTestnets() await walletPage.switchNetwork('eip155:5') await modalValidator.expectNetworkNotSupportedVisible() @@ -118,7 +133,17 @@ sampleWalletTest('it should not show onramp button accordingly', async ({ librar await modalPage.closeModal() }) +sampleWalletTest('it should disconnect and close modal when connecting from wallet', async () => { + await modalPage.openModal() + await walletPage.disconnectConnection() + await walletValidator.expectSessionCard({ visible: false }) + await modalValidator.expectModalNotVisible() + await walletPage.page.waitForTimeout(500) +}) + sampleWalletTest('it should disconnect as expected', async () => { + await modalPage.qrCodeFlow(modalPage, walletPage) + await modalValidator.expectConnected() await modalPage.disconnect() await modalValidator.expectDisconnected() }) diff --git a/dangerfile.ts b/dangerfile.ts index c0de08ef16..c900d5b0e0 100644 --- a/dangerfile.ts +++ b/dangerfile.ts @@ -1,7 +1,5 @@ /* eslint-disable no-await-in-loop */ import { danger, fail, message, warn } from 'danger' -import corePackageJson from './packages/core/package.json' assert { type: 'json' } -import { ConstantsUtil } from './packages/scaffold-utils/src/ConstantsUtil' // -- Constants --------------------------------------------------------------- const TYPE_COMMENT = `// -- Types --------------------------------------------- //` @@ -10,11 +8,10 @@ const CONTROLLER_COMMENT = `// -- Controller ----------------------------------- const RENDER_COMMENT = `// -- Render -------------------------------------------- //` const STATE_PROPERTIES_COMMENT = `// -- State & Properties -------------------------------- //` const PRIVATE_COMMENT = `// -- Private ------------------------------------------- //` -const PACKAGE_VERSION = ConstantsUtil.VERSION const RELATIVE_IMPORT_SAME_DIR = `'./` const RELATIVE_IMPORT_PARENT_DIR = `'../` const RELATIVE_IMPORT_EXTENSION = `.js'` -const PRIVATE_FUNCTION_REGEX = /private\s+(\w+)\s*\(\s*\)/g +const PRIVATE_FUNCTION_REGEX = /private\s+(?:\w+)\s*\(\s*\)/gu // -- Data -------------------------------------------------------------------- const { modified_files, created_files, deleted_files, diffForFile } = danger.git @@ -73,8 +70,8 @@ async function checkUiPackage() { fail(`${f} is using @state decorator, which is not allowed in ui package`) } - if (diff?.added.includes('import @web3modal/core')) { - fail(`${f} is importing @web3modal/core, which is not allowed in ui package`) + if (diff?.added.includes('import @reown/appkit-core')) { + fail(`${f} is importing @reown/appkit-core, which is not allowed in ui package`) } if (!diff?.added.includes(RENDER_COMMENT) && diff?.added.includes('render()')) { @@ -97,7 +94,7 @@ async function checkUiPackage() { fail(`${f} is a ui element, but does not define wui- prefix`) } - if (diff?.added.includes('@web3modal/ui/')) { + if (diff?.added.includes('@reown/appkit-ui/')) { fail(`${f} should use relative imports instead of direct package access`) } } @@ -192,8 +189,8 @@ async function checkCorePackage() { for (const f of created_core_controllers) { const diff = await diffForFile(f) - if (diff?.added.includes('import @web3modal/ui')) { - fail(`${f} is importing @web3modal/ui, which is not allowed in core package`) + if (diff?.added.includes('import @reown/appkit-ui')) { + fail(`${f} is importing @reown/appkit-ui, which is not allowed in core package`) } if (!diff?.added.includes(TYPE_COMMENT)) { @@ -212,7 +209,7 @@ async function checkCorePackage() { fail(`${f} is using this.state, use just state`) } - if (diff?.added.includes('@web3modal/core/')) { + if (diff?.added.includes('@reown/appkit-core/')) { fail(`${f} should use relative imports instead of direct package access`) } @@ -273,9 +270,9 @@ async function checkScaffoldHtmlPackage() { } if ( - diff?.added.includes('@web3modal/core/') || - diff?.added.includes('@web3modal/ui/') || - diff?.added.includes('@web3modal/scaffold/') + diff?.added.includes('@reown/appkit-core/') || + diff?.added.includes('@reown/appkit-ui/') || + diff?.added.includes('@reown/scaffold/') ) { fail(`${f} should use relative imports instead of direct package access`) } @@ -301,18 +298,18 @@ function containsRelativeImportWithoutJSExtension(addition: string | undefined) } async function checkClientPackages() { const client_files = modified_files.filter(f => - /\/packages\/(wagmi|solana|ethers|ethers5)\//.test(f) + /\/packages\/(?:wagmi|solana|ethers|ethers5)\//u.test(f) ) for (const f of client_files) { const diff = await diffForFile(f) - if (diff?.added.includes("from '@web3modal/core")) { - fail(`${f} is not allowed to import from @web3modal/core`) + if (diff?.added.includes("from '@reown/appkit-core")) { + fail(`${f} is not allowed to import from @reown/appkit-core`) } - if (diff?.added.includes("from '@web3modal/ui")) { - fail(`${f} is not allowed to import from @web3modal/ui`) + if (diff?.added.includes("from '@reown/appkit-ui")) { + fail(`${f} is not allowed to import from @reown/appkit-ui`) } if (containsRelativeImportWithoutJSExtension(diff?.added)) { @@ -322,14 +319,6 @@ async function checkClientPackages() { } checkClientPackages() -// -- Check sdkVersion ------------------------------------------------------------ -function checkSdkVersion() { - if (PACKAGE_VERSION !== corePackageJson.version) { - fail(`VERSION in utils/constants doesn't match core package.json version`) - } -} -checkSdkVersion() - // -- Check wallet ------------------------------------------------------------ async function checkWallet() { diff --git a/examples/html-ethers/CHANGELOG.md b/examples/html-ethers/CHANGELOG.md index 05a754c887..f6e33d4907 100644 --- a/examples/html-ethers/CHANGELOG.md +++ b/examples/html-ethers/CHANGELOG.md @@ -1,743 +1,63 @@ -# @examples/html-ethers5 +# @examples/html-ethers -## 5.1.7 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/ethers@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.6 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-ethers@1.0.1 + - @reown/appkit@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/ethers@5.1.7 - -## 5.1.5 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/ethers@5.1.6 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/ethers5@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/ethers5@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/ethers5@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/ethers5@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/ethers5@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/ethers5@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 - - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/ethers5@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/ethers5@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/ethers5@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/ethers5@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/ethers5@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/ethers5@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/ethers5@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/ethers5@5.0.1 - -## 5.0.0 - -### Major Changes - -- Release V5 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@5.0.0 - -## 5.0.0-cn-v5.0 +## 1.0.0 ### Major Changes -- Test V5 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@5.0.0-cn-v5.0 - -## 4.2.3 - -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/ethers5@4.2.3 - -## 4.2.3-alpha.0 - -### Patch Changes - -- feat: add support for coinbase smart accounts - -- Updated dependencies []: - - @web3modal/ethers5@4.2.3-alpha.0 - -## 4.2.2 - -### Patch Changes - -- feat: social login refactor. wagmi sendCalls support. refactor theme variables - -- Updated dependencies []: - - @web3modal/ethers5@4.2.2 - -## 4.2.1 - -### Patch Changes - -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/ethers5@4.2.1 - -## 4.2.0 - -### Patch Changes - -- release: 4.2.0 version release - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0 - -## 4.2.0-alpha.0 - -### Patch Changes - -- feat: 4.2.0-alpha release - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-alpha.0 - -## 4.2.0-03e4f4a8.2 - -### Patch Changes - -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-03e4f4a8.2 - -## 4.2.0-448f7f4.1 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-448f7f4.1 - -## 4.1.12-910a844.0 - -### Patch Changes - -- refactor: sync theme with secure site - -- Updated dependencies []: - - @web3modal/ethers5@4.1.12-910a844.0 - -## 4.1.11 - -### Patch Changes - -- refactor: Solana exported helper methods and proram instruction improvements -- refactor: email and smart account improvements -- refactor: unit test CI check improvements -- feat: convert - -- Updated dependencies []: - - @web3modal/ethers5@4.1.11 - -## 4.1.10 - -### Patch Changes - -- Fix activity list styling issue - -- Updated dependencies []: - - @web3modal/ethers5@4.1.10 - -## 4.1.9 - -### Patch Changes - -- Blockchain API fix - -- Updated dependencies []: - - @web3modal/ethers5@4.1.9 - -## 4.1.8 - -### Patch Changes - -- Hotfix for redundant tokenbalance calls - -- Updated dependencies []: - - @web3modal/ethers5@4.1.8 - -## 4.1.7 - -### Patch Changes - -- Hotfix for inccorect state of w3m-button when email is enabled - -- Updated dependencies []: - - @web3modal/ethers5@4.1.7 - -## 4.1.6 - -### Patch Changes - -- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site. - -- Updated dependencies []: - - @web3modal/ethers5@4.1.6 - -## 4.1.6-a0733f5.0 - -### Patch Changes - -- chore: canary release for siwe dependency - -- Updated dependencies []: - - @web3modal/ethers@4.1.6-a0733f5.0 - - @web3modal/siwe@4.1.6-a0733f5.0 - - @web3modal/solana@4.1.6-a0733f5.0 - - @web3modal/wagmi@4.1.6-a0733f5.0 - -## 4.1.5 - -### Patch Changes - -- release: v4.1.5 - -- Updated dependencies []: - - @web3modal/ethers5@4.1.5 - -## 4.1.5-93c81127.0 - -### Patch Changes - -- fix: polyfill process in wallet package - -- Updated dependencies []: - - @web3modal/ethers5@4.1.5-93c81127.0 - -## 4.1.4 - -### Patch Changes - -- feat: wallet info hook - -- Updated dependencies []: - - @web3modal/ethers5@4.1.4 - -## 4.1.3 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- feat: wallet info hook - -- feat: reset version to 4.1.3 - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3 - -## 4.1.3-5f2ae345.1 - -### Patch Changes - -- canary: test imports - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3-5f2ae345.1 - -## 4.1.3-8e039e.0 - -### Patch Changes +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -- feat: update optional dependencies +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -- Updated dependencies []: - - @web3modal/ethers5@4.1.3-8e039e.0 +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-ethers@1.0.0 + - @reown/appkit@1.0.0 -## 4.1.2 +## 0.0.5 ### Patch Changes -- 4.1.2 release +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -- Updated dependencies []: - - @web3modal/ethers5@4.1.2 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -## 4.2.0-4b5257b4.1 +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -### Minor Changes +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit@0.0.5 + - @reown/appkit-adapter-ethers@0.0.5 -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436) Thanks [@enesozturk](https://github.com/enesozturk)! - refactor: add missing extensions on imports - -- feat: export solana chains from the solana package - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07) Thanks [@enesozturk](https://github.com/enesozturk)! - chore: new solana canary release - -### Patch Changes - -- Updated dependencies [[`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436), [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07)]: - - @web3modal/ethers5@4.2.0-4b5257b4.1 - -## 4.2.0-dbbd8c44.0 - -### Minor Changes - -- refactor: add missing extensions on imports +## 0.0.4 ### Patch Changes -- Updated dependencies []: - - @web3modal/ui@4.2.0-dbbd8c44.0 - - @web3modal/common@4.2.0-dbbd8c44.0 +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -## 4.2.0-500a38.0 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-ethers@0.0.4 + - @reown/appkit@0.0.4 -### Minor Changes - -- feat: solana integration +## 0.0.3 ### Patch Changes -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-500a38.0 - -## 4.1.1 - -### Patch Changes - -- Fix siwe version - -- Updated dependencies []: - - @web3modal/ethers5@4.1.1 - -## 4.1.0 - -### Minor Changes - -- Email Stable release - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.1.0 - -## 4.0.13 - -### Patch Changes - -- Fix secure site url - -- Updated dependencies []: - - @web3modal/ethers5@4.0.13 - -## 4.0.12 - -### Patch Changes - -- [#2014](https://github.com/WalletConnect/web3modal/pull/2014) [`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0) Thanks [@tomiir](https://github.com/tomiir)! - Smart Account RPC handler canary - -- Smart Account initialization and feature flag - -- Updated dependencies [[`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0)]: - - @web3modal/ethers5@4.0.12 - -## 4.0.12-0c59f84f.0 - -### Patch Changes - -- Smart Account RPC handler canary - -- Updated dependencies []: - - @web3modal/ethers5@4.0.12-0c59f84f.0 - -## 4.0.11 - -### Patch Changes - -- Analytics connection event improvements. Unsupported chain flag. Siwe package refactor. RPC improvements. UI improvements' - -- Updated dependencies []: - - @web3modal/ethers5@4.0.11 - -## 4.0.10 - -### Patch Changes - -- Add error state to wui-chip composite - -- Updated dependencies []: - - @web3modal/ethers5@4.0.10 - -## 4.0.9 - -### Patch Changes - -- Add all rpc methods + auto reject when modal closes - -- Updated dependencies []: - - @web3modal/ethers5@4.0.9 - -## 4.0.8 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8)]: - - @web3modal/ethers5@4.0.8 - -## 4.0.8-f1845392.0 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54)]: - - @web3modal/ethers5@4.0.8-f1845392.0 - -## 4.0.7 - -### Patch Changes - -- Add eth_getBalance to list of allowed methods - -- Updated dependencies []: - - @web3modal/ethers5@4.0.7 - -## 4.0.6 - -### Patch Changes - -- Email stability fixes - -- Updated dependencies []: - - @web3modal/ethers5@4.0.6 - -## 4.0.5 - -### Patch Changes - -- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks - -- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]: - - @web3modal/ethers5@4.0.5 - -## 4.0.4 - -### Patch Changes - -- Fix theming issue for email - -- Updated dependencies []: - - @web3modal/ethers5@4.0.4 - -## 4.0.3 - -### Patch Changes - -- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants - -- Updated dependencies []: - - @web3modal/ethers5@4.0.3 - -## 4.0.2 - -### Patch Changes - -- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view - -- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]: - - @web3modal/ethers5@4.0.2 - -## 4.0.1 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]: - - @web3modal/ethers5@4.0.1 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-ethers@0.0.3 + - @reown/appkit@0.0.3 diff --git a/examples/html-ethers/package.json b/examples/html-ethers/package.json index c3ab3e3994..306652c74b 100644 --- a/examples/html-ethers/package.json +++ b/examples/html-ethers/package.json @@ -1,13 +1,14 @@ { "name": "@examples/html-ethers", "private": true, - "version": "5.1.7", + "version": "1.0.1", "scripts": { "dev": "vite --port 3011", "build": "vite build" }, "dependencies": { - "@web3modal/ethers": "workspace:*", + "@reown/appkit-adapter-ethers": "workspace:*", + "@reown/appkit": "workspace:*", "ethers": "6.13.2" }, "devDependencies": { diff --git a/examples/html-ethers/src/main.js b/examples/html-ethers/src/main.js index ec848ba013..a463ed6a29 100644 --- a/examples/html-ethers/src/main.js +++ b/examples/html-ethers/src/main.js @@ -1,4 +1,6 @@ -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers' +import { arbitrum, mainnet, optimism, polygon, zkSync, sepolia } from '@reown/appkit/networks' +import { createAppKit } from '@reown/appkit' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' // @ts-expect-error 1. Get projectId const projectId = import.meta.env.VITE_PROJECT_ID @@ -6,51 +8,17 @@ if (!projectId) { throw new Error('VITE_PROJECT_ID is not set') } -function getBlockchainApiRpcUrl(chainId) { - return `https://rpc.walletconnect.org/v1/?chainId=eip155:${chainId}&projectId=${projectId}` -} - -// 2. Create wagmiConfig -const chains = [ - { - chainId: 1, - name: 'Ethereum', - currency: 'ETH', - explorerUrl: 'https://etherscan.io', - rpcUrl: getBlockchainApiRpcUrl(1) - }, - { - chainId: 42161, - name: 'Arbitrum', - currency: 'ETH', - explorerUrl: 'https://arbiscan.io', - rpcUrl: getBlockchainApiRpcUrl(42161) - } -] - -const metadata = { - name: 'AppKit', - description: 'AppKit HTML + Ethers Example', - url: 'https://lab.web3modal.com', - icons: ['https://avatars.githubusercontent.com/u/37784886'] -} - -const ethersConfig = defaultConfig({ - metadata, - chains, - defaultChainId: 1 -}) +// Create adapter +const ethersAdapter = new EthersAdapter() -// 3. Create modal -const modal = createWeb3Modal({ - ethersConfig: { ...ethersConfig, email: true }, - projectId, - metadata, - chains, - themeMode: 'light' +// Instantiate AppKit +const modal = createAppKit({ + adapters: [ethersAdapter], + networks: [mainnet, optimism, polygon, zkSync, arbitrum, sepolia], + projectId }) -// 4. Trigger modal programaticaly +// Trigger modal programaticaly const openConnectModalBtn = document.getElementById('open-connect-modal') const openNetworkModalBtn = document.getElementById('open-network-modal') diff --git a/examples/html-ethers5/CHANGELOG.md b/examples/html-ethers5/CHANGELOG.md index 6252732ece..73677ecb3c 100644 --- a/examples/html-ethers5/CHANGELOG.md +++ b/examples/html-ethers5/CHANGELOG.md @@ -1,758 +1,63 @@ # @examples/html-ethers5 -## 5.1.8 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/ethers5@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.7 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-ethers5@1.0.1 + - @reown/appkit@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/ethers5@5.1.7 - -## 5.1.6 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/ethers5@5.1.6 - -## 5.1.5 - -### Patch Changes - -- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770 - - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771 - - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772 - - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776 - - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768 - - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779 - - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780 - -- Updated dependencies []: - - @web3modal/ethers5@5.1.5 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/ethers5@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/ethers5@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/ethers5@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/ethers5@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/ethers5@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/ethers5@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 - - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/ethers5@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/ethers5@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/ethers5@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/ethers5@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/ethers5@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/ethers5@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/ethers5@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/ethers5@5.0.1 - -## 5.0.0 +## 1.0.0 ### Major Changes -- Release V5 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- Updated dependencies []: - - @web3modal/ethers5@5.0.0 +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -## 5.0.0-cn-v5.0 +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -### Major Changes +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-ethers5@1.0.0 + - @reown/appkit@1.0.0 -- Test V5 +## 0.0.5 ### Patch Changes -- Updated dependencies []: - - @web3modal/ethers5@5.0.0-cn-v5.0 +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -## 4.2.3 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/ethers5@4.2.3 - -## 4.2.3-alpha.0 - -### Patch Changes - -- feat: add support for coinbase smart accounts +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -- Updated dependencies []: - - @web3modal/ethers5@4.2.3-alpha.0 +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit@0.0.5 + - @reown/appkit-adapter-ethers5@0.0.5 -## 4.2.2 +## 0.0.4 ### Patch Changes -- feat: social login refactor. wagmi sendCalls support. refactor theme variables +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -- Updated dependencies []: - - @web3modal/ethers5@4.2.2 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-ethers5@0.0.4 + - @reown/appkit@0.0.4 -## 4.2.1 +## 0.0.3 ### Patch Changes -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/ethers5@4.2.1 - -## 4.2.0 - -### Patch Changes - -- release: 4.2.0 version release - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0 - -## 4.2.0-alpha.0 - -### Patch Changes - -- feat: 4.2.0-alpha release - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-alpha.0 - -## 4.2.0-03e4f4a8.2 - -### Patch Changes - -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-03e4f4a8.2 - -## 4.2.0-448f7f4.1 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-448f7f4.1 - -## 4.1.12-910a844.0 - -### Patch Changes - -- refactor: sync theme with secure site - -- Updated dependencies []: - - @web3modal/ethers5@4.1.12-910a844.0 - -## 4.1.11 - -### Patch Changes - -- refactor: Solana exported helper methods and proram instruction improvements -- refactor: email and smart account improvements -- refactor: unit test CI check improvements -- feat: convert - -- Updated dependencies []: - - @web3modal/ethers5@4.1.11 - -## 4.1.10 - -### Patch Changes - -- Fix activity list styling issue - -- Updated dependencies []: - - @web3modal/ethers5@4.1.10 - -## 4.1.9 - -### Patch Changes - -- Blockchain API fix - -- Updated dependencies []: - - @web3modal/ethers5@4.1.9 - -## 4.1.8 - -### Patch Changes - -- Hotfix for redundant tokenbalance calls - -- Updated dependencies []: - - @web3modal/ethers5@4.1.8 - -## 4.1.7 - -### Patch Changes - -- Hotfix for inccorect state of w3m-button when email is enabled - -- Updated dependencies []: - - @web3modal/ethers5@4.1.7 - -## 4.1.6 - -### Patch Changes - -- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site. - -- Updated dependencies []: - - @web3modal/ethers5@4.1.6 - -## 4.1.6-a0733f5.0 - -### Patch Changes - -- chore: canary release for siwe dependency - -- Updated dependencies []: - - @web3modal/ethers@4.1.6-a0733f5.0 - - @web3modal/siwe@4.1.6-a0733f5.0 - - @web3modal/solana@4.1.6-a0733f5.0 - - @web3modal/wagmi@4.1.6-a0733f5.0 - -## 4.1.5 - -### Patch Changes - -- release: v4.1.5 - -- Updated dependencies []: - - @web3modal/ethers5@4.1.5 - -## 4.1.5-93c81127.0 - -### Patch Changes - -- fix: polyfill process in wallet package - -- Updated dependencies []: - - @web3modal/ethers5@4.1.5-93c81127.0 - -## 4.1.4 - -### Patch Changes - -- feat: wallet info hook - -- Updated dependencies []: - - @web3modal/ethers5@4.1.4 - -## 4.1.3 - -### Patch Changes - -- feat: wallet info hook - -- feat: reset version to 4.1.3 - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3 - -## 4.1.3-5f2ae345.1 - -### Patch Changes - -- canary: test imports - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3-5f2ae345.1 - -## 4.1.3-8e039e.0 - -### Patch Changes - -- feat: update optional dependencies - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3-8e039e.0 - -## 4.1.2 - -### Patch Changes - -- 4.1.2 release - -- Updated dependencies []: - - @web3modal/ethers5@4.1.2 - -## 4.2.0-4b5257b4.1 - -### Minor Changes - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436) Thanks [@enesozturk](https://github.com/enesozturk)! - refactor: add missing extensions on imports - -- feat: export solana chains from the solana package - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07) Thanks [@enesozturk](https://github.com/enesozturk)! - chore: new solana canary release - -### Patch Changes - -- Updated dependencies [[`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436), [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07)]: - - @web3modal/ethers5@4.2.0-4b5257b4.1 - -## 4.2.0-dbbd8c44.0 - -### Minor Changes - -- refactor: add missing extensions on imports - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ui@4.2.0-dbbd8c44.0 - - @web3modal/common@4.2.0-dbbd8c44.0 - -## 4.2.0-500a38.0 - -### Minor Changes - -- feat: solana integration - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-500a38.0 - -## 4.1.1 - -### Patch Changes - -- Fix siwe version - -- Updated dependencies []: - - @web3modal/ethers5@4.1.1 - -## 4.1.0 - -### Minor Changes - -- Email Stable release - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.1.0 - -## 4.0.13 - -### Patch Changes - -- Fix secure site url - -- Updated dependencies []: - - @web3modal/ethers5@4.0.13 - -## 4.0.12 - -### Patch Changes - -- [#2014](https://github.com/WalletConnect/web3modal/pull/2014) [`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0) Thanks [@tomiir](https://github.com/tomiir)! - Smart Account RPC handler canary - -- Smart Account initialization and feature flag - -- Updated dependencies [[`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0)]: - - @web3modal/ethers5@4.0.12 - -## 4.0.12-0c59f84f.0 - -### Patch Changes - -- Smart Account RPC handler canary - -- Updated dependencies []: - - @web3modal/ethers5@4.0.12-0c59f84f.0 - -## 4.0.11 - -### Patch Changes - -- Analytics connection event improvements. Unsupported chain flag. Siwe package refactor. RPC improvements. UI improvements' - -- Updated dependencies []: - - @web3modal/ethers5@4.0.11 - -## 4.0.10 - -### Patch Changes - -- Add error state to wui-chip composite - -- Updated dependencies []: - - @web3modal/ethers5@4.0.10 - -## 4.0.9 - -### Patch Changes - -- Add all rpc methods + auto reject when modal closes - -- Updated dependencies []: - - @web3modal/ethers5@4.0.9 - -## 4.0.8 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8)]: - - @web3modal/ethers5@4.0.8 - -## 4.0.8-f1845392.0 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54)]: - - @web3modal/ethers5@4.0.8-f1845392.0 - -## 4.0.7 - -### Patch Changes - -- Add eth_getBalance to list of allowed methods - -- Updated dependencies []: - - @web3modal/ethers5@4.0.7 - -## 4.0.6 - -### Patch Changes - -- Email stability fixes - -- Updated dependencies []: - - @web3modal/ethers5@4.0.6 - -## 4.0.5 - -### Patch Changes - -- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks - -- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]: - - @web3modal/ethers5@4.0.5 - -## 4.0.4 - -### Patch Changes - -- Fix theming issue for email - -- Updated dependencies []: - - @web3modal/ethers5@4.0.4 - -## 4.0.3 - -### Patch Changes - -- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants - -- Updated dependencies []: - - @web3modal/ethers5@4.0.3 - -## 4.0.2 - -### Patch Changes - -- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view - -- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]: - - @web3modal/ethers5@4.0.2 - -## 4.0.1 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]: - - @web3modal/ethers5@4.0.1 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-ethers5@0.0.3 + - @reown/appkit@0.0.3 diff --git a/examples/html-ethers5/package.json b/examples/html-ethers5/package.json index 7ddb008717..52f3e80e35 100644 --- a/examples/html-ethers5/package.json +++ b/examples/html-ethers5/package.json @@ -1,13 +1,14 @@ { "name": "@examples/html-ethers5", "private": true, - "version": "5.1.8", + "version": "1.0.1", "scripts": { "dev": "vite --port 3011", "build": "vite build" }, "dependencies": { - "@web3modal/ethers5": "workspace:*", + "@reown/appkit-adapter-ethers5": "workspace:*", + "@reown/appkit": "workspace:*", "ethers": "5.7.2" }, "devDependencies": { diff --git a/examples/html-ethers5/src/main.js b/examples/html-ethers5/src/main.js index 4eb28afd54..1f611af052 100644 --- a/examples/html-ethers5/src/main.js +++ b/examples/html-ethers5/src/main.js @@ -1,4 +1,6 @@ -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5' +import { Ethers5Adapter } from '@reown/appkit-adapter-ethers5' +import { mainnet, arbitrum } from '@reown/appkit/networks' +import { createAppKit } from '@reown/appkit' // @ts-expect-error 1. Get projectId const projectId = import.meta.env.VITE_PROJECT_ID @@ -6,44 +8,19 @@ if (!projectId) { throw new Error('VITE_PROJECT_ID is not set') } -function getBlockchainApiRpcUrl(chainId) { - return `https://rpc.walletconnect.org/v1/?chainId=eip155:${chainId}&projectId=${projectId}` -} - // 2. Create wagmiConfig -const chains = [ - { - chainId: 1, - name: 'Ethereum', - currency: 'ETH', - explorerUrl: 'https://etherscan.io', - rpcUrl: getBlockchainApiRpcUrl(1) - }, - { - chainId: 42161, - name: 'Arbitrum', - currency: 'ETH', - explorerUrl: 'https://arbiscan.io', - rpcUrl: getBlockchainApiRpcUrl(42161) - } -] - -const metadata = { - name: 'AppKit', - description: 'AppKit HTML + Ethers5 Example', - url: 'https://lab.web3modal.com', - icons: ['https://avatars.githubusercontent.com/u/37784886'] -} - -const ethersConfig = defaultConfig({ - metadata, - chains, - defaultChainId: 1 -}) +const ethers5Adapter = new Ethers5Adapter() // 3. Create modal -const modal = createWeb3Modal({ - ethersConfig: { ...ethersConfig, email: true }, +const modal = createAppKit({ + adapters: [ethers5Adapter], + networks: [mainnet, arbitrum], + metadata: { + name: 'AppKit', + description: 'AppKit Laboratory', + url: 'https://example.com', + icons: ['https://avatars.githubusercontent.com/u/37784886'] + }, projectId, metadata, chains, diff --git a/examples/html-wagmi/CHANGELOG.md b/examples/html-wagmi/CHANGELOG.md index 0163f74c35..c1a5c312ed 100644 --- a/examples/html-wagmi/CHANGELOG.md +++ b/examples/html-wagmi/CHANGELOG.md @@ -1,758 +1,63 @@ # @examples/html-wagmi -## 5.1.8 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/wagmi@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.7 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-wagmi@1.0.1 + - @reown/appkit@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/wagmi@5.1.7 - -## 5.1.6 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/wagmi@5.1.6 - -## 5.1.5 - -### Patch Changes - -- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770 - - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771 - - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772 - - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776 - - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768 - - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779 - - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780 - -- Updated dependencies []: - - @web3modal/wagmi@5.1.5 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/wagmi@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/wagmi@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/wagmi@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/wagmi@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/wagmi@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/wagmi@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 - - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/wagmi@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/wagmi@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/wagmi@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/wagmi@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/wagmi@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/wagmi@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/wagmi@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/wagmi@5.0.1 - -## 5.0.0 +## 1.0.0 ### Major Changes -- Release V5 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- Updated dependencies []: - - @web3modal/wagmi@5.0.0 +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -## 5.0.0-cn-v5.0 +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -### Major Changes +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-wagmi@1.0.0 + - @reown/appkit@1.0.0 -- Test V5 +## 0.0.5 ### Patch Changes -- Updated dependencies []: - - @web3modal/wagmi@5.0.0-cn-v5.0 +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -## 4.2.3 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.3 - -## 4.2.3-alpha.0 - -### Patch Changes - -- feat: add support for coinbase smart accounts +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -- Updated dependencies []: - - @web3modal/wagmi@4.2.3-alpha.0 +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit-adapter-wagmi@0.0.5 + - @reown/appkit@0.0.5 -## 4.2.2 +## 0.0.4 ### Patch Changes -- feat: social login refactor. wagmi sendCalls support. refactor theme variables +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -- Updated dependencies []: - - @web3modal/wagmi@4.2.2 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-wagmi@0.0.4 + - @reown/appkit@0.0.4 -## 4.2.1 +## 0.0.3 ### Patch Changes -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.1 - -## 4.2.0 - -### Patch Changes - -- release: 4.2.0 version release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0 - -## 4.2.0-alpha.0 - -### Patch Changes - -- feat: 4.2.0-alpha release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-alpha.0 - -## 4.2.0-03e4f4a8.2 - -### Patch Changes - -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-03e4f4a8.2 - -## 4.2.0-448f7f4.1 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-448f7f4.1 - -## 4.1.12-910a844.0 - -### Patch Changes - -- refactor: sync theme with secure site - -- Updated dependencies []: - - @web3modal/wagmi@4.1.12-910a844.0 - -## 4.1.11 - -### Patch Changes - -- refactor: Solana exported helper methods and proram instruction improvements -- refactor: email and smart account improvements -- refactor: unit test CI check improvements -- feat: convert - -- Updated dependencies []: - - @web3modal/wagmi@4.1.11 - -## 4.1.10 - -### Patch Changes - -- Fix activity list styling issue - -- Updated dependencies []: - - @web3modal/wagmi@4.1.10 - -## 4.1.9 - -### Patch Changes - -- Blockchain API fix - -- Updated dependencies []: - - @web3modal/wagmi@4.1.9 - -## 4.1.8 - -### Patch Changes - -- Hotfix for redundant tokenbalance calls - -- Updated dependencies []: - - @web3modal/wagmi@4.1.8 - -## 4.1.7 - -### Patch Changes - -- Hotfix for inccorect state of w3m-button when email is enabled - -- Updated dependencies []: - - @web3modal/wagmi@4.1.7 - -## 4.1.6 - -### Patch Changes - -- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site. - -- Updated dependencies []: - - @web3modal/wagmi@4.1.6 - -## 4.1.6-a0733f5.0 - -### Patch Changes - -- chore: canary release for siwe dependency - -- Updated dependencies []: - - @web3modal/ethers@4.1.6-a0733f5.0 - - @web3modal/siwe@4.1.6-a0733f5.0 - - @web3modal/solana@4.1.6-a0733f5.0 - - @web3modal/wagmi@4.1.6-a0733f5.0 - -## 4.1.5 - -### Patch Changes - -- release: v4.1.5 - -- Updated dependencies []: - - @web3modal/wagmi@4.1.5 - -## 4.1.5-93c81127.0 - -### Patch Changes - -- fix: polyfill process in wallet package - -- Updated dependencies []: - - @web3modal/wagmi@4.1.5-93c81127.0 - -## 4.1.4 - -### Patch Changes - -- feat: wallet info hook - -- Updated dependencies []: - - @web3modal/wagmi@4.1.4 - -## 4.1.3 - -### Patch Changes - -- feat: wallet info hook - -- feat: reset version to 4.1.3 - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3 - -## 4.1.3-5f2ae345.1 - -### Patch Changes - -- canary: test imports - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-5f2ae345.1 - -## 4.1.3-8e039e.0 - -### Patch Changes - -- feat: update optional dependencies - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-8e039e.0 - -## 4.1.2 - -### Patch Changes - -- 4.1.2 release - -- Updated dependencies []: - - @web3modal/wagmi@4.1.2 - -## 4.2.0-4b5257b4.1 - -### Minor Changes - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436) Thanks [@enesozturk](https://github.com/enesozturk)! - refactor: add missing extensions on imports - -- feat: export solana chains from the solana package - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07) Thanks [@enesozturk](https://github.com/enesozturk)! - chore: new solana canary release - -### Patch Changes - -- Updated dependencies [[`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436), [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07)]: - - @web3modal/wagmi@4.2.0-4b5257b4.1 - -## 4.2.0-dbbd8c44.0 - -### Minor Changes - -- refactor: add missing extensions on imports - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ui@4.2.0-dbbd8c44.0 - - @web3modal/common@4.2.0-dbbd8c44.0 - -## 4.2.0-500a38.0 - -### Minor Changes - -- feat: solana integration - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-500a38.0 - -## 4.1.1 - -### Patch Changes - -- Fix siwe version - -- Updated dependencies []: - - @web3modal/wagmi@4.1.1 - -## 4.1.0 - -### Minor Changes - -- Email Stable release - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.1.0 - -## 4.0.13 - -### Patch Changes - -- Fix secure site url - -- Updated dependencies []: - - @web3modal/wagmi@4.0.13 - -## 4.0.12 - -### Patch Changes - -- [#2014](https://github.com/WalletConnect/web3modal/pull/2014) [`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0) Thanks [@tomiir](https://github.com/tomiir)! - Smart Account RPC handler canary - -- Smart Account initialization and feature flag - -- Updated dependencies [[`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0)]: - - @web3modal/wagmi@4.0.12 - -## 4.0.12-0c59f84f.0 - -### Patch Changes - -- Smart Account RPC handler canary - -- Updated dependencies []: - - @web3modal/wagmi@4.0.12-0c59f84f.0 - -## 4.0.11 - -### Patch Changes - -- Analytics connection event improvements. Unsupported chain flag. Siwe package refactor. RPC improvements. UI improvements' - -- Updated dependencies []: - - @web3modal/wagmi@4.0.11 - -## 4.0.10 - -### Patch Changes - -- Add error state to wui-chip composite - -- Updated dependencies []: - - @web3modal/wagmi@4.0.10 - -## 4.0.9 - -### Patch Changes - -- Add all rpc methods + auto reject when modal closes - -- Updated dependencies []: - - @web3modal/wagmi@4.0.9 - -## 4.0.8 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8)]: - - @web3modal/wagmi@4.0.8 - -## 4.0.8-f1845392.0 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54)]: - - @web3modal/wagmi@4.0.8-f1845392.0 - -## 4.0.7 - -### Patch Changes - -- Add eth_getBalance to list of allowed methods - -- Updated dependencies []: - - @web3modal/wagmi@4.0.7 - -## 4.0.6 - -### Patch Changes - -- Email stability fixes - -- Updated dependencies []: - - @web3modal/wagmi@4.0.6 - -## 4.0.5 - -### Patch Changes - -- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks - -- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]: - - @web3modal/wagmi@4.0.5 - -## 4.0.4 - -### Patch Changes - -- Fix theming issue for email - -- Updated dependencies []: - - @web3modal/wagmi@4.0.4 - -## 4.0.3 - -### Patch Changes - -- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants - -- Updated dependencies []: - - @web3modal/wagmi@4.0.3 - -## 4.0.2 - -### Patch Changes - -- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view - -- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]: - - @web3modal/wagmi@4.0.2 - -## 4.0.1 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]: - - @web3modal/wagmi@4.0.1 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-wagmi@0.0.3 + - @reown/appkit@0.0.3 diff --git a/examples/html-wagmi/package.json b/examples/html-wagmi/package.json index c54e073af2..8148e0ed9f 100644 --- a/examples/html-wagmi/package.json +++ b/examples/html-wagmi/package.json @@ -1,7 +1,7 @@ { "name": "@examples/html-wagmi", "private": true, - "version": "5.1.8", + "version": "1.0.1", "scripts": { "dev": "vite --port 3001", "build": "vite build" @@ -9,7 +9,8 @@ "dependencies": { "@wagmi/connectors": "5.1.9", "@wagmi/core": "2.13.4", - "@web3modal/wagmi": "workspace:*", + "@reown/appkit-adapter-wagmi": "workspace:*", + "@reown/appkit": "workspace:*", "react": "18.2.0", "react-dom": "18.2.0" }, diff --git a/examples/html-wagmi/src/main.js b/examples/html-wagmi/src/main.js index 191530c90a..5fd61b7b64 100644 --- a/examples/html-wagmi/src/main.js +++ b/examples/html-wagmi/src/main.js @@ -1,5 +1,6 @@ -import { arbitrum, mainnet } from '@wagmi/core/chains' -import { createWeb3Modal, defaultWagmiConfig } from '@web3modal/wagmi' +import { arbitrum, mainnet } from '@reown/appkit/networks' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { createAppKit } from '@reown/appkit' // @ts-expect-error 1. Get projectId const projectId = import.meta.env.VITE_PROJECT_ID @@ -7,22 +8,26 @@ if (!projectId) { throw new Error('VITE_PROJECT_ID is not set') } -// 2. Create wagmiConfig -const chains = [mainnet, arbitrum] -const wagmiConfig = defaultWagmiConfig({ - chains, - projectId, +// 2. Create Wagmi adapter +const wagmiAdapter = new WagmiAdapter({ + networks: [mainnet, arbitrum], + projectId +}) + +// 3. Create modal +const modal = createAppKit({ + adapters: [wagmiAdapter], metadata: { name: 'Html Example', description: 'Html Example', - url: 'https://web3modal.com', + url: 'https://reown.com/appkit', icons: ['https://avatars.githubusercontent.com/u/37784886'] - } + }, + networks: [mainnet, arbitrum], + projectId, + themeMode: 'light' }) -// 3. Create modal -const modal = createWeb3Modal({ wagmiConfig, projectId, chains, themeMode: 'light' }) - // 4. Trigger modal programaticaly const openConnectModalBtn = document.getElementById('open-connect-modal') const openNetworkModalBtn = document.getElementById('open-network-modal') diff --git a/examples/next-ethers/.eslintrc.json b/examples/next-ethers/.eslintrc.json new file mode 100644 index 0000000000..bffb357a71 --- /dev/null +++ b/examples/next-ethers/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/examples/next-ethers/.gitignore b/examples/next-ethers/.gitignore new file mode 100644 index 0000000000..fd3dbb571a --- /dev/null +++ b/examples/next-ethers/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/examples/next-ethers/CHANGELOG.md b/examples/next-ethers/CHANGELOG.md new file mode 100644 index 0000000000..5bb3e8e8a9 --- /dev/null +++ b/examples/next-ethers/CHANGELOG.md @@ -0,0 +1,63 @@ +# @examples/next-ethers + +## 1.0.1 + +### Patch Changes + +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public + +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-ethers@1.0.1 + - @reown/appkit@1.0.1 + +## 1.0.0 + +### Major Changes + +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 + +### Patch Changes + +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name + +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect + +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-ethers@1.0.0 + - @reown/appkit@1.0.0 + +## 0.0.5 + +### Patch Changes + +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically + +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values + +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController + +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit@0.0.5 + - @reown/appkit-adapter-ethers@0.0.5 + +## 0.0.4 + +### Patch Changes + +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. + +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-ethers@0.0.4 + - @reown/appkit@0.0.4 + +## 0.0.3 + +### Patch Changes + +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs + +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file + +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-ethers@0.0.3 + - @reown/appkit@0.0.3 diff --git a/examples/next-ethers/package.json b/examples/next-ethers/package.json new file mode 100644 index 0000000000..05292a684e --- /dev/null +++ b/examples/next-ethers/package.json @@ -0,0 +1,28 @@ +{ + "name": "@examples/next-ethers", + "version": "1.0.1", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@reown/appkit-adapter-ethers": "workspace:*", + "@reown/appkit": "workspace:*", + "ethers": "6.13.0", + "next": "14.2.3", + "react": "18.2.0", + "react-dom": "18.2.0" + }, + "devDependencies": { + "@types/react": "18.2.62", + "@types/react-dom": "18.2.7", + "@types/node": "20.11.5", + "eslint": "8.56.0", + "eslint-config-next": "14.1.0", + "typescript": "5.3.3", + "esbuild": "0.21.1" + } +} diff --git a/examples/next-ethers/public/next.svg b/examples/next-ethers/public/next.svg new file mode 100644 index 0000000000..5174b28c56 --- /dev/null +++ b/examples/next-ethers/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/next-ethers/public/vercel.svg b/examples/next-ethers/public/vercel.svg new file mode 100644 index 0000000000..d2f8422273 --- /dev/null +++ b/examples/next-ethers/public/vercel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/next-ethers/src/app/favicon.ico b/examples/next-ethers/src/app/favicon.ico new file mode 100644 index 0000000000..718d6fea48 Binary files /dev/null and b/examples/next-ethers/src/app/favicon.ico differ diff --git a/examples/next-ethers/src/app/globals.css b/examples/next-ethers/src/app/globals.css new file mode 100644 index 0000000000..4265759c66 --- /dev/null +++ b/examples/next-ethers/src/app/globals.css @@ -0,0 +1,21 @@ +* { + box-sizing: border-box; + padding: 0; + margin: 0; +} + +html, +body { + max-width: 100vw; + overflow-x: hidden; +} + +body { + color: #fff; + background: #141414; +} + +a { + color: inherit; + text-decoration: none; +} diff --git a/examples/next-ethers/src/app/layout.tsx b/examples/next-ethers/src/app/layout.tsx new file mode 100644 index 0000000000..c847805e6b --- /dev/null +++ b/examples/next-ethers/src/app/layout.tsx @@ -0,0 +1,25 @@ +import type { Metadata } from 'next' +import { Inter as interFonts } from 'next/font/google' +import './globals.css' +import ContextProvider from '@/context' + +const inter = interFonts({ subsets: ['latin'] }) + +export const metadata: Metadata = { + title: 'Create Next App', + description: 'Generated by create next app' +} + +export default function RootLayout({ + children +}: Readonly<{ + children: React.ReactNode +}>) { + return ( + + + {children} + + + ) +} diff --git a/examples/next-ethers/src/app/page.module.css b/examples/next-ethers/src/app/page.module.css new file mode 100644 index 0000000000..cca6319cf0 --- /dev/null +++ b/examples/next-ethers/src/app/page.module.css @@ -0,0 +1,8 @@ +.main { + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + padding: 6rem; + min-height: 100vh; +} diff --git a/examples/next-ethers/src/app/page.tsx b/examples/next-ethers/src/app/page.tsx new file mode 100644 index 0000000000..e4742732b1 --- /dev/null +++ b/examples/next-ethers/src/app/page.tsx @@ -0,0 +1,10 @@ +import Connect from '@/components/Connect' +import styles from './page.module.css' + +export default function Home() { + return ( +
+ +
+ ) +} diff --git a/examples/next-ethers/src/components/Connect.tsx b/examples/next-ethers/src/components/Connect.tsx new file mode 100644 index 0000000000..dc0926f047 --- /dev/null +++ b/examples/next-ethers/src/components/Connect.tsx @@ -0,0 +1,5 @@ +'use client' + +export default function Connect() { + return +} diff --git a/examples/next-ethers/src/context/index.tsx b/examples/next-ethers/src/context/index.tsx new file mode 100644 index 0000000000..ecd3062c04 --- /dev/null +++ b/examples/next-ethers/src/context/index.tsx @@ -0,0 +1,30 @@ +'use client' + +import { createAppKit } from '@reown/appkit/react' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' +import { mainnet, arbitrum, avalanche, base, optimism, polygon } from '@reown/appkit/networks' +import { type ReactNode } from 'react' + +const projectId = 'Your project ID' + +const ethersAdapter = new EthersAdapter() + +createAppKit({ + adapters: [ethersAdapter], + projectId, + networks: [mainnet, arbitrum, avalanche, base, optimism, polygon], + metadata: { + name: 'My App', + description: 'My app description', + url: 'https://myapp.com', + icons: ['https://myapp.com/favicon.ico'] + }, + enableEIP6963: true, + enableCoinbase: true +}) + +function ContextProvider({ children }: { children: ReactNode }) { + return <>{children} +} + +export default ContextProvider diff --git a/examples/next-ethers/tsconfig.json b/examples/next-ethers/tsconfig.json new file mode 100644 index 0000000000..2535ebf89c --- /dev/null +++ b/examples/next-ethers/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "jsx": "preserve", + "noEmit": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "src", ".next/types/**/*.ts"] +} diff --git a/examples/next-wagmi/CHANGELOG.md b/examples/next-wagmi/CHANGELOG.md index 6cba2effec..4c9f044cc4 100644 --- a/examples/next-wagmi/CHANGELOG.md +++ b/examples/next-wagmi/CHANGELOG.md @@ -1,758 +1,63 @@ # @examples/next-wagmi -## 5.1.8 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/wagmi@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.7 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-wagmi@1.0.1 + - @reown/appkit@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/wagmi@5.1.7 - -## 5.1.6 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/wagmi@5.1.6 - -## 5.1.5 - -### Patch Changes - -- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770 - - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771 - - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772 - - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776 - - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768 - - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779 - - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780 - -- Updated dependencies []: - - @web3modal/wagmi@5.1.5 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/wagmi@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/wagmi@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/wagmi@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/wagmi@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/wagmi@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/wagmi@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 -- hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/wagmi@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/wagmi@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/wagmi@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/wagmi@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/wagmi@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/wagmi@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/wagmi@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/wagmi@5.0.1 - -## 5.0.0 +## 1.0.0 ### Major Changes -- Release V5 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- Updated dependencies []: - - @web3modal/wagmi@5.0.0 +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -## 5.0.0-cn-v5.0 +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -### Major Changes +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-wagmi@1.0.0 + - @reown/appkit@1.0.0 -- Test V5 +## 0.0.5 ### Patch Changes -- Updated dependencies []: - - @web3modal/wagmi@5.0.0-cn-v5.0 +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -## 4.2.3 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.3 - -## 4.2.3-alpha.0 - -### Patch Changes - -- feat: add support for coinbase smart accounts +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -- Updated dependencies []: - - @web3modal/wagmi@4.2.3-alpha.0 +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit-adapter-wagmi@0.0.5 + - @reown/appkit@0.0.5 -## 4.2.2 +## 0.0.4 ### Patch Changes -- feat: social login refactor. wagmi sendCalls support. refactor theme variables +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -- Updated dependencies []: - - @web3modal/wagmi@4.2.2 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-wagmi@0.0.4 + - @reown/appkit@0.0.4 -## 4.2.1 +## 0.0.3 ### Patch Changes -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.1 - -## 4.2.0 - -### Patch Changes - -- release: 4.2.0 version release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0 - -## 4.2.0-alpha.0 - -### Patch Changes - -- feat: 4.2.0-alpha release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-alpha.0 - -## 4.2.0-03e4f4a8.2 - -### Patch Changes - -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-03e4f4a8.2 - -## 4.2.0-448f7f4.1 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-448f7f4.1 - -## 4.1.12-910a844.0 - -### Patch Changes - -- refactor: sync theme with secure site - -- Updated dependencies []: - - @web3modal/wagmi@4.1.12-910a844.0 - -## 4.1.11 - -### Patch Changes - -- refactor: Solana exported helper methods and proram instruction improvements -- refactor: email and smart account improvements -- refactor: unit test CI check improvements -- feat: convert - -- Updated dependencies []: - - @web3modal/wagmi@4.1.11 - -## 4.1.10 - -### Patch Changes - -- Fix activity list styling issue - -- Updated dependencies []: - - @web3modal/wagmi@4.1.10 - -## 4.1.9 - -### Patch Changes - -- Blockchain API fix - -- Updated dependencies []: - - @web3modal/wagmi@4.1.9 - -## 4.1.8 - -### Patch Changes - -- Hotfix for redundant tokenbalance calls - -- Updated dependencies []: - - @web3modal/wagmi@4.1.8 - -## 4.1.7 - -### Patch Changes - -- Hotfix for inccorect state of w3m-button when email is enabled - -- Updated dependencies []: - - @web3modal/wagmi@4.1.7 - -## 4.1.6 - -### Patch Changes - -- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site. - -- Updated dependencies []: - - @web3modal/wagmi@4.1.6 - -## 4.1.6-a0733f5.0 - -### Patch Changes - -- chore: canary release for siwe dependency - -- Updated dependencies []: - - @web3modal/ethers@4.1.6-a0733f5.0 - - @web3modal/siwe@4.1.6-a0733f5.0 - - @web3modal/solana@4.1.6-a0733f5.0 - - @web3modal/wagmi@4.1.6-a0733f5.0 - -## 4.1.5 - -### Patch Changes - -- release: v4.1.5 - -- Updated dependencies []: - - @web3modal/wagmi@4.1.5 - -## 4.1.5-93c81127.0 - -### Patch Changes - -- fix: polyfill process in wallet package - -- Updated dependencies []: - - @web3modal/wagmi@4.1.5-93c81127.0 - -## 4.1.4 - -### Patch Changes - -- feat: wallet info hook - -- Updated dependencies []: - - @web3modal/wagmi@4.1.4 - -## 4.1.3 - -### Patch Changes - -- feat: wallet info hook - -- feat: reset version to 4.1.3 - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3 - -## 4.1.3-5f2ae345.1 - -### Patch Changes - -- canary: test imports - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-5f2ae345.1 - -## 4.1.3-8e039e.0 - -### Patch Changes - -- feat: update optional dependencies - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-8e039e.0 - -## 4.1.2 - -### Patch Changes - -- 4.1.2 release - -- Updated dependencies []: - - @web3modal/wagmi@4.1.2 - -## 4.2.0-4b5257b4.1 - -### Minor Changes - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436) Thanks [@enesozturk](https://github.com/enesozturk)! - refactor: add missing extensions on imports - -- feat: export solana chains from the solana package - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07) Thanks [@enesozturk](https://github.com/enesozturk)! - chore: new solana canary release - -### Patch Changes - -- Updated dependencies [[`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436), [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07)]: - - @web3modal/wagmi@4.2.0-4b5257b4.1 - -## 4.2.0-dbbd8c44.0 - -### Minor Changes - -- refactor: add missing extensions on imports - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ui@4.2.0-dbbd8c44.0 - - @web3modal/common@4.2.0-dbbd8c44.0 - -## 4.2.0-500a38.0 - -### Minor Changes - -- feat: solana integration - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-500a38.0 - -## 4.1.1 - -### Patch Changes - -- Fix siwe version - -- Updated dependencies []: - - @web3modal/wagmi@4.1.1 - -## 4.1.0 - -### Minor Changes - -- Email Stable release - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.1.0 - -## 4.0.13 - -### Patch Changes - -- Fix secure site url - -- Updated dependencies []: - - @web3modal/wagmi@4.0.13 - -## 4.0.12 - -### Patch Changes - -- [#2014](https://github.com/WalletConnect/web3modal/pull/2014) [`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0) Thanks [@tomiir](https://github.com/tomiir)! - Smart Account RPC handler canary - -- Smart Account initialization and feature flag - -- Updated dependencies [[`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0)]: - - @web3modal/wagmi@4.0.12 - -## 4.0.12-0c59f84f.0 - -### Patch Changes - -- Smart Account RPC handler canary - -- Updated dependencies []: - - @web3modal/wagmi@4.0.12-0c59f84f.0 - -## 4.0.11 - -### Patch Changes - -- Analytics connection event improvements. Unsupported chain flag. Siwe package refactor. RPC improvements. UI improvements' - -- Updated dependencies []: - - @web3modal/wagmi@4.0.11 - -## 4.0.10 - -### Patch Changes - -- Add error state to wui-chip composite - -- Updated dependencies []: - - @web3modal/wagmi@4.0.10 - -## 4.0.9 - -### Patch Changes - -- Add all rpc methods + auto reject when modal closes - -- Updated dependencies []: - - @web3modal/wagmi@4.0.9 - -## 4.0.8 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8)]: - - @web3modal/wagmi@4.0.8 - -## 4.0.8-f1845392.0 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54)]: - - @web3modal/wagmi@4.0.8-f1845392.0 - -## 4.0.7 - -### Patch Changes - -- Add eth_getBalance to list of allowed methods - -- Updated dependencies []: - - @web3modal/wagmi@4.0.7 - -## 4.0.6 - -### Patch Changes - -- Email stability fixes - -- Updated dependencies []: - - @web3modal/wagmi@4.0.6 - -## 4.0.5 - -### Patch Changes - -- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks - -- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]: - - @web3modal/wagmi@4.0.5 - -## 4.0.4 - -### Patch Changes - -- Fix theming issue for email - -- Updated dependencies []: - - @web3modal/wagmi@4.0.4 - -## 4.0.3 - -### Patch Changes - -- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants - -- Updated dependencies []: - - @web3modal/wagmi@4.0.3 - -## 4.0.2 - -### Patch Changes - -- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view - -- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]: - - @web3modal/wagmi@4.0.2 - -## 4.0.1 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]: - - @web3modal/wagmi@4.0.1 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-wagmi@0.0.3 + - @reown/appkit@0.0.3 diff --git a/examples/next-wagmi/package.json b/examples/next-wagmi/package.json index cbd9600485..5c0483fb03 100644 --- a/examples/next-wagmi/package.json +++ b/examples/next-wagmi/package.json @@ -1,6 +1,6 @@ { "name": "@examples/next-wagmi", - "version": "5.1.8", + "version": "1.0.1", "private": true, "scripts": { "dev": "next dev", @@ -10,7 +10,10 @@ }, "dependencies": { "@tanstack/react-query": "5.24.8", - "@web3modal/wagmi": "workspace:*", + "@reown/appkit-adapter-wagmi": "workspace:*", + "@reown/appkit": "workspace:*", + "@wagmi/connectors": "5.1.9", + "@wagmi/core": "2.13.4", "next": "14.2.3", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/examples/next-wagmi/src/app/layout.tsx b/examples/next-wagmi/src/app/layout.tsx index 003e8d94cb..6f1599c526 100644 --- a/examples/next-wagmi/src/app/layout.tsx +++ b/examples/next-wagmi/src/app/layout.tsx @@ -1,9 +1,7 @@ import type { Metadata } from 'next' import { Inter as interFonts } from 'next/font/google' import './globals.css' -import { cookieToInitialState } from 'wagmi' import { headers } from 'next/headers' -import { config } from '@/config' import ContextProvider from '@/context' const inter = interFonts({ subsets: ['latin'] }) @@ -18,12 +16,12 @@ export default function RootLayout({ }: Readonly<{ children: React.ReactNode }>) { - const initialState = cookieToInitialState(config, headers().get('cookie')) + const cookies = headers().get('cookie') return ( - {children} + {children} ) diff --git a/examples/next-wagmi/src/config/index.ts b/examples/next-wagmi/src/config/index.ts index 9a7d1d100c..8638620efd 100644 --- a/examples/next-wagmi/src/config/index.ts +++ b/examples/next-wagmi/src/config/index.ts @@ -1,6 +1,6 @@ -import { defaultWagmiConfig } from '@web3modal/wagmi/react/config' -import { cookieStorage, createStorage } from 'wagmi' -import { mainnet, sepolia } from 'wagmi/chains' +import { cookieStorage, createStorage } from '@wagmi/core' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' +import { mainnet, arbitrum, avalanche, base, optimism, polygon } from '@reown/appkit/networks' export const projectId = process.env['NEXT_PUBLIC_PROJECT_ID'] @@ -8,20 +8,15 @@ if (!projectId) { throw new Error('Project ID is not defined') } -export const config = defaultWagmiConfig({ - projectId, - chains: [mainnet, sepolia], - metadata: { - name: 'My App', - description: 'My app description', - url: 'https://myapp.com', - icons: ['https://myapp.com/favicon.ico'] - }, - enableWalletConnect: true, - enableEIP6963: true, - enableCoinbase: true, +export const networks = [mainnet, arbitrum, avalanche, base, optimism, polygon] + +export const wagmiAdapter = new WagmiAdapter({ storage: createStorage({ storage: cookieStorage }), - ssr: true + ssr: true, + networks, + projectId }) + +export const config = wagmiAdapter.wagmiConfig diff --git a/examples/next-wagmi/src/context/index.tsx b/examples/next-wagmi/src/context/index.tsx index 19cbde7cfe..f09d94cd52 100644 --- a/examples/next-wagmi/src/context/index.tsx +++ b/examples/next-wagmi/src/context/index.tsx @@ -1,10 +1,10 @@ 'use client' -import { config, projectId } from '@/config' +import { wagmiAdapter, projectId, networks } from '@/config' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { createWeb3Modal } from '@web3modal/wagmi/react' +import { createAppKit } from '@reown/appkit/react' import React, { type ReactNode } from 'react' -import { type State, WagmiProvider } from 'wagmi' +import { cookieToInitialState, WagmiProvider, type Config } from 'wagmi' const queryClient = new QueryClient() @@ -12,20 +12,25 @@ if (!projectId) { throw new Error('Project ID is not defined') } -createWeb3Modal({ - wagmiConfig: config, - projectId +createAppKit({ + adapters: [wagmiAdapter], + projectId, + networks, + metadata: { + name: 'My App', + description: 'My app description', + url: 'https://myapp.com', + icons: ['https://myapp.com/favicon.ico'] + }, + enableEIP6963: true, + enableCoinbase: true }) -function ContextProvider({ - children, - initialState -}: { - children: ReactNode - initialState: State | undefined -}) { +function ContextProvider({ children, cookies }: { children: ReactNode; cookies: string | null }) { + const initialState = cookieToInitialState(wagmiAdapter.wagmiConfig as Config, cookies) + return ( - + {children} ) diff --git a/examples/react-ethers/CHANGELOG.md b/examples/react-ethers/CHANGELOG.md index 7684d2d20f..077ad10140 100644 --- a/examples/react-ethers/CHANGELOG.md +++ b/examples/react-ethers/CHANGELOG.md @@ -1,465 +1,63 @@ -# @examples/react-ethers5 +# @examples/react-ethers -## 5.1.8 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/ethers@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.7 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-ethers@1.0.1 + - @reown/appkit@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/ethers@5.1.7 - -## 5.1.6 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/ethers@5.1.6 - -## 5.1.5 - -### Patch Changes - -- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770 - - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771 - - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772 - - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776 - - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768 - - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779 - - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780 - -- Updated dependencies []: - - @web3modal/ethers@5.1.5 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/ethers@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/ethers@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/ethers@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/ethers@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/ethers@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/ethers@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 - - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/ethers@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/ethers@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/ethers@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/ethers@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/ethers@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/ethers@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/ethers@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/ethers@5.0.1 - -## 5.0.0 - -### Major Changes - -- Release V5 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers@5.0.0 - -## 5.0.0-cn-v5.0 +## 1.0.0 ### Major Changes -- Test V5 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers@5.0.0-cn-v5.0 - -## 4.2.3 - -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/ethers@4.2.3 - -## 4.2.3-alpha.0 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- feat: add support for coinbase smart accounts +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -- Updated dependencies []: - - @web3modal/ethers@4.2.3-alpha.0 +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -## 4.1.2 +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-ethers@1.0.0 + - @reown/appkit@1.0.0 -### Patch Changes - -- feat: social login refactor. wagmi sendCalls support. refactor theme variables - -- Updated dependencies []: - - @web3modal/ethers@4.2.2 - -## 4.1.1 +## 0.0.5 ### Patch Changes -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/ethers@4.2.1 +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -## 4.1.0 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -### Patch Changes - -- release: 4.2.0 version release +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -- Updated dependencies []: - - @web3modal/ethers@4.2.0 +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit@0.0.5 + - @reown/appkit-adapter-ethers@0.0.5 -## 4.1.0-alpha.2 +## 0.0.4 ### Patch Changes -- feat: 4.2.0-alpha release +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -- Updated dependencies []: - - @web3modal/ethers@4.2.0-alpha.0 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-ethers@0.0.4 + - @reown/appkit@0.0.4 -## 4.1.0-03e4f4a8.1 +## 0.0.3 ### Patch Changes -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/ethers@4.2.0-03e4f4a8.2 - -## 4.1.0-448f7f4.0 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers@4.2.0-448f7f4.1 - -## 4.0.5 - -### Patch Changes - -- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks - -- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]: - - @web3modal/ethers5@4.0.5 - -## 4.0.4 - -### Patch Changes - -- Fix theming issue for email - -- Updated dependencies []: - - @web3modal/ethers5@4.0.4 - -## 4.0.3 - -### Patch Changes - -- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants - -- Updated dependencies []: - - @web3modal/ethers5@4.0.3 - -## 4.0.2 - -### Patch Changes - -- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view - -- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]: - - @web3modal/ethers5@4.0.2 - -## 4.0.1 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]: - - @web3modal/ethers5@4.0.1 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-ethers@0.0.3 + - @reown/appkit@0.0.3 diff --git a/examples/react-ethers/package.json b/examples/react-ethers/package.json index 68854d304a..82bafc8010 100644 --- a/examples/react-ethers/package.json +++ b/examples/react-ethers/package.json @@ -1,13 +1,14 @@ { "name": "@examples/react-ethers", "private": true, - "version": "5.1.8", + "version": "1.0.1", "scripts": { "dev": "vite --port 3012", "build": "vite build" }, "dependencies": { - "@web3modal/ethers": "workspace:*", + "@reown/appkit-adapter-ethers": "workspace:*", + "@reown/appkit": "workspace:*", "ethers": "6.13.2", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/examples/react-ethers/src/App.tsx b/examples/react-ethers/src/App.tsx index 3c4731ccff..187ccc5a9a 100644 --- a/examples/react-ethers/src/App.tsx +++ b/examples/react-ethers/src/App.tsx @@ -1,11 +1,12 @@ import { - createWeb3Modal, - defaultConfig, - useWeb3Modal, - useWeb3ModalEvents, - useWeb3ModalState, - useWeb3ModalTheme -} from '@web3modal/ethers/react' + createAppKit, + useAppKit, + useAppKitEvents, + useAppKitState, + useAppKitTheme +} from '@reown/appkit/react' +import { EthersAdapter } from '@reown/appkit-adapter-ethers' +import { mainnet, arbitrum } from '@reown/appkit/networks' // @ts-expect-error 1. Get projectId const projectId = import.meta.env.VITE_PROJECT_ID @@ -13,44 +14,19 @@ if (!projectId) { throw new Error('VITE_PROJECT_ID is not set') } -function getBlockchainApiRpcUrl(chainId: number) { - return `https://rpc.walletconnect.org/v1/?chainId=eip155:${chainId}&projectId=${projectId}` -} - // 2. Set chains -const chains = [ - { - chainId: 1, - name: 'Ethereum', - currency: 'ETH', - explorerUrl: 'https://etherscan.io', - rpcUrl: getBlockchainApiRpcUrl(1) - }, - { - chainId: 42161, - name: 'Arbitrum', - currency: 'ETH', - explorerUrl: 'https://arbiscan.io', - rpcUrl: getBlockchainApiRpcUrl(42161) - } -] +const networks = [mainnet, arbitrum] -const ethersConfig = defaultConfig({ - metadata: { - name: 'AppKit', - description: 'AppKit Laboratory', - url: 'https://example.com', - icons: ['https://avatars.githubusercontent.com/u/37784886'] - }, - defaultChainId: 1 -}) +const ethersAdapter = new EthersAdapter() // 3. Create modal -createWeb3Modal({ - ethersConfig, - chains, +createAppKit({ + adapters: [ethersAdapter], + networks, projectId, - enableAnalytics: true, + features: { + analytics: true + }, themeMode: 'light', themeVariables: { '--w3m-color-mix': '#00DCFF', @@ -60,10 +36,10 @@ createWeb3Modal({ export default function App() { // 4. Use modal hook - const modal = useWeb3Modal() - const state = useWeb3ModalState() - const { themeMode, themeVariables, setThemeMode } = useWeb3ModalTheme() - const events = useWeb3ModalEvents() + const modal = useAppKit() + const state = useAppKitState() + const { themeMode, themeVariables, setThemeMode } = useAppKitTheme() + const events = useAppKitEvents() return ( <> diff --git a/examples/react-ethers5/CHANGELOG.md b/examples/react-ethers5/CHANGELOG.md index 6b1b766747..0f434dccbb 100644 --- a/examples/react-ethers5/CHANGELOG.md +++ b/examples/react-ethers5/CHANGELOG.md @@ -1,758 +1,63 @@ # @examples/react-ethers5 -## 5.1.8 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/ethers5@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.7 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-ethers5@1.0.1 + - @reown/appkit@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/ethers5@5.1.7 - -## 5.1.6 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/ethers5@5.1.6 - -## 5.1.5 - -### Patch Changes - -- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770 - - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771 - - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772 - - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776 - - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768 - - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779 - - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780 - -- Updated dependencies []: - - @web3modal/ethers5@5.1.5 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/ethers5@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/ethers5@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/ethers5@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/ethers5@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/ethers5@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/ethers5@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 - - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/ethers5@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/ethers5@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/ethers5@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/ethers5@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/ethers5@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/ethers5@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/ethers5@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/ethers5@5.0.1 - -## 5.0.0 +## 1.0.0 ### Major Changes -- Release V5 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- Updated dependencies []: - - @web3modal/ethers5@5.0.0 +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -## 5.0.0-cn-v5.0 +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -### Major Changes +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-ethers5@1.0.0 + - @reown/appkit@1.0.0 -- Test V5 +## 0.0.5 ### Patch Changes -- Updated dependencies []: - - @web3modal/ethers5@5.0.0-cn-v5.0 +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -## 4.2.3 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/ethers5@4.2.3 - -## 4.2.3-alpha.0 - -### Patch Changes - -- feat: add support for coinbase smart accounts +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -- Updated dependencies []: - - @web3modal/ethers5@4.2.3-alpha.0 +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit@0.0.5 + - @reown/appkit-adapter-ethers5@0.0.5 -## 4.2.2 +## 0.0.4 ### Patch Changes -- feat: social login refactor. wagmi sendCalls support. refactor theme variables +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -- Updated dependencies []: - - @web3modal/ethers5@4.2.2 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-ethers5@0.0.4 + - @reown/appkit@0.0.4 -## 4.2.1 +## 0.0.3 ### Patch Changes -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/ethers5@4.2.1 - -## 4.2.0 - -### Patch Changes - -- release: 4.2.0 version release - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0 - -## 4.2.0-alpha.0 - -### Patch Changes - -- feat: 4.2.0-alpha release - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-alpha.0 - -## 4.2.0-03e4f4a8.2 - -### Patch Changes - -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-03e4f4a8.2 - -## 4.2.0-448f7f4.1 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-448f7f4.1 - -## 4.1.12-910a844.0 - -### Patch Changes - -- refactor: sync theme with secure site - -- Updated dependencies []: - - @web3modal/ethers5@4.1.12-910a844.0 - -## 4.1.11 - -### Patch Changes - -- refactor: Solana exported helper methods and proram instruction improvements -- refactor: email and smart account improvements -- refactor: unit test CI check improvements -- feat: convert - -- Updated dependencies []: - - @web3modal/ethers5@4.1.11 - -## 4.1.10 - -### Patch Changes - -- Fix activity list styling issue - -- Updated dependencies []: - - @web3modal/ethers5@4.1.10 - -## 4.1.9 - -### Patch Changes - -- Blockchain API fix - -- Updated dependencies []: - - @web3modal/ethers5@4.1.9 - -## 4.1.8 - -### Patch Changes - -- Hotfix for redundant tokenbalance calls - -- Updated dependencies []: - - @web3modal/ethers5@4.1.8 - -## 4.1.7 - -### Patch Changes - -- Hotfix for inccorect state of w3m-button when email is enabled - -- Updated dependencies []: - - @web3modal/ethers5@4.1.7 - -## 4.1.6 - -### Patch Changes - -- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site. - -- Updated dependencies []: - - @web3modal/ethers5@4.1.6 - -## 4.1.6-a0733f5.0 - -### Patch Changes - -- chore: canary release for siwe dependency - -- Updated dependencies []: - - @web3modal/ethers@4.1.6-a0733f5.0 - - @web3modal/siwe@4.1.6-a0733f5.0 - - @web3modal/solana@4.1.6-a0733f5.0 - - @web3modal/wagmi@4.1.6-a0733f5.0 - -## 4.1.5 - -### Patch Changes - -- release: v4.1.5 - -- Updated dependencies []: - - @web3modal/ethers5@4.1.5 - -## 4.1.5-93c81127.0 - -### Patch Changes - -- fix: polyfill process in wallet package - -- Updated dependencies []: - - @web3modal/ethers5@4.1.5-93c81127.0 - -## 4.1.4 - -### Patch Changes - -- feat: wallet info hook - -- Updated dependencies []: - - @web3modal/ethers5@4.1.4 - -## 4.1.3 - -### Patch Changes - -- feat: wallet info hook - -- feat: reset version to 4.1.3 - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3 - -## 4.1.3-5f2ae345.1 - -### Patch Changes - -- canary: test imports - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3-5f2ae345.1 - -## 4.1.3-8e039e.0 - -### Patch Changes - -- feat: update optional dependencies - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3-8e039e.0 - -## 4.1.2 - -### Patch Changes - -- 4.1.2 release - -- Updated dependencies []: - - @web3modal/ethers5@4.1.2 - -## 4.2.0-4b5257b4.1 - -### Minor Changes - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436) Thanks [@enesozturk](https://github.com/enesozturk)! - refactor: add missing extensions on imports - -- feat: export solana chains from the solana package - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07) Thanks [@enesozturk](https://github.com/enesozturk)! - chore: new solana canary release - -### Patch Changes - -- Updated dependencies [[`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436), [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07)]: - - @web3modal/ethers5@4.2.0-4b5257b4.1 - -## 4.2.0-dbbd8c44.0 - -### Minor Changes - -- refactor: add missing extensions on imports - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ui@4.2.0-dbbd8c44.0 - - @web3modal/common@4.2.0-dbbd8c44.0 - -## 4.2.0-500a38.0 - -### Minor Changes - -- feat: solana integration - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-500a38.0 - -## 4.1.1 - -### Patch Changes - -- Fix siwe version - -- Updated dependencies []: - - @web3modal/ethers5@4.1.1 - -## 4.1.0 - -### Minor Changes - -- Email Stable release - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.1.0 - -## 4.0.13 - -### Patch Changes - -- Fix secure site url - -- Updated dependencies []: - - @web3modal/ethers5@4.0.13 - -## 4.0.12 - -### Patch Changes - -- [#2014](https://github.com/WalletConnect/web3modal/pull/2014) [`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0) Thanks [@tomiir](https://github.com/tomiir)! - Smart Account RPC handler canary - -- Smart Account initialization and feature flag - -- Updated dependencies [[`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0)]: - - @web3modal/ethers5@4.0.12 - -## 4.0.12-0c59f84f.0 - -### Patch Changes - -- Smart Account RPC handler canary - -- Updated dependencies []: - - @web3modal/ethers5@4.0.12-0c59f84f.0 - -## 4.0.11 - -### Patch Changes - -- Analytics connection event improvements. Unsupported chain flag. Siwe package refactor. RPC improvements. UI improvements' - -- Updated dependencies []: - - @web3modal/ethers5@4.0.11 - -## 4.0.10 - -### Patch Changes - -- Add error state to wui-chip composite - -- Updated dependencies []: - - @web3modal/ethers5@4.0.10 - -## 4.0.9 - -### Patch Changes - -- Add all rpc methods + auto reject when modal closes - -- Updated dependencies []: - - @web3modal/ethers5@4.0.9 - -## 4.0.8 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8)]: - - @web3modal/ethers5@4.0.8 - -## 4.0.8-f1845392.0 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54)]: - - @web3modal/ethers5@4.0.8-f1845392.0 - -## 4.0.7 - -### Patch Changes - -- Add eth_getBalance to list of allowed methods - -- Updated dependencies []: - - @web3modal/ethers5@4.0.7 - -## 4.0.6 - -### Patch Changes - -- Email stability fixes - -- Updated dependencies []: - - @web3modal/ethers5@4.0.6 - -## 4.0.5 - -### Patch Changes - -- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks - -- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]: - - @web3modal/ethers5@4.0.5 - -## 4.0.4 - -### Patch Changes - -- Fix theming issue for email - -- Updated dependencies []: - - @web3modal/ethers5@4.0.4 - -## 4.0.3 - -### Patch Changes - -- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants - -- Updated dependencies []: - - @web3modal/ethers5@4.0.3 - -## 4.0.2 - -### Patch Changes - -- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view - -- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]: - - @web3modal/ethers5@4.0.2 - -## 4.0.1 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]: - - @web3modal/ethers5@4.0.1 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-ethers5@0.0.3 + - @reown/appkit@0.0.3 diff --git a/examples/react-ethers5/package.json b/examples/react-ethers5/package.json index 3796158771..a4a41f4284 100644 --- a/examples/react-ethers5/package.json +++ b/examples/react-ethers5/package.json @@ -1,13 +1,14 @@ { "name": "@examples/react-ethers5", "private": true, - "version": "5.1.8", + "version": "1.0.1", "scripts": { "dev": "vite --port 3012", "build": "vite build" }, "dependencies": { - "@web3modal/ethers5": "workspace:*", + "@reown/appkit-adapter-ethers5": "workspace:*", + "@reown/appkit": "workspace:*", "ethers": "5.7.2", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/examples/react-ethers5/src/App.tsx b/examples/react-ethers5/src/App.tsx index 85eec94819..3596c453b1 100644 --- a/examples/react-ethers5/src/App.tsx +++ b/examples/react-ethers5/src/App.tsx @@ -1,11 +1,12 @@ +import { Ethers5Adapter } from '@reown/appkit-adapter-ethers5' import { - createWeb3Modal, - defaultConfig, - useWeb3Modal, - useWeb3ModalEvents, - useWeb3ModalState, - useWeb3ModalTheme -} from '@web3modal/ethers5/react' + createAppKit, + useAppKit, + useAppKitEvents, + useAppKitState, + useAppKitTheme +} from '@reown/appkit/react' +import { mainnet, arbitrum } from '@reown/appkit/networks' // @ts-expect-error 1. Get projectId const projectId = import.meta.env.VITE_PROJECT_ID @@ -13,45 +14,20 @@ if (!projectId) { throw new Error('VITE_PROJECT_ID is not set') } -function getBlockchainApiRpcUrl(chainId: number) { - return `https://rpc.walletconnect.org/v1/?chainId=eip155:${chainId}&projectId=${projectId}` -} - -// 2. Set chains -const chains = [ - { - chainId: 1, - name: 'Ethereum', - currency: 'ETH', - explorerUrl: 'https://etherscan.io', - rpcUrl: getBlockchainApiRpcUrl(1) - }, - { - chainId: 42161, - name: 'Arbitrum', - currency: 'ETH', - explorerUrl: 'https://arbiscan.io', - rpcUrl: getBlockchainApiRpcUrl(42161) - } -] +// 2. Set Ethers adapter +const ethers5Adapter = new Ethers5Adapter() -const ethersConfig = defaultConfig({ +// 3. Create modal +createAppKit({ + adapters: [ethers5Adapter], metadata: { name: 'AppKit', description: 'AppKit Laboratory', url: 'https://example.com', icons: ['https://avatars.githubusercontent.com/u/37784886'] }, - defaultChainId: 1 -}) - -// 3. Create modal -createWeb3Modal({ - ethersConfig, - chains, - defaultChain: chains[1], + networks: [mainnet, arbitrum], projectId, - enableAnalytics: true, themeMode: 'light', themeVariables: { '--w3m-color-mix': '#00DCFF', @@ -61,10 +37,10 @@ createWeb3Modal({ export default function App() { // 4. Use modal hook - const modal = useWeb3Modal() - const state = useWeb3ModalState() - const { themeMode, themeVariables, setThemeMode } = useWeb3ModalTheme() - const events = useWeb3ModalEvents() + const modal = useAppKit() + const state = useAppKitState() + const { themeMode, themeVariables, setThemeMode } = useAppKitTheme() + const events = useAppKitEvents() return ( <> diff --git a/examples/react-solana/CHANGELOG.md b/examples/react-solana/CHANGELOG.md index b50a569d34..a8a469aff4 100644 --- a/examples/react-solana/CHANGELOG.md +++ b/examples/react-solana/CHANGELOG.md @@ -1,758 +1,60 @@ -# @examples/react-wagmi +# @examples/react-solana -## 5.1.8 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/solana@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.7 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit@1.0.1 + - @reown/appkit-solana@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/solana@5.1.7 - -## 5.1.6 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/solana@5.1.6 - -## 5.1.5 - -### Patch Changes - -- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770 - - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771 - - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772 - - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776 - - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768 - - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779 - - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780 - -- Updated dependencies []: - - @web3modal/solana@5.1.5 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/solana@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/solana@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/solana@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/solana@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/solana@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/solana@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/solana@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 - - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/solana@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/solana@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/wagmi@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/wagmi@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/wagmi@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/wagmi@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/wagmi@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/wagmi@5.0.1 - -## 5.0.0 +## 1.0.0 ### Major Changes -- Release V5 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- Updated dependencies []: - - @web3modal/wagmi@5.0.0 +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -## 5.0.0-cn-v5.0 +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -### Major Changes +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit@1.0.0 + - @reown/appkit-solana@1.0.0 -- Test V5 +## 0.0.5 ### Patch Changes -- Updated dependencies []: - - @web3modal/wagmi@5.0.0-cn-v5.0 +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -## 4.2.3 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.3 - -## 4.2.3-alpha.0 - -### Patch Changes - -- feat: add support for coinbase smart accounts +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -- Updated dependencies []: - - @web3modal/wagmi@4.2.3-alpha.0 +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit-solana@0.0.5 -## 4.2.2 +## 0.0.4 ### Patch Changes -- feat: social login refactor. wagmi sendCalls support. refactor theme variables +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -- Updated dependencies []: - - @web3modal/wagmi@4.2.2 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-solana@0.0.4 -## 4.2.1 +## 0.0.3 ### Patch Changes -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.1 - -## 4.2.0 - -### Patch Changes - -- release: 4.2.0 version release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0 - -## 4.2.0-alpha.0 - -### Patch Changes - -- feat: 4.2.0-alpha release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-alpha.0 - -## 4.2.0-03e4f4a8.2 - -### Patch Changes - -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-03e4f4a8.2 - -## 4.2.0-448f7f4.1 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-448f7f4.1 - -## 4.1.12-910a844.0 - -### Patch Changes - -- refactor: sync theme with secure site - -- Updated dependencies []: - - @web3modal/wagmi@4.1.12-910a844.0 - -## 4.1.11 - -### Patch Changes - -- refactor: Solana exported helper methods and proram instruction improvements -- refactor: email and smart account improvements -- refactor: unit test CI check improvements -- feat: convert - -- Updated dependencies []: - - @web3modal/wagmi@4.1.11 - -## 4.1.10 - -### Patch Changes - -- Fix activity list styling issue - -- Updated dependencies []: - - @web3modal/wagmi@4.1.10 - -## 4.1.9 - -### Patch Changes - -- Blockchain API fix - -- Updated dependencies []: - - @web3modal/wagmi@4.1.9 - -## 4.1.8 - -### Patch Changes - -- Hotfix for redundant tokenbalance calls - -- Updated dependencies []: - - @web3modal/wagmi@4.1.8 - -## 4.1.7 - -### Patch Changes - -- Hotfix for inccorect state of w3m-button when email is enabled - -- Updated dependencies []: - - @web3modal/wagmi@4.1.7 - -## 4.1.6 - -### Patch Changes - -- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site. - -- Updated dependencies []: - - @web3modal/wagmi@4.1.6 - -## 4.1.6-a0733f5.0 - -### Patch Changes - -- chore: canary release for siwe dependency - -- Updated dependencies []: - - @web3modal/ethers@4.1.6-a0733f5.0 - - @web3modal/siwe@4.1.6-a0733f5.0 - - @web3modal/solana@4.1.6-a0733f5.0 - - @web3modal/wagmi@4.1.6-a0733f5.0 - -## 4.1.5 - -### Patch Changes - -- release: v4.1.5 - -- Updated dependencies []: - - @web3modal/wagmi@4.1.5 - -## 4.1.5-93c81127.0 - -### Patch Changes - -- fix: polyfill process in wallet package - -- Updated dependencies []: - - @web3modal/wagmi@4.1.5-93c81127.0 - -## 4.1.4 - -### Patch Changes - -- feat: wallet info hook - -- Updated dependencies []: - - @web3modal/wagmi@4.1.4 - -## 4.1.3 - -### Patch Changes - -- feat: wallet info hook - -- feat: reset version to 4.1.3 - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3 - -## 4.1.3-5f2ae345.1 - -### Patch Changes - -- canary: test imports - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-5f2ae345.1 - -## 4.1.3-8e039e.0 - -### Patch Changes - -- feat: update optional dependencies - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-8e039e.0 - -## 4.1.2 - -### Patch Changes - -- 4.1.2 release - -- Updated dependencies []: - - @web3modal/wagmi@4.1.2 - -## 4.2.0-4b5257b4.1 - -### Minor Changes - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436) Thanks [@enesozturk](https://github.com/enesozturk)! - refactor: add missing extensions on imports - -- feat: export solana chains from the solana package - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07) Thanks [@enesozturk](https://github.com/enesozturk)! - chore: new solana canary release - -### Patch Changes - -- Updated dependencies [[`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436), [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07)]: - - @web3modal/wagmi@4.2.0-4b5257b4.1 - -## 4.2.0-dbbd8c44.0 - -### Minor Changes - -- refactor: add missing extensions on imports - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ui@4.2.0-dbbd8c44.0 - - @web3modal/common@4.2.0-dbbd8c44.0 - -## 4.2.0-500a38.0 - -### Minor Changes - -- feat: solana integration - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-500a38.0 - -## 4.1.1 - -### Patch Changes - -- Fix siwe version - -- Updated dependencies []: - - @web3modal/wagmi@4.1.1 - -## 4.1.0 - -### Minor Changes - -- Email Stable release - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.1.0 - -## 4.0.13 - -### Patch Changes - -- Fix secure site url - -- Updated dependencies []: - - @web3modal/wagmi@4.0.13 - -## 4.0.12 - -### Patch Changes - -- [#2014](https://github.com/WalletConnect/web3modal/pull/2014) [`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0) Thanks [@tomiir](https://github.com/tomiir)! - Smart Account RPC handler canary - -- Smart Account initialization and feature flag - -- Updated dependencies [[`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0)]: - - @web3modal/wagmi@4.0.12 - -## 4.0.12-0c59f84f.0 - -### Patch Changes - -- Smart Account RPC handler canary - -- Updated dependencies []: - - @web3modal/wagmi@4.0.12-0c59f84f.0 - -## 4.0.11 - -### Patch Changes - -- Analytics connection event improvements. Unsupported chain flag. Siwe package refactor. RPC improvements. UI improvements' - -- Updated dependencies []: - - @web3modal/wagmi@4.0.11 - -## 4.0.10 - -### Patch Changes - -- Add error state to wui-chip composite - -- Updated dependencies []: - - @web3modal/wagmi@4.0.10 - -## 4.0.9 - -### Patch Changes - -- Add all rpc methods + auto reject when modal closes - -- Updated dependencies []: - - @web3modal/wagmi@4.0.9 - -## 4.0.8 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8)]: - - @web3modal/wagmi@4.0.8 - -## 4.0.8-f1845392.0 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54)]: - - @web3modal/wagmi@4.0.8-f1845392.0 - -## 4.0.7 - -### Patch Changes - -- Add eth_getBalance to list of allowed methods - -- Updated dependencies []: - - @web3modal/wagmi@4.0.7 - -## 4.0.6 - -### Patch Changes - -- Email stability fixes - -- Updated dependencies []: - - @web3modal/wagmi@4.0.6 - -## 4.0.5 - -### Patch Changes - -- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks - -- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]: - - @web3modal/wagmi@4.0.5 - -## 4.0.4 - -### Patch Changes - -- Fix theming issue for email - -- Updated dependencies []: - - @web3modal/wagmi@4.0.4 - -## 4.0.3 - -### Patch Changes - -- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants - -- Updated dependencies []: - - @web3modal/wagmi@4.0.3 - -## 4.0.2 - -### Patch Changes - -- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view - -- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]: - - @web3modal/wagmi@4.0.2 - -## 4.0.1 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]: - - @web3modal/wagmi@4.0.1 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-solana@0.0.3 diff --git a/examples/react-solana/package.json b/examples/react-solana/package.json index cdb0ded251..309191696d 100644 --- a/examples/react-solana/package.json +++ b/examples/react-solana/package.json @@ -1,13 +1,14 @@ { "name": "@examples/react-solana", "private": true, - "version": "5.1.8", + "version": "1.0.1", "scripts": { "dev": "vite --port 3002", "build": "vite build" }, "dependencies": { - "@web3modal/solana": "workspace:*", + "@reown/appkit": "workspace:*", + "@reown/appkit-solana": "workspace:*", "@tanstack/react-query": "5.24.8", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/examples/react-solana/src/App.tsx b/examples/react-solana/src/App.tsx index 3677e4754f..d07b8c6ca5 100644 --- a/examples/react-solana/src/App.tsx +++ b/examples/react-solana/src/App.tsx @@ -1,17 +1,17 @@ -import { defaultSolanaConfig } from '@web3modal/solana/react' import { - createWeb3Modal, - useWeb3Modal, - useWeb3ModalEvents, - useWeb3ModalState, - useWeb3ModalTheme -} from '@web3modal/solana/react' + createAppKit, + useAppKit, + useAppKitEvents, + useAppKitState, + useAppKitTheme +} from '@reown/appkit-solana/react' import { PhantomWalletAdapter, HuobiWalletAdapter, SolflareWalletAdapter, TrustWalletAdapter } from '@solana/wallet-adapter-wallets' +import { solana, solanaTestnet, solanaDevnet } from '@reown/appkit/networks' // @ts-expect-error 1. Get projectId const projectId = import.meta.env.VITE_PROJECT_ID @@ -19,49 +19,19 @@ if (!projectId) { throw new Error('VITE_PROJECT_ID is not set') } -const chains = [ - { - chainId: '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', - name: 'Solana', - currency: 'SOL', - explorerUrl: 'https://solscan.io', - rpcUrl: 'https://rpc.walletconnect.org/v1' - }, - { - chainId: '4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z', - name: 'Solana Testnet', - currency: 'SOL', - explorerUrl: 'https://explorer.solana.com/?cluster=testnet', - rpcUrl: 'https://rpc.walletconnect.org/v1' - }, - { - chainId: 'EtWTRABZaYq6iMfeYKouRu166VU2xqa1', - name: 'Solana Devnet', - currency: 'SOL', - explorerUrl: 'https://explorer.solana.com/?cluster=devnet', - rpcUrl: 'https://rpc.walletconnect.org/v1' - } -] +const networks = [solana, solanaTestnet, solanaDevnet] -// 2. Create solanaConfig -const solanaConfig = defaultSolanaConfig({ - chains: chains, - projectId, +// 3. Create modal +createAppKit({ + networks, metadata: { name: 'AppKit React Example', description: 'AppKit React Example', url: '', icons: [] - } -}) - -// 3. Create modal -createWeb3Modal({ - solanaConfig, + }, projectId, themeMode: 'light', - defaultChain: chains[2], - chains, wallets: [ new HuobiWalletAdapter(), new PhantomWalletAdapter(), @@ -76,10 +46,10 @@ createWeb3Modal({ export default function App() { // 4. Use modal hook - const modal = useWeb3Modal() - const state = useWeb3ModalState() - const { themeMode, themeVariables, setThemeMode } = useWeb3ModalTheme() - const events = useWeb3ModalEvents() + const modal = useAppKit() + const state = useAppKitState() + const { themeMode, themeVariables, setThemeMode } = useAppKitTheme() + const events = useAppKitEvents() return ( <> diff --git a/examples/react-wagmi/CHANGELOG.md b/examples/react-wagmi/CHANGELOG.md index 7c0814d4ca..00cfa3846a 100644 --- a/examples/react-wagmi/CHANGELOG.md +++ b/examples/react-wagmi/CHANGELOG.md @@ -1,758 +1,63 @@ # @examples/react-wagmi -## 5.1.8 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/wagmi@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.7 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-wagmi@1.0.1 + - @reown/appkit@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/wagmi@5.1.7 - -## 5.1.6 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/wagmi@5.1.6 - -## 5.1.5 - -### Patch Changes - -- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770 - - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771 - - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772 - - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776 - - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768 - - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779 - - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780 - -- Updated dependencies []: - - @web3modal/wagmi@5.1.5 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/wagmi@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/wagmi@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/wagmi@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/wagmi@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/wagmi@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/wagmi@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 -- hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/wagmi@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/wagmi@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/wagmi@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/wagmi@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/wagmi@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/wagmi@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/wagmi@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/wagmi@5.0.1 - -## 5.0.0 +## 1.0.0 ### Major Changes -- Release V5 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- Updated dependencies []: - - @web3modal/wagmi@5.0.0 +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -## 5.0.0-cn-v5.0 +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -### Major Changes +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-wagmi@1.0.0 + - @reown/appkit@1.0.0 -- Test V5 +## 0.0.5 ### Patch Changes -- Updated dependencies []: - - @web3modal/wagmi@5.0.0-cn-v5.0 +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -## 4.2.3 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.3 - -## 4.2.3-alpha.0 - -### Patch Changes - -- feat: add support for coinbase smart accounts +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -- Updated dependencies []: - - @web3modal/wagmi@4.2.3-alpha.0 +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit-adapter-wagmi@0.0.5 + - @reown/appkit@0.0.5 -## 4.2.2 +## 0.0.4 ### Patch Changes -- feat: social login refactor. wagmi sendCalls support. refactor theme variables +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -- Updated dependencies []: - - @web3modal/wagmi@4.2.2 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-wagmi@0.0.4 + - @reown/appkit@0.0.4 -## 4.2.1 +## 0.0.3 ### Patch Changes -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/wagmi@4.2.1 - -## 4.2.0 - -### Patch Changes - -- release: 4.2.0 version release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0 - -## 4.2.0-alpha.0 - -### Patch Changes - -- feat: 4.2.0-alpha release - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-alpha.0 - -## 4.2.0-03e4f4a8.2 - -### Patch Changes - -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-03e4f4a8.2 - -## 4.2.0-448f7f4.1 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-448f7f4.1 - -## 4.1.12-910a844.0 - -### Patch Changes - -- refactor: sync theme with secure site - -- Updated dependencies []: - - @web3modal/wagmi@4.1.12-910a844.0 - -## 4.1.11 - -### Patch Changes - -- refactor: Solana exported helper methods and proram instruction improvements -- refactor: email and smart account improvements -- refactor: unit test CI check improvements -- feat: convert - -- Updated dependencies []: - - @web3modal/wagmi@4.1.11 - -## 4.1.10 - -### Patch Changes - -- Fix activity list styling issue - -- Updated dependencies []: - - @web3modal/wagmi@4.1.10 - -## 4.1.9 - -### Patch Changes - -- Blockchain API fix - -- Updated dependencies []: - - @web3modal/wagmi@4.1.9 - -## 4.1.8 - -### Patch Changes - -- Hotfix for redundant tokenbalance calls - -- Updated dependencies []: - - @web3modal/wagmi@4.1.8 - -## 4.1.7 - -### Patch Changes - -- Hotfix for inccorect state of w3m-button when email is enabled - -- Updated dependencies []: - - @web3modal/wagmi@4.1.7 - -## 4.1.6 - -### Patch Changes - -- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site. - -- Updated dependencies []: - - @web3modal/wagmi@4.1.6 - -## 4.1.6-a0733f5.0 - -### Patch Changes - -- chore: canary release for siwe dependency - -- Updated dependencies []: - - @web3modal/ethers@4.1.6-a0733f5.0 - - @web3modal/siwe@4.1.6-a0733f5.0 - - @web3modal/solana@4.1.6-a0733f5.0 - - @web3modal/wagmi@4.1.6-a0733f5.0 - -## 4.1.5 - -### Patch Changes - -- release: v4.1.5 - -- Updated dependencies []: - - @web3modal/wagmi@4.1.5 - -## 4.1.5-93c81127.0 - -### Patch Changes - -- fix: polyfill process in wallet package - -- Updated dependencies []: - - @web3modal/wagmi@4.1.5-93c81127.0 - -## 4.1.4 - -### Patch Changes - -- feat: wallet info hook - -- Updated dependencies []: - - @web3modal/wagmi@4.1.4 - -## 4.1.3 - -### Patch Changes - -- feat: wallet info hook - -- feat: reset version to 4.1.3 - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3 - -## 4.1.3-5f2ae345.1 - -### Patch Changes - -- canary: test imports - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-5f2ae345.1 - -## 4.1.3-8e039e.0 - -### Patch Changes - -- feat: update optional dependencies - -- Updated dependencies []: - - @web3modal/wagmi@4.1.3-8e039e.0 - -## 4.1.2 - -### Patch Changes - -- 4.1.2 release - -- Updated dependencies []: - - @web3modal/wagmi@4.1.2 - -## 4.2.0-4b5257b4.1 - -### Minor Changes - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436) Thanks [@enesozturk](https://github.com/enesozturk)! - refactor: add missing extensions on imports - -- feat: export solana chains from the solana package - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07) Thanks [@enesozturk](https://github.com/enesozturk)! - chore: new solana canary release - -### Patch Changes - -- Updated dependencies [[`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436), [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07)]: - - @web3modal/wagmi@4.2.0-4b5257b4.1 - -## 4.2.0-dbbd8c44.0 - -### Minor Changes - -- refactor: add missing extensions on imports - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ui@4.2.0-dbbd8c44.0 - - @web3modal/common@4.2.0-dbbd8c44.0 - -## 4.2.0-500a38.0 - -### Minor Changes - -- feat: solana integration - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.2.0-500a38.0 - -## 4.1.1 - -### Patch Changes - -- Fix siwe version - -- Updated dependencies []: - - @web3modal/wagmi@4.1.1 - -## 4.1.0 - -### Minor Changes - -- Email Stable release - -### Patch Changes - -- Updated dependencies []: - - @web3modal/wagmi@4.1.0 - -## 4.0.13 - -### Patch Changes - -- Fix secure site url - -- Updated dependencies []: - - @web3modal/wagmi@4.0.13 - -## 4.0.12 - -### Patch Changes - -- [#2014](https://github.com/WalletConnect/web3modal/pull/2014) [`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0) Thanks [@tomiir](https://github.com/tomiir)! - Smart Account RPC handler canary - -- Smart Account initialization and feature flag - -- Updated dependencies [[`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0)]: - - @web3modal/wagmi@4.0.12 - -## 4.0.12-0c59f84f.0 - -### Patch Changes - -- Smart Account RPC handler canary - -- Updated dependencies []: - - @web3modal/wagmi@4.0.12-0c59f84f.0 - -## 4.0.11 - -### Patch Changes - -- Analytics connection event improvements. Unsupported chain flag. Siwe package refactor. RPC improvements. UI improvements' - -- Updated dependencies []: - - @web3modal/wagmi@4.0.11 - -## 4.0.10 - -### Patch Changes - -- Add error state to wui-chip composite - -- Updated dependencies []: - - @web3modal/wagmi@4.0.10 - -## 4.0.9 - -### Patch Changes - -- Add all rpc methods + auto reject when modal closes - -- Updated dependencies []: - - @web3modal/wagmi@4.0.9 - -## 4.0.8 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8)]: - - @web3modal/wagmi@4.0.8 - -## 4.0.8-f1845392.0 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54)]: - - @web3modal/wagmi@4.0.8-f1845392.0 - -## 4.0.7 - -### Patch Changes - -- Add eth_getBalance to list of allowed methods - -- Updated dependencies []: - - @web3modal/wagmi@4.0.7 - -## 4.0.6 - -### Patch Changes - -- Email stability fixes - -- Updated dependencies []: - - @web3modal/wagmi@4.0.6 - -## 4.0.5 - -### Patch Changes - -- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks - -- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]: - - @web3modal/wagmi@4.0.5 - -## 4.0.4 - -### Patch Changes - -- Fix theming issue for email - -- Updated dependencies []: - - @web3modal/wagmi@4.0.4 - -## 4.0.3 - -### Patch Changes - -- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants - -- Updated dependencies []: - - @web3modal/wagmi@4.0.3 - -## 4.0.2 - -### Patch Changes - -- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view - -- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]: - - @web3modal/wagmi@4.0.2 - -## 4.0.1 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]: - - @web3modal/wagmi@4.0.1 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-wagmi@0.0.3 + - @reown/appkit@0.0.3 diff --git a/examples/react-wagmi/package.json b/examples/react-wagmi/package.json index 77d58b804b..ae89c36b85 100644 --- a/examples/react-wagmi/package.json +++ b/examples/react-wagmi/package.json @@ -1,7 +1,7 @@ { "name": "@examples/react-wagmi", "private": true, - "version": "5.1.8", + "version": "1.0.1", "scripts": { "dev": "vite --port 3002", "build": "vite build", @@ -9,7 +9,8 @@ }, "dependencies": { "@tanstack/react-query": "5.24.8", - "@web3modal/wagmi": "workspace:*", + "@reown/appkit-adapter-wagmi": "workspace:*", + "@reown/appkit": "workspace:*", "react": "18.2.0", "react-dom": "18.2.0", "viem": "2.21.4", diff --git a/examples/react-wagmi/src/App.tsx b/examples/react-wagmi/src/App.tsx index be57ef6a8a..0126bbaa80 100644 --- a/examples/react-wagmi/src/App.tsx +++ b/examples/react-wagmi/src/App.tsx @@ -1,13 +1,13 @@ -import { defaultWagmiConfig } from '@web3modal/wagmi/react/config' import { - createWeb3Modal, - useWeb3Modal, - useWeb3ModalEvents, - useWeb3ModalState, - useWeb3ModalTheme -} from '@web3modal/wagmi/react' + createAppKit, + useAppKit, + useAppKitEvents, + useAppKitState, + useAppKitTheme +} from '@reown/appkit/react' +import { mainnet, polygon } from '@reown/appkit/networks' +import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' import { WagmiProvider } from 'wagmi' -import { arbitrum, mainnet, polygon } from 'wagmi/chains' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { WagmiHooks } from './WagmiHooks' @@ -20,23 +20,23 @@ if (!projectId) { throw new Error('VITE_PROJECT_ID is not set') } -// 2. Create wagmiConfig -const wagmiConfig = defaultWagmiConfig({ - chains: [mainnet, polygon, arbitrum], +// 2. Setup wagmi adapter +const wagmiAdapter = new WagmiAdapter({ projectId, + networks: [mainnet, polygon] +}) + +// 3. Create modal +createAppKit({ + adapters: [wagmiAdapter], + networks: [mainnet, polygon], metadata: { name: 'AppKit', description: 'AppKit React Wagmi Example', url: '', icons: [] - } -}) - -// 3. Create modal -createWeb3Modal({ - wagmiConfig, + }, projectId, - defaultChain: polygon, themeMode: 'light', themeVariables: { '--w3m-color-mix': '#00DCFF', @@ -46,13 +46,13 @@ createWeb3Modal({ export default function App() { // 4. Use modal hook - const modal = useWeb3Modal() - const state = useWeb3ModalState() - const { themeMode, themeVariables, setThemeMode } = useWeb3ModalTheme() - const events = useWeb3ModalEvents() + const modal = useAppKit() + const state = useAppKitState() + const { themeMode, themeVariables, setThemeMode } = useAppKitTheme() + const events = useAppKitEvents() return ( - + diff --git a/examples/react-wagmi/src/WagmiHooks.tsx b/examples/react-wagmi/src/WagmiHooks.tsx index 05b236ed3b..c9af54bb7d 100644 --- a/examples/react-wagmi/src/WagmiHooks.tsx +++ b/examples/react-wagmi/src/WagmiHooks.tsx @@ -1,8 +1,9 @@ -import * as React from 'react' +import { useAppKitAccount } from '@reown/appkit/react' import { useAccount } from 'wagmi' export function WagmiHooks() { - const { isConnected, address, chainId } = useAccount() + const { address } = useAppKitAccount() + const { isConnected, chainId } = useAccount() return (
diff --git a/examples/vue-ethers5/CHANGELOG.md b/examples/vue-ethers5/CHANGELOG.md index 492ad40dc7..41243459d4 100644 --- a/examples/vue-ethers5/CHANGELOG.md +++ b/examples/vue-ethers5/CHANGELOG.md @@ -1,758 +1,63 @@ # @examples/vue-ethers5 -## 5.1.8 +## 1.0.1 ### Patch Changes -- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839 - - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802 - - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525 - - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838 - - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840 - - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849 -- Updated dependencies []: - - @web3modal/ethers5@5.1.8 +- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public -## 5.1.7 +- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]: + - @reown/appkit-adapter-ethers5@1.0.1 + - @reown/appkit@1.0.1 -### Patch Changes - -- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797 - - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722 - - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806 - - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799 - - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805 - - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810 - - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809 - - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822 - - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816 - - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825 - - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826 - - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820 - - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829 - - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815 - - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434 - - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711 -- Updated dependencies []: - - @web3modal/ethers5@5.1.7 - -## 5.1.6 - -### Patch Changes - -- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775 -- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754 -- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778 -- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787 -- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758 -- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788 -- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791 -- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774 -- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783 - -* Updated dependencies []: - - @web3modal/ethers5@5.1.6 - -## 5.1.5 - -### Patch Changes - -- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770 - - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771 - - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772 - - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776 - - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768 - - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779 - - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780 - -- Updated dependencies []: - - @web3modal/ethers5@5.1.5 - -## 5.1.4 - -### Patch Changes - -- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746 - - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741 - - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751 - - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748 - - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715 - - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747 - - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765 - - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756 - - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745 -- Updated dependencies []: - - @web3modal/ethers5@5.1.4 - -## 5.1.3 - -### Patch Changes - -- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies - -- Updated dependencies []: - - @web3modal/ethers5@5.1.3 - -## 5.1.2 - -### Patch Changes - -- Added Solana Auth Provider types and schemas - -- Updated dependencies []: - - @web3modal/ethers5@5.1.2 - -## 5.1.1 - -### Patch Changes - -- Update EthProvider to v 2.15.1 - -- Updated dependencies []: - - @web3modal/ethers5@5.1.1 - -## 5.1.0 - -### Minor Changes - -Enhanced compatibility, performance, developer experience, and user interface updates across various features - -- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638 -- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639 -- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640 -- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642 -- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628 -- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637 -- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633 -- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619 -- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648 -- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636 -- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650 -- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576 -- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574 -- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646 -- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673 -- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656 -- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674 -- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653 -- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600 -- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433 -- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834 -- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572 -- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651 -- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558 -- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644 -- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678 -- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649 -- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677 -- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615 -- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680 -- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682 -- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683 -- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679 -- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672 -- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687 -- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686 -- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685 -- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689 -- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695 -- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694 -- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658 -- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690 -- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692 -- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703 -- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704 -- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635 -- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675 -- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676 -- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702 -- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700 -- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632 -- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312 - -### New Contributors - -- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600 -- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651 -- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0 - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@5.1.0 - -## 5.0.11 - -### Patch Changes - -- - Hotfix to prevent loading state with QR code - -- Updated dependencies []: - - @web3modal/ethers5@5.0.11 - -## 5.0.10 - -- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612 -- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585 -- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10 - -- Updated dependencies []: - - @web3modal/ethers5@5.0.10 - -## 5.0.9 - -### Patch Changes - -- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 - - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603 - -**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9 - -## 5.0.8 - -### Patch Changes - -- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548 - - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547 - - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565 - - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521 - - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563 - - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567 - - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545 - - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573 - - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582 - - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557 - - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562 - - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560 - - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571 - - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575 - - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580 - - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587 - - **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8 - -- Updated dependencies []: - - @web3modal/ethers5@5.0.8 - -## 5.0.7 - -### Patch Changes - -- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286 - - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449 - - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504 - - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388 - - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523 - - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482 - - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526 - - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119 - - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289 - - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500 - - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497 - - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520 - - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529 - - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535 - - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530 - - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538 - - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305 - - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537 - - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410 - - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447 - - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423 - - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541 - - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552 - - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544 -- Updated dependencies []: - - @web3modal/ethers5@5.0.7 - -## 5.0.6 - -### Patch Changes - -- fix: Social Login illegal invocation issue. Wagmi tests - -- Updated dependencies []: - - @web3modal/ethers5@5.0.6 - -## 5.0.5 - -### Patch Changes - -- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation' - -- Updated dependencies []: - - @web3modal/ethers5@5.0.5 - -## 5.0.4 - -### Patch Changes - -- fix: wcPromise incompatibility issues - -- Updated dependencies []: - - @web3modal/ethers5@5.0.4 - -## 5.0.3 - -### Patch Changes - -- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector. - -- Updated dependencies []: - - @web3modal/ethers5@5.0.3 - -## 5.0.2 - -### Patch Changes - -- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue - -- Updated dependencies []: - - @web3modal/ethers5@5.0.2 - -## 5.0.1 - -### Patch Changes - -- fix: remove walletconnect restriction on names - -- Updated dependencies []: - - @web3modal/ethers5@5.0.1 - -## 5.0.0 +## 1.0.0 ### Major Changes -- Release V5 +- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0 ### Patch Changes -- Updated dependencies []: - - @web3modal/ethers5@5.0.0 +- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name -## 5.0.0-cn-v5.0 +- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect -### Major Changes +- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]: + - @reown/appkit-adapter-ethers5@1.0.0 + - @reown/appkit@1.0.0 -- Test V5 +## 0.0.5 ### Patch Changes -- Updated dependencies []: - - @web3modal/ethers5@5.0.0-cn-v5.0 +- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically -## 4.2.3 +- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values -### Patch Changes - -- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers - -- Updated dependencies []: - - @web3modal/ethers5@4.2.3 - -## 4.2.3-alpha.0 - -### Patch Changes - -- feat: add support for coinbase smart accounts +- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController -- Updated dependencies []: - - @web3modal/ethers5@4.2.3-alpha.0 +- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]: + - @reown/appkit@0.0.5 + - @reown/appkit-adapter-ethers5@0.0.5 -## 4.2.2 +## 0.0.4 ### Patch Changes -- feat: social login refactor. wagmi sendCalls support. refactor theme variables +- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup. -- Updated dependencies []: - - @web3modal/ethers5@4.2.2 +- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]: + - @reown/appkit-adapter-ethers5@0.0.4 + - @reown/appkit@0.0.4 -## 4.2.1 +## 0.0.3 ### Patch Changes -- Hotfix to support injected and announced wallets in in app browsers - -- Updated dependencies []: - - @web3modal/ethers5@4.2.1 - -## 4.2.0 - -### Patch Changes - -- release: 4.2.0 version release - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0 - -## 4.2.0-alpha.0 - -### Patch Changes - -- feat: 4.2.0-alpha release - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-alpha.0 - -## 4.2.0-03e4f4a8.2 - -### Patch Changes - -- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal' - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-03e4f4a8.2 - -## 4.2.0-448f7f4.1 - -### Minor Changes - -- refactor: improvements to all features (siwe, send, swaps, ui and ux) - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-448f7f4.1 - -## 4.1.12-910a844.0 - -### Patch Changes - -- refactor: sync theme with secure site - -- Updated dependencies []: - - @web3modal/ethers5@4.1.12-910a844.0 - -## 4.1.11 - -### Patch Changes - -- refactor: Solana exported helper methods and proram instruction improvements -- refactor: email and smart account improvements -- refactor: unit test CI check improvements -- feat: convert - -- Updated dependencies []: - - @web3modal/ethers5@4.1.11 - -## 4.1.10 - -### Patch Changes - -- Fix activity list styling issue - -- Updated dependencies []: - - @web3modal/ethers5@4.1.10 - -## 4.1.9 - -### Patch Changes - -- Blockchain API fix - -- Updated dependencies []: - - @web3modal/ethers5@4.1.9 - -## 4.1.8 - -### Patch Changes - -- Hotfix for redundant tokenbalance calls - -- Updated dependencies []: - - @web3modal/ethers5@4.1.8 - -## 4.1.7 - -### Patch Changes - -- Hotfix for inccorect state of w3m-button when email is enabled - -- Updated dependencies []: - - @web3modal/ethers5@4.1.7 - -## 4.1.6 - -### Patch Changes - -- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site. - -- Updated dependencies []: - - @web3modal/ethers5@4.1.6 - -## 4.1.6-a0733f5.0 - -### Patch Changes - -- chore: canary release for siwe dependency - -- Updated dependencies []: - - @web3modal/ethers@4.1.6-a0733f5.0 - - @web3modal/siwe@4.1.6-a0733f5.0 - - @web3modal/solana@4.1.6-a0733f5.0 - - @web3modal/wagmi@4.1.6-a0733f5.0 - -## 4.1.5 - -### Patch Changes - -- release: v4.1.5 - -- Updated dependencies []: - - @web3modal/ethers5@4.1.5 - -## 4.1.5-93c81127.0 - -### Patch Changes - -- fix: polyfill process in wallet package - -- Updated dependencies []: - - @web3modal/ethers5@4.1.5-93c81127.0 - -## 4.1.4 - -### Patch Changes - -- feat: wallet info hook - -- Updated dependencies []: - - @web3modal/ethers5@4.1.4 - -## 4.1.3 - -### Patch Changes - -- feat: wallet info hook - -- feat: reset version to 4.1.3 - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3 - -## 4.1.3-5f2ae345.1 - -### Patch Changes - -- canary: test imports - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3-5f2ae345.1 - -## 4.1.3-8e039e.0 - -### Patch Changes - -- feat: update optional dependencies - -- Updated dependencies []: - - @web3modal/ethers5@4.1.3-8e039e.0 - -## 4.1.2 - -### Patch Changes - -- 4.1.2 release - -- Updated dependencies []: - - @web3modal/ethers5@4.1.2 - -## 4.2.0-4b5257b4.1 - -### Minor Changes - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436) Thanks [@enesozturk](https://github.com/enesozturk)! - refactor: add missing extensions on imports - -- feat: export solana chains from the solana package - -- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07) Thanks [@enesozturk](https://github.com/enesozturk)! - chore: new solana canary release - -### Patch Changes - -- Updated dependencies [[`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436), [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07)]: - - @web3modal/ethers5@4.2.0-4b5257b4.1 - -## 4.2.0-dbbd8c44.0 - -### Minor Changes - -- refactor: add missing extensions on imports - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ui@4.2.0-dbbd8c44.0 - - @web3modal/common@4.2.0-dbbd8c44.0 - -## 4.2.0-500a38.0 - -### Minor Changes - -- feat: solana integration - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.2.0-500a38.0 - -## 4.1.1 - -### Patch Changes - -- Fix siwe version - -- Updated dependencies []: - - @web3modal/ethers5@4.1.1 - -## 4.1.0 - -### Minor Changes - -- Email Stable release - -### Patch Changes - -- Updated dependencies []: - - @web3modal/ethers5@4.1.0 - -## 4.0.13 - -### Patch Changes - -- Fix secure site url - -- Updated dependencies []: - - @web3modal/ethers5@4.0.13 - -## 4.0.12 - -### Patch Changes - -- [#2014](https://github.com/WalletConnect/web3modal/pull/2014) [`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0) Thanks [@tomiir](https://github.com/tomiir)! - Smart Account RPC handler canary - -- Smart Account initialization and feature flag - -- Updated dependencies [[`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0)]: - - @web3modal/ethers5@4.0.12 - -## 4.0.12-0c59f84f.0 - -### Patch Changes - -- Smart Account RPC handler canary - -- Updated dependencies []: - - @web3modal/ethers5@4.0.12-0c59f84f.0 - -## 4.0.11 - -### Patch Changes - -- Analytics connection event improvements. Unsupported chain flag. Siwe package refactor. RPC improvements. UI improvements' - -- Updated dependencies []: - - @web3modal/ethers5@4.0.11 - -## 4.0.10 - -### Patch Changes - -- Add error state to wui-chip composite - -- Updated dependencies []: - - @web3modal/ethers5@4.0.10 - -## 4.0.9 - -### Patch Changes - -- Add all rpc methods + auto reject when modal closes - -- Updated dependencies []: - - @web3modal/ethers5@4.0.9 - -## 4.0.8 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8)]: - - @web3modal/ethers5@4.0.8 - -## 4.0.8-f1845392.0 - -### Patch Changes - -- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber - -- Updated dependencies [[`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54)]: - - @web3modal/ethers5@4.0.8-f1845392.0 - -## 4.0.7 - -### Patch Changes - -- Add eth_getBalance to list of allowed methods - -- Updated dependencies []: - - @web3modal/ethers5@4.0.7 - -## 4.0.6 - -### Patch Changes - -- Email stability fixes - -- Updated dependencies []: - - @web3modal/ethers5@4.0.6 - -## 4.0.5 - -### Patch Changes - -- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks - -- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]: - - @web3modal/ethers5@4.0.5 - -## 4.0.4 - -### Patch Changes - -- Fix theming issue for email - -- Updated dependencies []: - - @web3modal/ethers5@4.0.4 - -## 4.0.3 - -### Patch Changes - -- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants - -- Updated dependencies []: - - @web3modal/ethers5@4.0.3 - -## 4.0.2 - -### Patch Changes - -- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view - -- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]: - - @web3modal/ethers5@4.0.2 - -## 4.0.1 - -### Patch Changes +- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs -- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package +- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file -- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]: - - @web3modal/ethers5@4.0.1 +- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]: + - @reown/appkit-adapter-ethers5@0.0.3 + - @reown/appkit@0.0.3 diff --git a/examples/vue-ethers5/package.json b/examples/vue-ethers5/package.json index a96bb99b15..8de94ad8e5 100644 --- a/examples/vue-ethers5/package.json +++ b/examples/vue-ethers5/package.json @@ -1,13 +1,14 @@ { "name": "@examples/vue-ethers5", "private": true, - "version": "5.1.8", + "version": "1.0.1", "scripts": { "dev": "vite --port 3013", "build": "vite build" }, "dependencies": { - "@web3modal/ethers5": "workspace:*", + "@reown/appkit-adapter-ethers5": "workspace:*", + "@reown/appkit": "workspace:*", "ethers": "5.7.2", "vue": "3.4.3" }, diff --git a/examples/vue-ethers5/src/App.vue b/examples/vue-ethers5/src/App.vue index 2063f2cbdd..d0b2fd0c83 100644 --- a/examples/vue-ethers5/src/App.vue +++ b/examples/vue-ethers5/src/App.vue @@ -1,12 +1,13 @@