Skip to content

Commit

Permalink
fix: secretWords => secretWordsOrPrivateKey
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Mucha <jakub.mucha@icloud.com>
  • Loading branch information
drptbl committed Oct 12, 2021
1 parent 1888e95 commit 89b5c5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ Cypress.Commands.add('fetchMetamaskWalletAddress', () => {

Cypress.Commands.add(
'setupMetamask',
(secretWords, network, password = 'Tester@1234') => {
return cy.task('setupMetamask', { secretWords, network, password });
(secretWordsOrPrivateKey, network, password = 'Tester@1234') => {
return cy.task('setupMetamask', {
secretWordsOrPrivateKey,
network,
password,
});
},
);

Expand Down
4 changes: 3 additions & 1 deletion support/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ declare namespace Cypress {
* @example
* cy.setupMetamask('secret, words, ...', 'kovan', 'password for metamask')
* cy.setupMetamask('secret, words, ...', {networkName: 'name', rpcUrl: 'https://url', chainId: 1, symbol: 'ETH', blockExplorer: 'https://url', isTestnet: true}, 'password for metamask')
* cy.setupMetamask('private_key', 'kovan', 'password for metamask')
* cy.setupMetamask('private_key', {networkName: 'name', rpcUrl: 'https://url', chainId: 1, symbol: 'ETH', blockExplorer: 'https://url', isTestnet: true}, 'password for metamask')
*/
setupMetamask(
secretWords: string,
secretWordsOrPrivateKey: string,
network: string | object,
password: string,
): Chainable<Subject>;
Expand Down

0 comments on commit 89b5c5a

Please sign in to comment.