Skip to content

Commit

Permalink
Merge branch 'main' of github.com:WalletConnect/web3modal into chore/…
Browse files Browse the repository at this point in the history
…siwe-to-siwx-migration
  • Loading branch information
zoruka committed Nov 13, 2024
2 parents 7bec91c + 1bd3dc7 commit be32fb1
Show file tree
Hide file tree
Showing 144 changed files with 5,203 additions and 7,267 deletions.
24 changes: 0 additions & 24 deletions .changeset/five-eels-camp.md

This file was deleted.

24 changes: 0 additions & 24 deletions .changeset/healthy-sloths-joke.md

This file was deleted.

24 changes: 24 additions & 0 deletions .changeset/pink-rockets-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@reown/appkit-adapter-polkadot': minor
'@reown/appkit-adapter-ethers5': minor
'@reown/appkit-adapter-ethers': minor
'@reown/appkit-adapter-solana': minor
'@reown/appkit-adapter-wagmi': minor
'@reown/appkit-utils': minor
'@reown/appkit-experimental': minor
'@reown/appkit-scaffold-ui': minor
'@reown/appkit-polyfills': minor
'@apps/laboratory': minor
'@reown/appkit': minor
'@reown/appkit-common': minor
'@reown/appkit-wallet': minor
'@reown/appkit-core': minor
'@reown/appkit-siwe': minor
'@reown/appkit-siwx': minor
'@apps/gallery': minor
'@reown/appkit-cdn': minor
'@reown/appkit-ui': minor
'@apps/demo': minor
---

Implementing new architecture design for better handling and scalibity of the various adapters
16 changes: 16 additions & 0 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @apps/demo

## 1.3.2

### Patch Changes

