Skip to content

Commit

Permalink
chore: merge v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Gancho Radkov committed May 7, 2024
2 parents 86e47a7 + 010e854 commit c47129f
Show file tree
Hide file tree
Showing 115 changed files with 5,901 additions and 3,874 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:

code_style:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
strategy:
matrix:
style-command:
Expand Down
13 changes: 2 additions & 11 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# @apps/demo

## 4.1.12-sign-2.5.2

### Patch Changes

- fix: Email transaction approval

- Updated dependencies []:
- @web3modal/wagmi@4.1.12-sign-2.5.2

## 4.1.12-910a844.0

### Patch Changes
Expand All @@ -22,7 +13,7 @@

### Patch Changes

- refactor: Solana exported helper methods and proram instruction improvements
- refactor: Solana exported helper methods and program instruction improvements
- refactor: email and smart account improvements
- refactor: unit test CI check improvements
- feat: convert
Expand Down Expand Up @@ -61,7 +52,7 @@

### Patch Changes

- Hotfix for inccorect state of w3m-button when email is enabled
- Hotfix for incorrect state of w3m-button when email is enabled

- Updated dependencies []:
- @web3modal/wagmi@4.1.7
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": "4.1.12-sign-2.5.2",
"version": "4.1.12-910a844.0",
"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": "4.1.12-sign-2.5.2",
"@web3modal/wagmi": "4.1.12-910a844.0",
"clsx": "2.1.0",
"framer-motion": "11.0.8",
"next": "14.1.1",
Expand Down
12 changes: 1 addition & 11 deletions apps/gallery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# @apps/gallery

## 4.1.12-sign-2.5.2

### Patch Changes

- fix: Email transaction approval

- Updated dependencies []:
- @web3modal/common@4.1.12-sign-2.5.2
- @web3modal/ui@4.1.12-sign-2.5.2

## 4.1.12-910a844.0

### Patch Changes
Expand Down Expand Up @@ -67,7 +57,7 @@

### Patch Changes

- Hotfix for inccorect state of w3m-button when email is enabled
- Hotfix for incorrect state of w3m-button when email is enabled

