diff --git a/apps/laboratory/src/constants/appKitConfigs.ts b/apps/laboratory/src/constants/appKitConfigs.ts index 37c39215c2..c817c679ff 100644 --- a/apps/laboratory/src/constants/appKitConfigs.ts +++ b/apps/laboratory/src/constants/appKitConfigs.ts @@ -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() }, diff --git a/apps/laboratory/src/utils/DataUtil.ts b/apps/laboratory/src/utils/DataUtil.ts index 0bfa4e9190..76dc1bc02e 100644 --- a/apps/laboratory/src/utils/DataUtil.ts +++ b/apps/laboratory/src/utils/DataUtil.ts @@ -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' } ] diff --git a/apps/laboratory/tests/shared/utils/project.ts b/apps/laboratory/tests/shared/utils/project.ts index 3b2785107c..80fbd6319c 100644 --- a/apps/laboratory/tests/shared/utils/project.ts +++ b/apps/laboratory/tests/shared/utils/project.ts @@ -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'] @@ -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) @@ -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': { diff --git a/apps/laboratory/tests/siwx-walletconnect.spec.ts b/apps/laboratory/tests/siwx-walletconnect.spec.ts new file mode 100644 index 0000000000..c8d704c190 --- /dev/null +++ b/apps/laboratory/tests/siwx-walletconnect.spec.ts @@ -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() +})