- [#3216](https://github.com/reown-com/appkit/pull/3216) [`66fdcf7`](https://github.com/reown-com/appkit/commit/66fdcf773897cc14347de99810b9ecb26af008f6) Thanks [@magiziz](https://github.com/magiziz)! - Improved gradient scroll effect on connect view.

- [#3154](https://github.com/reown-com/appkit/pull/3154) [`6d1f9df`](https://github.com/reown-com/appkit/commit/6d1f9df50d5e8ad1189d8b9c4766b14e8f7ff5a9) Thanks [@tomiir](https://github.com/tomiir)! - Adds error message to swap error event

- [#3206](https://github.com/reown-com/appkit/pull/3206) [`f4ce9d4`](https://github.com/reown-com/appkit/commit/f4ce9d48c0893d5e724788b9f01de42c693e3a5e) Thanks [@magiziz](https://github.com/magiziz)! - Added walletconnect certified badge in all wallets view.

- [#3220](https://github.com/reown-com/appkit/pull/3220) [`898c3b4`](https://github.com/reown-com/appkit/commit/898c3b4109ca47a18ceede04ec503a2d741f167d) Thanks [@magiziz](https://github.com/magiziz)! - Fixes an issue where the connect modal on mobile was always showing 'Browser Wallet' option when the injected provider wasn't detected.

- Updated dependencies [[`66fdcf7`](https://github.com/reown-com/appkit/commit/66fdcf773897cc14347de99810b9ecb26af008f6), [`6d1f9df`](https://github.com/reown-com/appkit/commit/6d1f9df50d5e8ad1189d8b9c4766b14e8f7ff5a9), [`f4ce9d4`](https://github.com/reown-com/appkit/commit/f4ce9d48c0893d5e724788b9f01de42c693e3a5e), [`898c3b4`](https://github.com/reown-com/appkit/commit/898c3b4109ca47a18ceede04ec503a2d741f167d)]:
- @reown/appkit-adapter-wagmi@1.3.2
- @reown/appkit@1.3.2

## 1.3.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apps/demo",
"version": "1.3.1",
"version": "1.3.2",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
16 changes: 16 additions & 0 deletions apps/gallery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @apps/gallery

## 1.3.2

### Patch Changes

- [#3216](https://github.com/reown-com/appkit/pull/3216) [`66fdcf7`](https://github.com/reown-com/appkit/commit/66fdcf773897cc14347de99810b9ecb26af008f6) Thanks [@magiziz](https://github.com/magiziz)! - Improved gradient scroll effect on connect view.

- [#3154](https://github.com/reown-com/appkit/pull/3154) [`6d1f9df`](https://github.com/reown-com/appkit/commit/6d1f9df50d5e8ad1189d8b9c4766b14e8f7ff5a9) Thanks [@tomiir](https://github.com/tomiir)! - Adds error message to swap error event

- [#3206](https://github.com/reown-com/appkit/pull/3206) [`f4ce9d4`](https://github.com/reown-com/appkit/commit/f4ce9d48c0893d5e724788b9f01de42c693e3a5e) Thanks [@magiziz](https://github.com/magiziz)! - Added walletconnect certified badge in all wallets view.

- [#3220](https://github.com/reown-com/appkit/pull/3220) [`898c3b4`](https://github.com/reown-com/appkit/commit/898c3b4109ca47a18ceede04ec503a2d741f167d) Thanks [@magiziz](https://github.com/magiziz)! - Fixes an issue where the connect modal on mobile was always showing 'Browser Wallet' option when the injected provider wasn't detected.

- Updated dependencies [[`66fdcf7`](https://github.com/reown-com/appkit/commit/66fdcf773897cc14347de99810b9ecb26af008f6), [`6d1f9df`](https://github.com/reown-com/appkit/commit/6d1f9df50d5e8ad1189d8b9c4766b14e8f7ff5a9), [`f4ce9d4`](https://github.com/reown-com/appkit/commit/f4ce9d48c0893d5e724788b9f01de42c693e3a5e), [`898c3b4`](https://github.com/reown-com/appkit/commit/898c3b4109ca47a18ceede04ec503a2d741f167d)]:
- @reown/appkit-common@1.3.2
- @reown/appkit-ui@1.3.2

## 1.3.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/gallery/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apps/gallery",
"version": "1.3.1",
"version": "1.3.2",
"private": true,
"main": "index.js",
"scripts": {
Expand Down
27 changes: 27 additions & 0 deletions apps/gallery/stories/composites/wui-certified-switch.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { Meta } from '@storybook/web-components'
import '@reown/appkit-ui/src/composites/wui-certified-switch'
import type { WuiCertifiedSwitch } from '@reown/appkit-ui/src/composites/wui-certified-switch'
import { html } from 'lit'
import '../../components/gallery-container'

type Component = Meta<WuiCertifiedSwitch>

export default {
title: 'Composites/wui-certified-switch',
args: {
checked: false
},
argTypes: {
checked: {
control: { type: 'boolean' }
}
}
} as Component

export const Default: Component = {
render: args => html`
<gallery-container width="88" height="44">
<wui-certified-switch ?checked=${args.checked}></wui-certified-switch>
</gallery-container>
`
}
27 changes: 27 additions & 0 deletions apps/gallery/stories/composites/wui-switch.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { Meta } from '@storybook/web-components'
import '@reown/appkit-ui/src/composites/wui-switch'
import type { WuiSwitch } from '@reown/appkit-ui/src/composites/wui-switch'
import { html } from 'lit'
import '../../components/gallery-container'

type Component = Meta<WuiSwitch>

export default {
title: 'Composites/wui-switch',
args: {
checked: false
},
argTypes: {
checked: {
control: { type: 'boolean' }
}
}
} as Component

export const Default: Component = {
render: args => html`
<gallery-container width="32" height="32">
<wui-switch ?checked=${args.checked}></wui-switch>
</gallery-container>
`
}
23 changes: 23 additions & 0 deletions apps/laboratory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# @apps/laboratory

## 1.3.2

### Patch Changes

- [#3216](https://github.com/reown-com/appkit/pull/3216) [`66fdcf7`](https://github.com/reown-com/appkit/commit/66fdcf773897cc14347de99810b9ecb26af008f6) Thanks [@magiziz](https://github.com/magiziz)! - Improved gradient scroll effect on connect view.

- [#3154](https://github.com/reown-com/appkit/pull/3154) [`6d1f9df`](https://github.com/reown-com/appkit/commit/6d1f9df50d5e8ad1189d8b9c4766b14e8f7ff5a9) Thanks [@tomiir](https://github.com/tomiir)! - Adds error message to swap error event

- [#3206](https://github.com/reown-com/appkit/pull/3206) [`f4ce9d4`](https://github.com/reown-com/appkit/commit/f4ce9d48c0893d5e724788b9f01de42c693e3a5e) Thanks [@magiziz](https://github.com/magiziz)! - Added walletconnect certified badge in all wallets view.

- [#3220](https://github.com/reown-com/appkit/pull/3220) [`898c3b4`](https://github.com/reown-com/appkit/commit/898c3b4109ca47a18ceede04ec503a2d741f167d) Thanks [@magiziz](https://github.com/magiziz)! - Fixes an issue where the connect modal on mobile was always showing 'Browser Wallet' option when the injected provider wasn't detected.

- Updated dependencies [[`66fdcf7`](https://github.com/reown-com/appkit/commit/66fdcf773897cc14347de99810b9ecb26af008f6), [`6d1f9df`](https://github.com/reown-com/appkit/commit/6d1f9df50d5e8ad1189d8b9c4766b14e8f7ff5a9), [`f4ce9d4`](https://github.com/reown-com/appkit/commit/f4ce9d48c0893d5e724788b9f01de42c693e3a5e), [`898c3b4`](https://github.com/reown-com/appkit/commit/898c3b4109ca47a18ceede04ec503a2d741f167d)]:
- @reown/appkit-adapter-ethers@1.3.2
- @reown/appkit-adapter-ethers5@1.3.2
- @reown/appkit-adapter-solana@1.3.2
- @reown/appkit-adapter-wagmi@1.3.2
- @reown/appkit@1.3.2
- @reown/appkit-experimental@1.3.2
- @reown/appkit-siwe@1.3.2
- @reown/appkit-siwx@1.3.2
- @reown/appkit-wallet@1.3.2

## 1.3.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/laboratory/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@apps/laboratory",
"type": "module",
"version": "1.3.1",
"version": "1.3.2",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
2 changes: 1 addition & 1 deletion apps/laboratory/src/components/Ethers/Ethers5ModalInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function Ethers5ModalInfo() {
const { walletProvider, walletProviderType } = useAppKitProvider<UniversalProvider>('eip155')

async function getClientId() {
if (walletProviderType === 'walletConnect') {
if (walletProviderType === 'WALLET_CONNECT') {
return await walletProvider?.client?.core?.crypto?.getClientId()
}

Expand Down
2 changes: 1 addition & 1 deletion apps/laboratory/src/components/Ethers/EthersModalInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function EthersModalInfo() {
const { walletProvider, walletProviderType } = useAppKitProvider<UniversalProvider>('eip155')

async function getClientId() {
if (walletProviderType === 'walletConnect') {
if (walletProviderType === 'WALLET_CONNECT') {
return await walletProvider?.client?.core?.crypto?.getClientId()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useAppKitState } from '@reown/appkit/react'
import { SolanaTests } from './Solana/SolanaTests'
import { EthersTests } from './Ethers/EthersTests'
import { EthersModalInfo } from './Ethers/EthersModalInfo'
import { SolanaModalInfo } from './Solana/SolanaModalInfo'

export function MultiChainTestsEthersSolana() {
const { activeChain } = useAppKitState()
Expand All @@ -16,7 +17,12 @@ export function MultiChainTestsEthersSolana() {
<EthersTests />
</React.Fragment>
) : null}
{activeChain === 'solana' ? <SolanaTests /> : null}
{activeChain === 'solana' ? (
<React.Fragment>
<SolanaModalInfo />
<SolanaTests />
</React.Fragment>
) : null}
</>
)
}
2 changes: 1 addition & 1 deletion apps/laboratory/src/pages/library/wagmi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const wagmiAdapter = new WagmiAdapter({

const modal = createAppKit({
adapters: [wagmiAdapter],
networks: wagmiAdapter.caipNetworks,
networks: ConstantsUtil.EvmNetworks,
projectId: ConstantsUtil.ProjectId,
features: {
analytics: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ test('it should switch to different namespace', async () => {
const chainName = 'Solana'

await page.switchNetwork(chainName)
await validator.expectUnauthenticated()
await page.closeModal()
await page.openAccount()
await page.openNetworks()
await validator.expectSwitchedNetwork(chainName)
Expand Down
6 changes: 6 additions & 0 deletions apps/laboratory/tests/shared/pages/ModalPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,12 @@ export class ModalPage {
await allWalletsListSearchItem.click()
}

async clickCertifiedToggle() {
const certifiedSwitch = this.page.getByTestId('wui-certified-switch')
await expect(certifiedSwitch).toBeVisible()
await certifiedSwitch.click()
}

async clickTabWebApp() {
const tabWebApp = this.page.getByTestId('tab-webapp')
await expect(tabWebApp).toBeVisible()
Expand Down
5 changes: 5 additions & 0 deletions apps/laboratory/tests/shared/validators/ModalValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ export class ModalValidator {
expect(queryParameters[key]).toBe(value)
}

async expectAllWalletsListSearchItem(id: string) {
const allWalletsListSearchItem = this.page.getByTestId(`wallet-search-item-${id}`)
await expect(allWalletsListSearchItem).toBeVisible()
}

async expectNoSocials() {
const socialList = this.page.getByTestId('wui-list-social')
await expect(socialList).toBeHidden()
Expand Down
20 changes: 20 additions & 0 deletions apps/laboratory/tests/wallet-features.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let context: BrowserContext
/* eslint-enable init-declarations */

const ABSOLUTE_WALLET_ID = 'bfa6967fd05add7bb2b19a442ac37cedb6a6b854483729194f5d7185272c5594'
const METAMASK_WALLET_ID = 'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96'

// -- Setup --------------------------------------------------------------------
const walletFeaturesTest = test.extend<{ library: string }>({
Expand Down Expand Up @@ -102,4 +103,23 @@ walletFeaturesTest('it should open web app wallet', async () => {
key: 'uri',
value: copiedLink
})
await page.closeModal()
})

walletFeaturesTest('it should search for a certified wallet', async () => {
await page.openConnectModal()
await validator.expectAllWallets()
await page.openAllWallets()
await page.clickCertifiedToggle()
await page.page.waitForTimeout(500)
await validator.expectAllWalletsListSearchItem(METAMASK_WALLET_ID)

// Try searching for a certified wallet while toggle is on
await page.search('MetaMask')
await validator.expectAllWalletsListSearchItem(METAMASK_WALLET_ID)

// Try searching for a certified wallet while toggle is off
await page.clickCertifiedToggle()
await page.search('MetaMask')
await validator.expectAllWalletsListSearchItem(METAMASK_WALLET_ID)
})
23 changes: 23 additions & 0 deletions packages/adapters/ethers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# @reown/appkit-adapter-ethers

## 1.3.2

### Patch Changes

- [#3216](https://github.com/reown-com/appkit/pull/3216) [`66fdcf7`](https://github.com/reown-com/appkit/commit/66fdcf773897cc14347de99810b9ecb26af008f6) Thanks [@magiziz](https://github.com/magiziz)! - Improved gradient scroll effect on connect view.

- [#3154](https://github.com/reown-com/appkit/pull/3154) [`6d1f9df`](https://github.com/reown-com/appkit/commit/6d1f9df50d5e8ad1189d8b9c4766b14e8f7ff5a9) Thanks [@tomiir](https://github.com/tomiir)! - Adds error message to swap error event

- [#3206](https://github.com/reown-com/appkit/pull/3206) [`f4ce9d4`](https://github.com/reown-com/appkit/commit/f4ce9d48c0893d5e724788b9f01de42c693e3a5e) Thanks [@magiziz](https://github.com/magiziz)! - Added walletconnect certified badge in all wallets view.

- [#3220](https://github.com/reown-com/appkit/pull/3220) [`898c3b4`](https://github.com/reown-com/appkit/commit/898c3b4109ca47a18ceede04ec503a2d741f167d) Thanks [@magiziz](https://github.com/magiziz)! - Fixes an issue where the connect modal on mobile was always showing 'Browser Wallet' option when the injected provider wasn't detected.

- Updated dependencies [[`66fdcf7`](https://github.com/reown-com/appkit/commit/66fdcf773897cc14347de99810b9ecb26af008f6), [`6d1f9df`](https://github.com/reown-com/appkit/commit/6d1f9df50d5e8ad1189d8b9c4766b14e8f7ff5a9), [`f4ce9d4`](https://github.com/reown-com/appkit/commit/f4ce9d48c0893d5e724788b9f01de42c693e3a5e), [`898c3b4`](https://github.com/reown-com/appkit/commit/898c3b4109ca47a18ceede04ec503a2d741f167d)]:
- @reown/appkit-scaffold-ui@1.3.2
- @reown/appkit@1.3.2
- @reown/appkit-utils@1.3.2
- @reown/appkit-common@1.3.2
- @reown/appkit-core@1.3.2
- @reown/appkit-polyfills@1.3.2
- @reown/appkit-siwe@1.3.2
- @reown/appkit-ui@1.3.2
- @reown/appkit-wallet@1.3.2

## 1.3.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapters/ethers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reown/appkit-adapter-ethers",
"version": "1.3.1",
"version": "1.3.2",
"type": "module",
"main": "./dist/esm/src/index.js",
"types": "./dist/types/src/index.d.ts",
Expand Down
Loading

0 comments on commit be32fb1

Please sign in to comment.