import type DefaultOptions from '../types/DefaultOptions'; function unlockMetaMask(password: string, options?: DefaultOptions): Cypress.Chainable { if (options?.log ?? true) { Cypress.log({ displayName: 'MetaMask', message: `Unlock MetaMask using ${'*'.repeat(password.length)}`, consoleProps: () => ({ password }), }); } return cy.task('unlockMetaMask', password, { ...options, log: false, }); } Cypress.Commands.add('unlockMetaMask', { prevSubject: false }, unlockMetaMask);