From 3ac9edc9e48b53622ff87a6acf0eb56324d78d7b Mon Sep 17 00:00:00 2001 From: matstyler Date: Thu, 15 Feb 2024 23:17:11 +0100 Subject: [PATCH] fix: format --- wallets/metamask/src/metamask.ts | 11 ++++++++--- .../src/pages/HomePage/actions/switchNetwork.ts | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wallets/metamask/src/metamask.ts b/wallets/metamask/src/metamask.ts index f47ba851c..000521c72 100644 --- a/wallets/metamask/src/metamask.ts +++ b/wallets/metamask/src/metamask.ts @@ -133,7 +133,7 @@ export class MetaMask { * @param networkName - The name of the network to switch to. * @param isTestnet - If switch to a test network. */ - async switchNetwork(networkName: string, isTestnet: boolean = false) { + async switchNetwork(networkName: string, isTestnet = false) { await this.homePage.switchNetwork(networkName, isTestnet) } @@ -264,7 +264,10 @@ export class MetaMask { * @param options.spendLimit - The spend limit to use for the permission. * @param options.gasSetting - The gas setting to use for the approval transaction. */ - async approveTokenPermission(options?: { spendLimit?: 'max' | number; gasSetting?: GasSetting }) { + async approveTokenPermission(options?: { + spendLimit?: 'max' | number + gasSetting?: GasSetting + }) { if (!this.extensionId) { throw NO_EXTENSION_ID_ERROR } @@ -357,7 +360,9 @@ export class MetaMask { * @experimental * @group Experimental Methods */ - async confirmTransactionAndWaitForMining(options?: { gasSetting?: GasSetting }) { + async confirmTransactionAndWaitForMining(options?: { + gasSetting?: GasSetting + }) { if (!this.extensionId) { throw NO_EXTENSION_ID_ERROR } diff --git a/wallets/metamask/src/pages/HomePage/actions/switchNetwork.ts b/wallets/metamask/src/pages/HomePage/actions/switchNetwork.ts index 5dfbfa529..ae0bc2b64 100644 --- a/wallets/metamask/src/pages/HomePage/actions/switchNetwork.ts +++ b/wallets/metamask/src/pages/HomePage/actions/switchNetwork.ts @@ -6,7 +6,7 @@ import { closeRecoveryPhraseReminder } from './popups' async function openTestnetSection(page: Page) { const toggleButtonLocator = page.locator(Selectors.networkDropdown.showTestNetworksToggle) const classes = await toggleButtonLocator.getAttribute('class') - if (classes && classes.includes('toggle-button--off')) { + if (classes?.includes('toggle-button--off')) { await toggleButtonLocator.click() await page.locator(Selectors.networkDropdown.toggleOn).isChecked() }