Skip to content

Commit

Permalink
Merge branch 'V4' into refactor/remove-modal-open-animation-delay
Browse files Browse the repository at this point in the history
  • Loading branch information
enesozturk authored Apr 2, 2024
2 parents 07dc435 + 75855d6 commit 1bda709
Show file tree
Hide file tree
Showing 120 changed files with 1,612 additions and 828 deletions.
12 changes: 6 additions & 6 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# @apps/demo

## 4.1.3
## 4.1.3-5f2ae345.1

### Patch Changes

- feat: release new schema for secure site
- canary: test imports

- Updated dependencies []:
- @web3modal/wagmi@4.1.3
- @web3modal/wagmi@4.1.3-5f2ae345.1

## 4.1.3-c46ed093.0
## 4.1.3-8e039e.0

### Patch Changes

- canary: test secure site types
- feat: update optional dependencies

- Updated dependencies []:
- @web3modal/wagmi@4.1.3-c46ed093.0
- @web3modal/wagmi@4.1.3-8e039e.0

## 4.1.2

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.3",
"version": "4.1.3-5f2ae345.1",
"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.3",
"@web3modal/wagmi": "4.1.3-5f2ae345.1",
"clsx": "2.1.0",
"framer-motion": "11.0.8",
"next": "14.1.1",
Expand Down
16 changes: 8 additions & 8 deletions apps/gallery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# @apps/gallery

## 4.1.3
## 4.1.3-5f2ae345.1

### Patch Changes

- feat: release new schema for secure site
- canary: test imports

- Updated dependencies []:
- @web3modal/common@4.1.3
- @web3modal/ui@4.1.3
- @web3modal/common@4.1.3-5f2ae345.1
- @web3modal/ui@4.1.3-5f2ae345.1

## 4.1.3-c46ed093.0
## 4.1.3-8e039e.0

### Patch Changes

- canary: test secure site types
- feat: update optional dependencies

- Updated dependencies []:
- @web3modal/common@4.1.3-c46ed093.0
- @web3modal/ui@4.1.3-c46ed093.0
- @web3modal/common@4.1.3-8e039e.0
- @web3modal/ui@4.1.3-8e039e.0

## 4.1.2

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.3",
"version": "4.1.3-5f2ae345.1",
"private": true,
"main": "index.js",
"scripts": {
Expand All @@ -9,8 +9,8 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"@web3modal/common": "4.1.3",
"@web3modal/ui": "4.1.3",
"@web3modal/common": "4.1.3-5f2ae345.1",
"@web3modal/ui": "4.1.3-5f2ae345.1",
"lit": "3.1.0",
"storybook": "7.6.7"
},
Expand Down
24 changes: 12 additions & 12 deletions apps/laboratory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# @apps/laboratory

## 4.1.3
## 4.1.3-5f2ae345.1

### Patch Changes

- feat: release new schema for secure site
- canary: test imports

- Updated dependencies []:
- @web3modal/ethers@4.1.3
- @web3modal/siwe@4.1.3
- @web3modal/solana@4.1.3
- @web3modal/wagmi@4.1.3
- @web3modal/ethers@4.1.3-5f2ae345.1
- @web3modal/solana@4.1.3-5f2ae345.1
- @web3modal/wagmi@4.1.3-5f2ae345.1
- @web3modal/siwe@4.1.3-5f2ae345.1

## 4.1.3-c46ed093.0
## 4.1.3-8e039e.0

### Patch Changes

- canary: test secure site types
- feat: update optional dependencies

- Updated dependencies []:
- @web3modal/ethers@4.1.3-c46ed093.0
- @web3modal/siwe@4.1.3-c46ed093.0
- @web3modal/solana@4.1.3-c46ed093.0
- @web3modal/wagmi@4.1.3-c46ed093.0
- @web3modal/ethers@4.1.3-8e039e.0
- @web3modal/solana@4.1.3-8e039e.0
- @web3modal/wagmi@4.1.3-8e039e.0
- @web3modal/siwe@4.1.3-8e039e.0

## 4.1.2

