Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
matstyler committed Feb 15, 2024
1 parent 09efd7f commit 3ac9edc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions wallets/metamask/src/metamask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 3ac9edc

Please sign in to comment.