Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: re enable tests #2894

Closed
wants to merge 10 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test.skip('it should show disabled networks', async () => {
await modalPage.closeModal()
})

test.only('it should switch networks and sign', async () => {
test('it should switch networks and sign', async () => {
const chains = ['Polygon', 'Solana']

async function processChain(index: number) {
Expand Down
3 changes: 1 addition & 2 deletions packages/adapters/wagmi/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,8 @@ export class WagmiAdapter implements ChainAdapter {
}
} else if (status === 'connected' && address && chainId) {
const caipAddress = `eip155:${chainId}:${address}` as CaipAddress
this.syncNetwork(address, chainId, true)
this.appKit?.setCaipAddress(caipAddress, this.chainNamespace)
await this.syncNetwork(address, chainId, true)
await Promise.all([
this.syncProfile(address, chainId),
this.syncBalance(address, chainId),
Expand Down Expand Up @@ -683,7 +683,6 @@ export class WagmiAdapter implements ChainAdapter {

private async syncNetwork(address?: Hex, chainId?: number, isConnected?: boolean) {
const chain = this.caipNetworks.find((c: CaipNetwork) => c.chainId === chainId)

if (chain && chainId) {
this.appKit?.setCaipNetwork({
chainId: chain.chainId,
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/controllers/ConnectionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export const ConnectionController = {
async connectExternal(options: ConnectExternalOptions, chain: ChainNamespace, setChain = true) {
await this._getClient(chain).connectExternal?.(options)
if (setChain) {
ChainController.setActiveNamespace(chain)
StorageUtil.setConnectedConnector(options.type)
}
},
Expand Down
Loading