Expand Down
12 changes: 7 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.3",
"version": "4.1.3-5f2ae345.1",
"private": true,
"scripts": {
"dev:laboratory": "next dev",
Expand All @@ -12,11 +12,13 @@
"playwright:test:wallet": "playwright test --grep 'connect-qr.spec.ts|wallet.spec.ts'",
"playwright:test:email": "playwright test --grep 'email.spec.ts'",
"playwright:test:siwe": "playwright test --grep siwe.spec.ts",
"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:wallet": "npm run playwright:test:wallet -- --debug",
"playwright:debug:email": "npm run playwright:test:email -- --debug",
"playwright:debug:siwe": "npm run playwright:test:siwe -- --debug",
"playwright:debug:sa": "npm run playwright:test:sa -- --debug",
"playwright:debug:canary": "npm run playwright:test:canary -- --debug"
},
"dependencies": {
Expand All @@ -27,10 +29,10 @@
"@sentry/react": "7.92.0",
"@solana/web3.js": "1.87.6",
"@tanstack/react-query": "5.24.8",
"@web3modal/ethers": "4.1.3",
"@web3modal/siwe": "4.1.3",
"@web3modal/solana": "4.1.3",
"@web3modal/wagmi": "4.1.3",
"@web3modal/ethers": "4.1.3-5f2ae345.1",
"@web3modal/siwe": "4.1.3-5f2ae345.1",
"@web3modal/solana": "4.1.3-5f2ae345.1",
"@web3modal/wagmi": "4.1.3-5f2ae345.1",
"ethers": "6.9.0",
"framer-motion": "10.17.9",
"next": "14.0.4",
Expand Down
12 changes: 6 additions & 6 deletions apps/laboratory/src/components/Ethers/EthersTransactionTest.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, useToast, Stack, Link, Text, Spacer } from '@chakra-ui/react'
import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react'
import { BrowserProvider, JsonRpcSigner, ethers } from 'ethers'
import { sepolia } from '../../utils/ChainsUtil'
import { sepolia, optimism } from '../../utils/ChainsUtil'
import { useState } from 'react'
import { vitalikEthAddress } from '../../utils/DataUtil'

Expand All @@ -21,9 +21,7 @@ export function EthersTransactionTest() {
const signer = new JsonRpcSigner(provider, address)
const tx = await signer.sendTransaction({
to: vitalikEthAddress,
value: ethers.parseUnits('0.0001', 'gwei'),
maxFeePerGas: ethers.parseUnits('200', 'gwei'),
maxPriorityFeePerGas: ethers.parseUnits('200', 'gwei')
value: ethers.parseUnits('0.0001', 'gwei')
})
toast({ title: 'Succcess', description: tx.hash, status: 'success', isClosable: true })
} catch {
Expand All @@ -38,7 +36,9 @@ export function EthersTransactionTest() {
}
}

return chainId === sepolia.chainId && address ? (
const allowedChains = [sepolia.chainId, optimism.chainId]

return allowedChains.includes(Number(chainId)) && address ? (
<Stack direction={['column', 'column', 'row']}>
<Button
data-test-id="sign-transaction-button"
Expand All @@ -64,7 +64,7 @@ export function EthersTransactionTest() {
</Stack>
) : (
<Text fontSize="md" color="yellow">
Switch to Sepolia Ethereum Testnet to test this feature
Switch to Sepolia or OP to test this feature
</Text>
)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, useToast, Stack, Link, Text, Spacer } from '@chakra-ui/react'
import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react'
import { BrowserProvider, JsonRpcSigner, ethers } from 'ethers'
import { sepolia } from '../../utils/ChainsUtil'
import { optimism, sepolia } from '../../utils/ChainsUtil'
import { useState } from 'react'

import { abi, address as donutAddress } from '../../utils/DonutContract'
Expand Down Expand Up @@ -35,8 +35,9 @@ export function EthersWriteContractTest() {
setLoading(false)
}
}
const allowedChains = [sepolia.chainId, optimism.chainId]

return chainId === sepolia.chainId && address ? (
return allowedChains.includes(Number(chainId)) && address ? (
<Stack direction={['column', 'column', 'row']}>
<Button
data-test-id="sign-transaction-button"
Expand All @@ -62,7 +63,7 @@ export function EthersWriteContractTest() {
</Stack>
) : (
<Text fontSize="md" color="yellow">
Switch to Sepolia Ethereum Testnet to test this feature
Switch to Sepolia or OP to test this feature
</Text>
)
}
26 changes: 14 additions & 12 deletions apps/laboratory/src/components/Wagmi/WagmiSendUSDCTest.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, useToast, Stack, Link, Text, Spacer, Input } from '@chakra-ui/react'
import { useAccount, useWriteContract } from 'wagmi'
import { useCallback, useState } from 'react'
import { sepolia } from 'wagmi/chains'
import { optimism, sepolia } from 'wagmi/chains'

const minTokenAbi = [
{
Expand Down Expand Up @@ -70,25 +70,27 @@ export function WagmiSendUSDCTest() {
})
}, [writeContract, address, amount])

