From 6d191328e24552689cc791edfd0cd00976ea65fb Mon Sep 17 00:00:00 2001 From: Daniel Izdebski Date: Thu, 21 Sep 2023 16:48:10 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(metamask-legacy):?= =?UTF-8?q?=20Remove=20`commands/index.js`=20(#890)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/metamask-legacy/src/example.ts | 5 +++-- wallets/metamask-legacy/src/commands/index.js | 4 ---- wallets/metamask-legacy/src/index.js | 5 +++-- 3 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 wallets/metamask-legacy/src/commands/index.js diff --git a/examples/metamask-legacy/src/example.ts b/examples/metamask-legacy/src/example.ts index 15c158b0c..07b90446b 100644 --- a/examples/metamask-legacy/src/example.ts +++ b/examples/metamask-legacy/src/example.ts @@ -1,7 +1,8 @@ -import { helpers, metamaskPages } from 'metamask-legacy' +import { helpers, metamask, metamaskPages } from 'metamask-legacy' -console.log(helpers.getCurrentNetwork()) +console.log('Current network:', helpers.getCurrentNetwork()) console.log( 'Example selector:', metamaskPages.mainPage.mainPageElements.importAccount.importButton ) +console.log('MetaMask extension urls:', metamask.extensionUrls()) diff --git a/wallets/metamask-legacy/src/commands/index.js b/wallets/metamask-legacy/src/commands/index.js deleted file mode 100644 index 95887e63b..000000000 --- a/wallets/metamask-legacy/src/commands/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import * as metamask from './metamask.cjs' -import * as playwright from './playwright.cjs' - -export { metamask, playwright } diff --git a/wallets/metamask-legacy/src/index.js b/wallets/metamask-legacy/src/index.js index 9c98a82e4..d9b7ee214 100644 --- a/wallets/metamask-legacy/src/index.js +++ b/wallets/metamask-legacy/src/index.js @@ -1,5 +1,6 @@ +import * as metamask from './commands/metamask.cjs' +import * as playwright from './commands/playwright.cjs' import * as helpers from './helpers.cjs' import metamaskPages from './pages/index.js' -export * from './commands/index.js' -export { helpers, metamaskPages } +export { helpers, metamask, playwright, metamaskPages }