Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/laboratory/src/constants/appKitConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ export const appKitConfigs = {
// ----- Custom Variants ------------------------------
'siwx-default': {
...commonAppKitConfig,
adapters: ['ethers', 'solana', 'bitcoin', 'tron'],
wagmiConfig: commonWagmiConfig,
adapters: ['wagmi', 'solana', 'bitcoin', 'tron'],
networks: ConstantsUtil.AllNetworks,
siwx: new DefaultSIWX()
},
Expand Down
2 changes: 1 addition & 1 deletion apps/laboratory/src/utils/DataUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export const siwxSdkOptions: SdkOption[] = [
title: 'Default SIWX',
link: '/appkit?name=siwx-default',
description:
'Multichain SIWX configuration with Ethers, Solana and Bitcoin adapters enabled for AppKit'
'Multichain SIWX configuration with Wagmi, Solana, Bitcoin and Tron adapters enabled for AppKit'
}
]

Expand Down
7 changes: 5 additions & 2 deletions apps/laboratory/tests/shared/utils/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ const SINGLE_ADAPTER_EVM_TESTS = [
'flag-enable-reconnect.spec.ts'
]

const SINGLE_ADAPTER_WAGMI_TESTS = [...SINGLE_ADAPTER_EVM_TESTS, 'siwx-walletconnect.spec.ts']

const CORE_TESTS = ['sign-client.spec.ts', 'universal-provider.spec.ts', 'core.spec.ts']

const SINGLE_ADAPTER_MOBILE_TESTS = ['mobile-wallet-features.spec.ts']
Expand Down Expand Up @@ -131,6 +133,7 @@ function createRegex(tests: string[], isDesktop = true) {
}

const SINGLE_ADAPTER_EVM_TESTS_REGEX = createRegex(SINGLE_ADAPTER_EVM_TESTS)
const SINGLE_ADAPTER_WAGMI_TESTS_REGEX = createRegex(SINGLE_ADAPTER_WAGMI_TESTS)
const SINGLE_ADAPTER_SOLANA_TESTS_REGEX = createRegex(SINGLE_ADAPTER_SOLANA_TESTS)
const SINGLE_ADAPTER_BITCOIN_TESTS_REGEX = createRegex(SINGLE_ADAPTER_BITCOIN_TESTS)
const SINGLE_ADAPTER_TON_TESTS_REGEX = createRegex(SINGLE_ADAPTER_TON_TESTS)
Expand Down Expand Up @@ -166,11 +169,11 @@ const customProjectProperties: CustomProjectProperties = {
testIgnore: /reown-authentication.*\.spec\.ts/u
},
'Desktop Chrome/wagmi': {
testMatch: SINGLE_ADAPTER_EVM_TESTS_REGEX,
testMatch: SINGLE_ADAPTER_WAGMI_TESTS_REGEX,
testIgnore: /reown-authentication.*\.spec\.ts/u
},
'Desktop Firefox/wagmi': {
testMatch: SINGLE_ADAPTER_EVM_TESTS_REGEX,
testMatch: SINGLE_ADAPTER_WAGMI_TESTS_REGEX,
testIgnore: /reown-authentication.*\.spec\.ts/u
},
'Desktop Chrome/bitcoin': {
Expand Down
19 changes: 19 additions & 0 deletions apps/laboratory/tests/siwx-walletconnect.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { WalletPage } from '@reown/appkit-testing'

import { timingFixture } from './shared/fixtures/timing-fixture'
import { ModalPage } from './shared/pages/ModalPage'
import { ModalValidator } from './shared/validators/ModalValidator'

const test = timingFixture

test('signs SIWX over a multichain WalletConnect session', async ({ context, page }) => {
const modal = new ModalPage(page, 'wagmi', 'siwx')
const wallet = new WalletPage(await context.newPage())
const validator = new ModalValidator(page)

await modal.load()
await modal.qrCodeFlow(modal, wallet)
await modal.promptSiwe()
await wallet.handleRequest({ accept: true })
await validator.expectConnected()
})
Loading