return chain?.id === sepolia.id && status === 'connected' ? (
const allowedChains = [sepolia.id, optimism.id] as number[]

return allowedChains.includes(Number(chain?.id)) && status === 'connected' ? (
<Stack direction={['column', 'column', 'row']}>
<Spacer />
<Input placeholder="0xf34ffa..." onChange={e => setAddress(e.target.value)} value={address} />
<Input
placeholder="Units (1000000000 for 1 USDC)"
onChange={e => setAmount(e.target.value)}
value={amount}
type="number"
/>
<Button
data-test-id="sign-transaction-button"
onClick={onSendTransaction}
disabled={!writeContract}
isDisabled={isLoading}
width="80%"
>
Send USDC
</Button>

<Spacer />
<Input placeholder="0xf34ffa..." onChange={e => setAddress(e.target.value)} value={address} />
<Input
placeholder="Enter an amount"
onChange={e => setAmount(e.target.value)}
value={amount}
type="number"
/>
<Link isExternal href="https://faucet.circle.com">
<Button variant="outline" colorScheme="blue" isDisabled={isLoading}>
USDC Faucet
Expand All @@ -97,7 +99,7 @@ export function WagmiSendUSDCTest() {
</Stack>
) : (
<Text fontSize="md" color="yellow">
Switch to Sepolia Ethereum Testnet to test this feature
Switch to Sepolia or OP to test this feature
</Text>
)
}
10 changes: 6 additions & 4 deletions apps/laboratory/src/components/Wagmi/WagmiTransactionTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { parseGwei, type Address } from 'viem'
import { useEstimateGas, useSendTransaction, useAccount } from 'wagmi'
import { vitalikEthAddress } from '../../utils/DataUtil'
import { useCallback, useState } from 'react'
import { sepolia } from 'wagmi/chains'
import { optimism, optimismSepolia, sepolia } from 'wagmi/chains'

const TEST_TX = {
to: vitalikEthAddress as Address,
value: parseGwei('0.3')
value: parseGwei('0.001')
}

export function WagmiTransactionTest() {
Expand Down Expand Up @@ -56,7 +56,9 @@ export function WagmiTransactionTest() {
}
}, [sendTransaction, prepareError])

return chain?.id === sepolia.id && status === 'connected' ? (
const allowedChains = [sepolia.id, optimism.id, optimismSepolia.id] as number[]

return allowedChains.includes(Number(chain?.id)) && status === 'connected' ? (
<Stack direction={['column', 'column', 'row']}>
<Button
data-test-id="sign-transaction-button"
Expand All @@ -83,7 +85,7 @@ export function WagmiTransactionTest() {
</Stack>
) : (
<Text fontSize="md" color="yellow">
Switch to Sepolia Ethereum Testnet to test this feature
Switch to Sepolia or OP to test this feature
</Text>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button, useToast, Stack, Link, Text, Spacer, Flex } from '@chakra-ui/re
import { parseEther } from 'viem'
import { useAccount, useSimulateContract, useWriteContract, useReadContract } from 'wagmi'
import { useCallback, useEffect } from 'react'
import { sepolia } from 'wagmi/chains'
import { optimism, sepolia } from 'wagmi/chains'
import { abi, address } from '../../utils/DonutContract'

export function WagmiWriteContractTest() {
Expand Down Expand Up @@ -62,7 +62,9 @@ export function WagmiWriteContractTest() {
reset()
}, [data, error])

return chain?.id === sepolia.id && status === 'connected' ? (
const allowedChains = [sepolia.id, optimism.id] as number[]

return allowedChains.includes(Number(chain?.id)) && status === 'connected' ? (
<Stack direction={['column', 'column', 'row']}>
<Button
data-test-id="sign-transaction-button"
Expand Down Expand Up @@ -96,7 +98,7 @@ export function WagmiWriteContractTest() {
</Stack>
) : (
<Text fontSize="md" color="yellow">
Switch to Sepolia Ethereum Testnet to test this feature
Switch to Sepolia or OP to test this feature
</Text>
)
}
4 changes: 3 additions & 1 deletion apps/laboratory/src/utils/WagmiConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
zkSync,
zora,
sepolia,
optimismSepolia,
type Chain
} from 'wagmi/chains'

Expand All @@ -29,6 +30,7 @@ export const WagmiConstantsUtil = {
base,
celo,
aurora,
sepolia
sepolia,
optimismSepolia
] as [Chain, ...Chain[]]
}
Loading

0 comments on commit 1bda709

Please sign in to comment.