From 494afc75a3db46847a0d2423725b0b356e4cbec9 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Ortiz karliatto Date: Wed, 21 Feb 2024 14:14:27 +0100 Subject: [PATCH] chore(connect-explorer-webextension): delete package - now in connect-explorer/src-webextension --- .../connect-explorer-webextension/.gitignore | 1 - .../connect-explorer-webextension/README.md | 27 ------------------ .../assets/icon48.png | Bin 642 -> 0 bytes .../src/background/serviceWorker.ts | 5 ---- .../src/manifest.json | 20 ------------- .../src/pages/connect-explorer/index.html | 12 -------- .../src/pages/connect-explorer/index.tsx | 7 ----- .../pages/extension-popup/ExtensionPopup.tsx | 15 ---------- .../src/pages/extension-popup/index.html | 12 -------- .../src/pages/extension-popup/index.tsx | 7 ----- 10 files changed, 106 deletions(-) delete mode 100644 packages/connect-explorer-webextension/.gitignore delete mode 100644 packages/connect-explorer-webextension/README.md delete mode 100644 packages/connect-explorer-webextension/assets/icon48.png delete mode 100644 packages/connect-explorer-webextension/src/background/serviceWorker.ts delete mode 100644 packages/connect-explorer-webextension/src/manifest.json delete mode 100644 packages/connect-explorer-webextension/src/pages/connect-explorer/index.html delete mode 100644 packages/connect-explorer-webextension/src/pages/connect-explorer/index.tsx delete mode 100644 packages/connect-explorer-webextension/src/pages/extension-popup/ExtensionPopup.tsx delete mode 100644 packages/connect-explorer-webextension/src/pages/extension-popup/index.html delete mode 100644 packages/connect-explorer-webextension/src/pages/extension-popup/index.tsx diff --git a/packages/connect-explorer-webextension/.gitignore b/packages/connect-explorer-webextension/.gitignore deleted file mode 100644 index 22d0d82f809..00000000000 --- a/packages/connect-explorer-webextension/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor diff --git a/packages/connect-explorer-webextension/README.md b/packages/connect-explorer-webextension/README.md deleted file mode 100644 index f3945144c79..00000000000 --- a/packages/connect-explorer-webextension/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# @trezor/connect-explorer-webextension - -This package serves as: - -- a testing base of [@trezor/connect-popup](../connect-popup/) in web extension environment - -To build the webextension locally: - -`yarn workspace @trezor/connect-explorer-webextension build` - -It will be built at `packages/connect-explorer-webextension/build` - -## Run in Chrome - -- Go to chrome://extensions -- Enable developer mode and load unpacked -- Choose `packages/connect-explorer-webextension/build` directory - -## Run for development - -Connect explorer running inside @trezor/connect-explorer-webextension uses Connect Popup running in `https://connect.trezor.io/9/popup.html`. If you want to use the local version of popup you will have to run in it, and pass `__TREZOR_CONNECT_SRC=http://localhost:8088/` argument. Like the commands below: - -``` -yarn build:libs && \ -__TREZOR_CONNECT_SRC=http://localhost:8088/ yarn workspace @trezor/connect-explorer-webextension build && \ -yarn workspace @trezor/connect-explorer dev -``` diff --git a/packages/connect-explorer-webextension/assets/icon48.png b/packages/connect-explorer-webextension/assets/icon48.png deleted file mode 100644 index 31df84ecd0f8faa044c133c4fc9f68edeb613dfc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 642 zcmV-|0)737P)8VBB+aW z5!A(9T%1Mx1MDIN2k{MG7Ez=)SLsw8N~KsEhjWW*dQXy@o7`*Qe&Hc-a-Qe;{lev( z?~G3cY7ebF>V(rejLj!#LVIxwkPv<;5?qS$XUXX zq72-Oh*-mwHo4a$xphqUN$(~;Mg-jNF#ka$|3lA}rm#)egqoZG7M9dbIE>XujjcV_ zyNP2djqCWFvCdqi&e2{8C4Hyd9hv(xW9`Mr_}+|lTJm3P^?4Y01H-u7G&UZYdnjdY zE5;(@Q#LLJbz%SLilL-HnXJjNG7bDAR2e9nfj2PR;=Kjgci&bV7gn;K6Z_`)sKf_}A%0+>-xtVn6QSN2E{gyR>%a z`YU*d$&7U;lf0ES_4{t1vC#}pwW&9i%u72UF4aI|yhKenSCYKelJTsyavPY&_b!dR z5H38r5njhP+{kNyuo~6yzDprl<6Y9PFRS1g;Ti6S@R_83A)FLek+hqZEU}u@IZ>4G zW+reCzaj!-v7F>h6fZfQG2yN^wjr&@Vlppwyk0t^xQ2Nfh0iDBqvc7<#)xny{03Kr cza|vUU+Gkdfq3WC*8l(j07*qoM6N<$g2an4TmS$7 diff --git a/packages/connect-explorer-webextension/src/background/serviceWorker.ts b/packages/connect-explorer-webextension/src/background/serviceWorker.ts deleted file mode 100644 index 46acd41d7c6..00000000000 --- a/packages/connect-explorer-webextension/src/background/serviceWorker.ts +++ /dev/null @@ -1,5 +0,0 @@ -// empty file so there is a service worker loaded in the extension and id can be used for the e2e tests. -// https://playwright.dev/docs/chrome-extensions#testing - -// eslint-disable-next-line no-console -console.log('service worker loaded'); diff --git a/packages/connect-explorer-webextension/src/manifest.json b/packages/connect-explorer-webextension/src/manifest.json deleted file mode 100644 index eac3393fa69..00000000000 --- a/packages/connect-explorer-webextension/src/manifest.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@trezor/connect-explorer-webextension", - "manifest_version": 3, - "version": "1.0.0", - "icons": { - "48": "assets/icon48.png" - }, - "action": { - "default_popup": "extension-popup.html" - }, - "content_scripts": [ - { - "matches": ["*://connect.trezor.io/9/*", "*://suite.corp.sldev.cz/*", "*://*/*"], - "js": ["./vendor/trezor-content-script.js"] - } - ], - "background": { - "service_worker": "serviceWorker.bundle.js" - } -} diff --git a/packages/connect-explorer-webextension/src/pages/connect-explorer/index.html b/packages/connect-explorer-webextension/src/pages/connect-explorer/index.html deleted file mode 100644 index 9d1e21cba7d..00000000000 --- a/packages/connect-explorer-webextension/src/pages/connect-explorer/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - Connect Explorer - - - -
- - diff --git a/packages/connect-explorer-webextension/src/pages/connect-explorer/index.tsx b/packages/connect-explorer-webextension/src/pages/connect-explorer/index.tsx deleted file mode 100644 index 8e7d2e9e2bc..00000000000 --- a/packages/connect-explorer-webextension/src/pages/connect-explorer/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { createRoot } from 'react-dom/client'; - -import App from '@trezor/connect-explorer/src/router'; - -const container = document.getElementById('connect-explorer-container'); -const root = createRoot(container!); -root.render(); diff --git a/packages/connect-explorer-webextension/src/pages/extension-popup/ExtensionPopup.tsx b/packages/connect-explorer-webextension/src/pages/extension-popup/ExtensionPopup.tsx deleted file mode 100644 index 24c73648298..00000000000 --- a/packages/connect-explorer-webextension/src/pages/extension-popup/ExtensionPopup.tsx +++ /dev/null @@ -1,15 +0,0 @@ -export const ExtensionPopup = () => { - const openExplorerTab = () => { - chrome.tabs.create({ url: 'connect-explorer.html' }); - }; - - return ( -
-

Welcome to Trezor Connect Explorer extension!

- - -
- ); -}; diff --git a/packages/connect-explorer-webextension/src/pages/extension-popup/index.html b/packages/connect-explorer-webextension/src/pages/extension-popup/index.html deleted file mode 100644 index 1e7763ee65e..00000000000 --- a/packages/connect-explorer-webextension/src/pages/extension-popup/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - Popup - - - -
- - diff --git a/packages/connect-explorer-webextension/src/pages/extension-popup/index.tsx b/packages/connect-explorer-webextension/src/pages/extension-popup/index.tsx deleted file mode 100644 index 940769b8903..00000000000 --- a/packages/connect-explorer-webextension/src/pages/extension-popup/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { createRoot } from 'react-dom/client'; - -import { ExtensionPopup } from './ExtensionPopup'; - -const container = document.getElementById('extension-popup-container'); -const root = createRoot(container!); -root.render();