Skip to content

Commit

Permalink
release: 5.0.3 (#2453)
Browse files Browse the repository at this point in the history
Co-authored-by: Enes <enesozturk.d@gmail.com>
Co-authored-by: Ben Kremer <ben@walletconnect.com>
Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>
Co-authored-by: Luka Isailovic <lukaisailovic@gmail.com>
Co-authored-by: Ignacio Santise <nacho@walletconnect.com>
  • Loading branch information
6 people authored Jun 20, 2024
1 parent f1261de commit 9ce372e
Show file tree
Hide file tree
Showing 251 changed files with 3,150 additions and 881 deletions.
9 changes: 9 additions & 0 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @apps/demo

## 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
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apps/demo",
"version": "5.0.2",
"version": "5.0.3",
"private": true,
"scripts": {
"dev:demo": "next dev",
Expand All @@ -11,7 +11,7 @@
"dependencies": {
"@radix-ui/react-switch": "1.0.3",
"@tanstack/react-query": "5.24.8",
"@web3modal/wagmi": "5.0.2",
"@web3modal/wagmi": "5.0.3",
"clsx": "2.1.0",
"framer-motion": "11.0.8",
"next": "14.2.3",
Expand Down
10 changes: 10 additions & 0 deletions apps/gallery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @apps/gallery

## 5.0.3

### Patch Changes

- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector.

- Updated dependencies []:
- @web3modal/common@5.0.3
- @web3modal/ui@5.0.3

## 5.0.2

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions apps/gallery/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apps/gallery",
"version": "5.0.2",
"version": "5.0.3",
"private": true,
"main": "index.js",
"scripts": {
Expand All @@ -9,8 +9,8 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"@web3modal/common": "5.0.2",
"@web3modal/ui": "5.0.2",
"@web3modal/common": "5.0.3",
"@web3modal/ui": "5.0.3",
"lit": "3.1.0",
"storybook": "7.6.7"
},
Expand Down

This file was deleted.

12 changes: 12 additions & 0 deletions apps/laboratory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @apps/laboratory

## 5.0.3

### Patch Changes

- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector.

- Updated dependencies []:
- @web3modal/ethers@5.0.3
- @web3modal/siwe@5.0.3
- @web3modal/solana@5.0.3
- @web3modal/wagmi@5.0.3

## 5.0.2

### Patch Changes
Expand Down
15 changes: 9 additions & 6 deletions apps/laboratory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apps/laboratory",
"version": "5.0.2",
"version": "5.0.3",
"private": true,
"scripts": {
"dev:laboratory": "next dev",
Expand All @@ -10,6 +10,7 @@
"playwright:start": "npm run start:laboratory",
"playwright:install": "playwright install --with-deps",
"playwright:test": "playwright test",
"playwright:test:basic": "playwright test --grep 'basic-tests.spec.ts'",
"playwright:test:wallet": "playwright test --grep 'connect-qr.spec.ts|wallet.spec.ts'",
"playwright:test:email": "playwright test --grep 'email.spec.ts'",
"playwright:test:social": "playwright test --grep 'social.spec.ts'",
Expand All @@ -19,6 +20,7 @@
"playwright:test:sa": "playwright test --grep smart-account.spec.ts",
"playwright:test:canary": "playwright test --retries=0 --grep canary.spec.ts --project='Desktop Chrome/wagmi'",
"playwright:debug": "npm run playwright:test -- --debug",
"playwright:debug:basic": "npm run playwright:test:basic -- --debug",
"playwright:debug:wallet": "npm run playwright:test:wallet -- --debug",
"playwright:debug:email": "npm run playwright:test:email -- --debug",
"playwright:debug:social": "npm run playwright:test:social -- --debug",
Expand All @@ -37,10 +39,10 @@
"@sentry/react": "7.92.0",
"@solana/web3.js": "1.91.7",
"@tanstack/react-query": "5.24.8",
"@web3modal/ethers": "5.0.2",
"@web3modal/siwe": "5.0.2",
"@web3modal/solana": "5.0.2",
"@web3modal/wagmi": "5.0.2",
"@web3modal/ethers": "5.0.3",
"@web3modal/siwe": "5.0.3",
"@web3modal/solana": "5.0.3",
"@web3modal/wagmi": "5.0.3",
"ethers": "6.13.0",
"framer-motion": "10.17.9",
"next": "14.2.3",
Expand All @@ -50,7 +52,8 @@
"valtio": "1.11.2",
"viem": "2.10.3",
"wagmi": "2.9.10",
"@wagmi/connectors": "5.0.8"
"@wagmi/connectors": "5.0.8",
"rpc-websockets": "7.11.0"
},
"devDependencies": {
"@aws-sdk/client-cloudwatch": "3.509.0",
Expand Down
24 changes: 21 additions & 3 deletions apps/laboratory/public/.well-known/apple-app-site-association
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,33 @@
"details": [
{
"appID": "W5R8AG9K22.com.walletconnect.dapp",
"paths": ["/dapp*"]
"paths": [
"/dapp*"
]
},
{
"appID": "W5R8AG9K22.com.walletconnect.walletapp",
"paths": ["/wallet*"]
"paths": [
"/wallet*"
]
},
{
"appID": "W5R8AG9K22.com.walletconnect.web3modal.sample",
"paths": ["/web3modal_example*"]
"paths": [
"/web3modal_example*"
]
},
{
"appID": "W5R8AG9K22.com.walletconnect.web3modal.rnsample.internal",
"paths": [
"/appkit_rn*"
]
},
{
"appID": "W5R8AG9K22.com.walletconnect.web3wallet.rnsample.internal",
"paths": [
"/walletkit_rn*"
]
}
]
}
Expand Down
53 changes: 53 additions & 0 deletions apps/laboratory/src/pages/library/external.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { createWeb3Modal } from '@web3modal/wagmi/react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { useEffect, useState } from 'react'
import { WagmiProvider, createConfig, http } from 'wagmi'
import { Web3ModalButtons } from '../../components/Web3ModalButtons'
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 'viem/chains'
import { externalTestConnector } from '../../utils/ConnectorUtil'

const queryClient = new QueryClient()

const connectors = [externalTestConnector()]

const wagmiConfig = createConfig({
chains: [mainnet],
connectors,
transports: {
1: http()
},
multiInjectedProviderDiscovery: false
})

const modal = createWeb3Modal({
wagmiConfig,
projectId: ConstantsUtil.ProjectId,
enableAnalytics: true,
metadata: ConstantsUtil.Metadata,
termsConditionsUrl: 'https://walletconnect.com/terms',
privacyPolicyUrl: 'https://walletconnect.com/privacy'
})

ThemeStore.setModal(modal)

export default function Wagmi() {
const [ready, setReady] = useState(false)

useEffect(() => {
setReady(true)
}, [])

return ready ? (
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
<Web3ModalButtons />
<WagmiModalInfo />
<WagmiTests />
</QueryClientProvider>
</WagmiProvider>
) : null
}
77 changes: 77 additions & 0 deletions apps/laboratory/src/utils/ConnectorUtil.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import { createConnector } from '@wagmi/core'

interface ConnectOptions {
chainId?: number
}

// -- Connector ------------------------------------------------------------------------------------
export function externalTestConnector() {
type Properties = {
provider?: () => Record<string, never>
}

return createConnector<() => Record<string, never>, Properties>(() => ({
id: 'externalTestConnector',
name: 'Web3Modal external',
type: 'externalTestConnector',

async connect(options: ConnectOptions = {}) {
return Promise.resolve({
options,
accounts: [],
account: '',
chainId: 0,
chain: {
id: 0,
unsuported: false
}
})
},

async disconnect() {
return Promise.resolve()
},

async getAccounts() {
return Promise.resolve([])
},

async getProvider() {
return Promise.resolve(() => ({}))
},

async getChainId() {
return Promise.resolve(0)
},

async isAuthorized() {
return Promise.resolve(false)
},

async switchChain({ chainId }) {
return Promise.resolve({
chainId,
rpcUrls: { default: { http: [''] } },
id: 0,
name: '',
nativeCurrency: { name: 'Test', symbol: '', decimals: 10 }
})
},

onAccountsChanged(accounts) {
return accounts
},

onChainChanged(chain) {
return chain
},

async onConnect(connectInfo) {
return Promise.resolve(connectInfo)
},

async onDisconnect(_error) {
return Promise.resolve()
}
}))
}
8 changes: 8 additions & 0 deletions apps/laboratory/tests/basic-tests.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { testMExternal } from './shared/fixtures/w3m-external-fixture'
import { testM, expect } from './shared/fixtures/w3m-fixture'

testM.describe('Modal only tests', () => {
Expand All @@ -6,3 +7,10 @@ testM.describe('Modal only tests', () => {
await expect(modalPage.page.getByTestId('all-wallets')).toBeVisible()
})
})

testMExternal.describe('External connectors tests', () => {
testMExternal('Should show external connectors', async ({ modalPage, modalValidator }) => {
await modalPage.page.getByTestId('connect-button').click()
await modalValidator.expectExternalVisible()
})
})
17 changes: 17 additions & 0 deletions apps/laboratory/tests/shared/fixtures/w3m-external-fixture.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { ModalFixture } from './w3m-fixture'
import { ModalPage } from '../pages/ModalPage'
import { ModalValidator } from '../validators/ModalValidator'
import { timingFixture } from './timing-fixture'

export const testMExternal = timingFixture.extend<ModalFixture>({
library: ['wagmi', { option: true }],
modalPage: async ({ page, library }, use) => {
const modalPage = new ModalPage(page, library, 'external')
await modalPage.load()
await use(modalPage)
},
modalValidator: async ({ modalPage }, use) => {
const modalValidator = new ModalValidator(modalPage.page)
await use(modalValidator)
}
})
Loading

0 comments on commit 9ce372e

Please sign in to comment.