- Updated dependencies []:
- @web3modal/common@4.1.7
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": "4.1.12-sign-2.5.2",
"version": "4.1.12-910a844.0",
"private": true,
"main": "index.js",
"scripts": {
Expand All @@ -9,8 +9,8 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"@web3modal/common": "4.1.12-sign-2.5.2",
"@web3modal/ui": "4.1.12-sign-2.5.2",
"@web3modal/common": "4.1.12-910a844.0",
"@web3modal/ui": "4.1.12-910a844.0",
"lit": "3.1.0",
"storybook": "7.6.7"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-tooltip-select'
import type { WuiTooltipSelect } from '@web3modal/ui/src/composites/wui-tooltip-select'
import '@web3modal/ui/src/composites/wui-icon-button'
import type { WuiIconButton } from '@web3modal/ui/src/composites/wui-icon-button'
import { html } from 'lit'
import '../../components/gallery-container'
import { iconOptions } from '../../utils/PresetUtils'

type Component = Meta<WuiTooltipSelect>
type Component = Meta<WuiIconButton>

export default {
title: 'Composites/wui-tooltip-select',
title: 'Composites/wui-icon-button',
args: {
icon: 'card',
text: 'Buy'
Expand All @@ -23,8 +23,8 @@ export default {

export const Default: Component = {
render: args => html`
<gallery-container width="120"
><wui-tooltip-select icon=${args.icon} text=${args.text}></wui-tooltip-select>
<gallery-container width="120">
<wui-icon-button icon=${args.icon} text=${args.text}></wui-icon-button>
</gallery-container>
`
}
12 changes: 0 additions & 12 deletions apps/laboratory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# @apps/laboratory

## 4.1.12-sign-2.5.2

### Patch Changes

- fix: Email transaction approval

- Updated dependencies []:
- @web3modal/ethers@4.1.12-sign-2.5.2
- @web3modal/wagmi@4.1.12-sign-2.5.2
- @web3modal/siwe@4.1.12-sign-2.5.2
- @web3modal/solana@4.1.12-sign-2.5.2

## 4.1.12-910a844.0

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions apps/laboratory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apps/laboratory",
"version": "4.1.12-sign-2.5.2",
"version": "4.1.12-910a844.0",
"private": true,
"scripts": {
"dev:laboratory": "next dev",
Expand Down Expand Up @@ -31,10 +31,10 @@
"@sentry/react": "7.92.0",
"@solana/web3.js": "1.87.6",
"@tanstack/react-query": "5.24.8",
"@web3modal/ethers": "4.1.12-sign-2.5.2",
"@web3modal/siwe": "4.1.12-sign-2.5.2",
"@web3modal/solana": "4.1.12-sign-2.5.2",
"@web3modal/wagmi": "4.1.12-sign-2.5.2",
"@web3modal/ethers": "4.1.12-910a844.0",
"@web3modal/siwe": "4.1.12-910a844.0",
"@web3modal/solana": "4.1.12-910a844.0",
"@web3modal/wagmi": "4.1.12-910a844.0",
"ethers": "6.9.0",
"framer-motion": "10.17.9",
"next": "14.0.4",
Expand Down
19 changes: 19 additions & 0 deletions apps/laboratory/public/.well-known/apple-app-site-association
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"applinks": {
"apps": [],
"details": [
{
"appID": "W5R8AG9K22.com.walletconnect.dapp",
"paths": ["/dapp*"]
},
{
"appID": "W5R8AG9K22.com.walletconnect.walletapp",
"paths": ["/wallet*"]
},
{
"appID": "W5R8AG9K22.com.walletconnect.universal-link-test",
"paths": ["/test*"]
}
]
}
}
26 changes: 26 additions & 0 deletions apps/laboratory/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,32 @@ import { wagmiSdkOptions, ethersSdkOptions, solanaSdkOptions } from '../utils/Da
export default function HomePage() {
return (
<>
<Card marginTop={20}>
<CardHeader>
<Heading size="md">Testing</Heading>
</CardHeader>

<CardBody>
<Stack divider={<StackDivider />} spacing="4">
<Box>
<Stack direction="row" justifyContent="space-between" alignItems="center">
<Box>
<Heading size="xs" textTransform="uppercase">
Testing
</Heading>
<Text pt="2" fontSize="sm">
Configuration with all features enabled and randomly using ethers or wagmi
</Text>
</Box>
<Link href={Math.random() > 0.5 ? '/library/wagmi-all' : '/library/ethers-all'}>
<Button rightIcon={<IoArrowForward />}>Go</Button>
</Link>
</Stack>
</Box>
</Stack>
</CardBody>
</Card>

<Card marginTop={20}>
<CardHeader>
<Heading size="md">Wagmi</Heading>
Expand Down
39 changes: 39 additions & 0 deletions apps/laboratory/src/pages/library/ethers-all.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { createWeb3Modal, defaultConfig } from '@web3modal/ethers/react'
import { ThemeStore } from '../../utils/StoreUtil'
import { EthersConstants } from '../../utils/EthersConstants'
import { ConstantsUtil } from '../../utils/ConstantsUtil'
import { EthersTests } from '../../components/Ethers/EthersTests'
import { Web3ModalButtons } from '../../components/Web3ModalButtons'
import { siweConfig } from '../../utils/SiweUtils'
import { SiweData } from '../../components/Siwe/SiweData'

const modal = createWeb3Modal({
ethersConfig: defaultConfig({
metadata: ConstantsUtil.Metadata,
defaultChainId: 1,
rpcUrl: 'https://cloudflare-eth.com',
enableEmail: true
}),
chains: EthersConstants.chains,
projectId: ConstantsUtil.ProjectId,
enableAnalytics: true,
metadata: ConstantsUtil.Metadata,
termsConditionsUrl: 'https://walletconnect.com/terms',
privacyPolicyUrl: 'https://walletconnect.com/privacy',
siweConfig,
enableOnramp: true,
customWallets: ConstantsUtil.CustomWallets,
enableWalletFeatures: true
})

ThemeStore.setModal(modal)

export default function Ethers() {
return (
<>
<Web3ModalButtons />
<SiweData />
<EthersTests />
</>
)
}
55 changes: 55 additions & 0 deletions apps/laboratory/src/pages/library/wagmi-all.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { createWeb3Modal } from '@web3modal/wagmi/react'
import { defaultWagmiConfig } from '@web3modal/wagmi/react/config'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { useEffect, useState } from 'react'
import { WagmiProvider } from 'wagmi'
import { Web3ModalButtons } from '../../components/Web3ModalButtons'
import { WagmiTests } from '../../components/Wagmi/WagmiTests'
import { ThemeStore } from '../../utils/StoreUtil'
import { WagmiConstantsUtil } from '../../utils/WagmiConstants'
import { ConstantsUtil } from '../../utils/ConstantsUtil'
import { SiweData } from '../../components/Siwe/SiweData'
import { siweConfig } from '../../utils/SiweUtils'

const queryClient = new QueryClient()

export const wagmiConfig = defaultWagmiConfig({
chains: WagmiConstantsUtil.chains,
projectId: ConstantsUtil.ProjectId,
metadata: ConstantsUtil.Metadata,
enableEmail: true,
ssr: true
})

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

ThemeStore.setModal(modal)

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

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

return ready ? (
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
<Web3ModalButtons />
<SiweData />
<WagmiTests />
</QueryClientProvider>
</WagmiProvider>
) : null
}
13 changes: 10 additions & 3 deletions apps/laboratory/tests/canary.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ testConnectedMW.beforeEach(async ({ modalValidator, walletValidator }) => {
timeEnd('beforeEach expectConnection')
})

testConnectedMW.afterEach(async ({ browserName }, testInfo) => {
testConnectedMW.afterEach(async ({ browserName, timingRecords }, testInfo) => {
if (browserName === 'firefox') {
return
}
Expand All @@ -28,21 +28,28 @@ testConnectedMW.afterEach(async ({ browserName }, testInfo) => {
'https://lab.web3modal.com/',
'HappyPath.sign',
testInfo.status === 'passed',
duration
duration,
timingRecords
)
timeEnd('uploadCanaryResultsToCloudWatch')
}
})

testConnectedMW(
'it should sign',
async ({ modalPage, walletPage, modalValidator, walletValidator }) => {
async ({ modalPage, walletPage, modalValidator, walletValidator, timingRecords }) => {
timeStart('modalPage.sign()')
await modalPage.sign()
timeEnd('modalPage.sign()')
const signRequestedTime = new Date()
timeStart('walletValidator.expectReceivedSign')
await walletValidator.expectReceivedSign({})
timeEnd('walletValidator.expectReceivedSign')
const signReceivedTime = new Date()
timingRecords.push({
item: 'sign',
timeMs: signReceivedTime.getTime() - signRequestedTime.getTime()
})
timeStart('walletPage.handleRequest')
await walletPage.handleRequest({ accept: true })
timeEnd('walletPage.handleRequest')
Expand Down
11 changes: 11 additions & 0 deletions apps/laboratory/tests/shared/fixtures/timing-fixture.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { test as base } from '@playwright/test'

export type TimingRecords = { item: string; timeMs: number }[]

export interface TimingFixture {
timingRecords: TimingRecords
}

export const timingFixture = base.extend<TimingFixture>({
timingRecords: []
})
4 changes: 2 additions & 2 deletions apps/laboratory/tests/shared/fixtures/w3m-email-fixture.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { test as base } from '@playwright/test'
import type { ModalFixture } from './w3m-fixture'
import { ModalPage } from '../pages/ModalPage'
import { ModalValidator } from '../validators/ModalValidator'
import { Email } from '../utils/email'
import { timingFixture } from './timing-fixture'

export const testMEmail = base.extend<ModalFixture>({
export const testMEmail = timingFixture.extend<ModalFixture>({
library: ['wagmi', { option: true }],
modalPage: async ({ page, library, context }, use, testInfo) => {
const modalPage = new ModalPage(page, library, 'email')
Expand Down
Loading

0 comments on commit c47129f

Please sign in to comment.