Skip to content

Commit

Permalink
fix: fix first connected network
Browse files Browse the repository at this point in the history
  • Loading branch information
jake4take committed Dec 4, 2024
1 parent c4395de commit a7f89e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/wallets/src/okx/okx.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,20 @@ export class OkxPage implements WalletPage {
await test.step('Sync the dApp network with wallet', async () => {
await this.navigate();
await this.homePage.networkListButton.click();
const currentNetwork = await this.networkListPage.getWalletNetwork();
let currentNetwork = await this.networkListPage.getWalletNetwork();
if (currentNetwork === 'All networks') {
await this.switchNetwork('Ethereum');
// switch network for wallet
await this.networkListPage.selectNetwork('Ethereum');
currentNetwork = 'Ethereum';
}
await this.goto();
// switch network for connected dApp
if (
await this.homePage.isWalletConnected(this.browserContext.pages())
) {
await this.homePage.switchNetworkWithConnectedWallet(currentNetwork);
await this.page.close();
}
await this.page.close();
});
});
}
Expand Down

0 comments on commit a7f89e9

Please sign in to comment.