Skip to content

Commit

Permalink
:feat refactor adapter clients (#3076)
Browse files Browse the repository at this point in the history
Co-authored-by: Felipe Mendes <[email protected]>
  • Loading branch information
svenvoskamp and zoruka authored Nov 13, 2024
1 parent 1ab0f7f commit 1bd3dc7
Show file tree
Hide file tree
Showing 77 changed files with 4,303 additions and 7,354 deletions.
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
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
Loading

0 comments on commit 1bd3dc7

Please sign in to comment.