Skip to content

Commit

Permalink
Merge pull request #589 from syscoin/feat/mv3-migration
Browse files Browse the repository at this point in the history
Feat: MV3 migration
  • Loading branch information
lucasgabrielgsp authored Aug 30, 2024
2 parents 08d8716 + c4666f6 commit 3d76d5b
Show file tree
Hide file tree
Showing 158 changed files with 8,169 additions and 7,892 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# MANIFEST_TYPE values: MV2 or MV3
MANIFEST_TYPE=MV3
NODE_ENV=development
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
check-latest: true
- run: yarn install
- run: yarn test-all
Expand All @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
check-latest: true
- run: yarn install
- run: |
Expand Down
63 changes: 29 additions & 34 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"manifest_version": 3,
"name": "Pali Wallet",
"version": "2.0.19",
"version": "3.0.0",
"icons": {
"16": "assets/icons/favicon-16.png",
"32": "assets/icons/favicon-32.png",
Expand All @@ -11,48 +11,38 @@
"description": "A Non-Custodial Crypto Wallet",
"short_name": "pali",
"permissions": [
"http://*/*",
"https://*/*",
"*://connect.trezor.io/9/*",
"tabs",
"storage",
"activeTab",
"*://*.eth/",
"clipboardWrite",
"unlimitedStorage",
"http://localhost:8545/",
"offscreen",
"scripting",
"webRequest"
],
"content_security_policy": "script-src 'self'; object-src 'self'",
"__chrome|firefox__author": "pollum labs",
"__opera__developer": {
"name": "pollum labs"
},
"__firefox__applications": {
"gecko": {
"id": "{b3e96b5f-b5bf-8b48-846b-52f430365e80}"
}
"host_permissions": [
"http://*/*",
"https://*/*",
"*://connect.trezor.io/9/*",
"*://*.eth/",
"http://localhost:8545/"
],
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'"
},
"__chrome__minimum_chrome_version": "49",
"__opera__minimum_opera_version": "36",
"browser_action": {
"author": "pollum labs",
"minimum_chrome_version": "49",
"action": {
"default_popup": "app.html",
"default_icon": {
"16": "assets/icons/favicon-16.png",
"32": "assets/icons/favicon-32.png",
"48": "assets/icons/favicon-48.png",
"128": "assets/icons/favicon-128.png"
},
"default_title": "Pali Wallet",
"__chrome|opera__chrome_style": false,
"__firefox__browser_style": false
"default_title": "Pali Wallet"
},
"background": {
"scripts": [
"js/webextension.bundle.js",
"js/background.bundle.js"
],
"__chrome|opera__persistent": true
"service_worker": "js/background.bundle.js"
},
"content_scripts": [
{
Expand All @@ -64,7 +54,6 @@
],
"run_at": "document_start",
"js": [
"js/webextension.bundle.js",
"js/contentScript.bundle.js"
]
},
Expand All @@ -74,18 +63,24 @@
"https://localhost:8088/*"
],
"js": [
"js/webextension.bundle.js",
"js/trezorScript.bundle.js"
]
}
],
"web_accessible_resources": [
"js/inpage.bundle.js",
"js/handleWindowProperties.bundle.js",
"js/pali.bundle.js"
{
"resources": [
"js/inpage.bundle.js",
"js/handleWindowProperties.bundle.js",
"js/pali.bundle.js"
],
"matches": [
"<all_urls>"
]
}
],
"commands": {
"_execute_browser_action": {
"_execute_action": {
"suggested_key": {
"default": "Ctrl+Shift+P"
}
Expand Down
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paliwallet",
"version": "2.0.19",
"version": "3.0.0",
"description": "A Non-Custodial Crypto Wallet",
"private": true,
"repository": {
Expand All @@ -13,11 +13,12 @@
"yarn": ">= 1.0.0"
},
"scripts": {
"dev:chrome": "jq 'del(.environment) | .permissions = if .permissions then (if (.permissions | index(\"webRequest\")) == null then .permissions + [\"webRequest\"] else .permissions end) else [\"webRequest\"] end' manifest.json > modified_manifest.json && mv modified_manifest.json manifest.json && cross-env NODE_ENV=development cross-env TARGET_BROWSER=chrome webpack --watch",
"generate-manifest": "node ./source/config/generateManifest.js",
"dev:chrome": "yarn generate-manifest && cross-env NODE_ENV=development cross-env TARGET_BROWSER=chrome webpack --config source/config/webpack.dev.js --watch",
"build:chrome": "yarn generate-manifest && cross-env NODE_ENV=production cross-env TARGET_BROWSER=chrome webpack --config source/config/webpack.prod.js",
"dev-watch-requests:chrome": "jq '.permissions = if .permissions then (if (.permissions | index(\"webRequest\")) == null then .permissions + [\"webRequest\"] else .permissions end) else [\"webRequest\"] end | .environment = {\"WATCH_REQUESTS\": \"active\"}' manifest.json > modified_manifest.json && mv modified_manifest.json manifest.json && cross-env NODE_ENV=development cross-env TARGET_BROWSER=chrome webpack --watch",
"dev:firefox": "jq '.permissions = if .permissions then (if (.permissions | index(\"webRequest\")) == null then .permissions + [\"webRequest\"] else .permissions end) else [\"webRequest\"] end' manifest.json > modified_manifest.json && mv modified_manifest.json manifest.json && cross-env NODE_ENV=development cross-env TARGET_BROWSER=firefox webpack --watch",
"dev:opera": "jq '.permissions = if .permissions then (if (.permissions | index(\"webRequest\")) == null then .permissions + [\"webRequest\"] else .permissions end) else [\"webRequest\"] end' manifest.json > modified_manifest.json && mv modified_manifest.json manifest.json && cross-env NODE_ENV=development cross-env TARGET_BROWSER=opera webpack --watch",
"build:chrome": "jq '.permissions = if .permissions then (.permissions | map(select(. != \"webRequest\"))) else .permissions end' manifest.json > modified_manifest.json && mv modified_manifest.json manifest.json && cross-env NODE_ENV=production cross-env TARGET_BROWSER=chrome webpack",
"build:firefox": "jq '.permissions = if .permissions then (.permissions | map(select(. != \"webRequest\"))) else .permissions end' manifest.json > modified_manifest.json && mv modified_manifest.json manifest.json && cross-env NODE_ENV=production cross-env TARGET_BROWSER=firefox webpack",
"build:opera": "jq '.permissions = if .permissions then (.permissions | map(select(. != \"webRequest\"))) else .permissions end' manifest.json > modified_manifest.json && mv modified_manifest.json manifest.json && cross-env NODE_ENV=production cross-env TARGET_BROWSER=opera webpack",
"build": "yarn run build:chrome && yarn run build:firefox && yarn run build:opera",
Expand Down Expand Up @@ -48,12 +49,13 @@
"@babel/runtime": "^7.21.5",
"@headlessui/react": "^1.6.0",
"@heroicons/react": "^1.0.5",
"@pollum-io/sysweb3-keyring": "^1.0.479",
"@pollum-io/sysweb3-core": "^1.0.27",
"@pollum-io/sysweb3-keyring": "^1.0.480",
"@pollum-io/sysweb3-network": "^1.0.95",
"@pollum-io/sysweb3-utils": "^1.1.232",
"@reduxjs/toolkit": "^1.4.0",
"@tippyjs/react": "^4.2.6",
"@types/chrome": "^0.0.235",
"@types/chrome": "^0.0.268",
"@types/copy-paste": "^1.1.30",
"@types/crypto-js": "^4.0.2",
"@types/jest": "^29.5.1",
Expand All @@ -78,6 +80,7 @@
"currency-symbol-map": "^5.0.1",
"currency.js": "^2.0.4",
"date-fns": "^2.16.1",
"dotenv": "^16.3.1",
"emoji-log": "^1.0.2",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.23.3",
Expand Down Expand Up @@ -109,7 +112,9 @@
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-persist-webextension-storage": "^1.0.2",
"redux-thunk": "^3.1.0",
"redux-watch": "^1.2.0",
"reduxed-chrome-storage": "^3.0.10",
"sass": "^1.62.1",
"selenium-webdriver": "^4.1.1",
"syscoinjs-lib": "1.0.218",
Expand Down Expand Up @@ -166,10 +171,12 @@
"ts-jest": "^27.1.3",
"typescript": "4.1.5",
"webpack": "^5.82.0",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.0.2",
"webpack-dev-server": "^4.13.3",
"webpack-merge": "^5.10.0",
"wext-manifest-loader": "^3.0.0",
"wext-manifest-webpack-plugin": "^1.2.1"
"wext-manifest-webpack-plugin": "^1.4.1"
},
"main": "index.js",
"bugs": {
Expand Down
21 changes: 0 additions & 21 deletions patches/webextension-polyfill+0.8.0.patch

This file was deleted.

This file was deleted.

139 changes: 0 additions & 139 deletions patches/wext-manifest-webpack-plugin+1.2.1.patch

This file was deleted.

4 changes: 0 additions & 4 deletions source/assets/images/faucet-error.svg

This file was deleted.

Loading

0 comments on commit 3d76d5b

Please sign in to comment.