Skip to content

Commit

Permalink
Merge pull request #337 from enkryptcom/develop
Browse files Browse the repository at this point in the history
Release: v1.25.0
  • Loading branch information
kvhnuke authored Aug 15, 2023
2 parents ccb0895 + c91834f commit dbf55c6
Show file tree
Hide file tree
Showing 23 changed files with 783 additions and 416 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"version:apply": "yarn version apply --all"
},
"devDependencies": {
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
"@swc/core": "^1.3.70",
"@commitlint/cli": "^17.7.0",
"@commitlint/config-conventional": "^17.7.0",
"@swc/core": "^1.3.75",
"concurrently": "^7.6.0",
"devmoji": "^2.3.0",
"husky": "^8.0.3",
Expand Down
10 changes: 5 additions & 5 deletions packages/extension-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,24 @@
],
"dependencies": {
"nanoevents": "^7.0.1",
"serialize-error": "11.0.0",
"serialize-error": "11.0.1",
"tiny-uid": "^1.1.2",
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.27.0",
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.4.9",
"@types/webextension-polyfill": "^0.10.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"bumpp": "^8.2.1",
"eslint": "^8.45.0",
"eslint": "^8.46.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^2.8.8",
"ts-node": "^10.9.1",
Expand Down
24 changes: 12 additions & 12 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enkryptcom/extension",
"version": "1.24.0",
"version": "1.25.0",
"private": true,
"scripts": {
"zip": "cd dist; zip -r release.zip *;",
Expand All @@ -18,7 +18,7 @@
"watch-vue-firefox": "cross-env BROWSER='firefox' vue-cli-service build --watch --no-clean"
},
"dependencies": {
"@babel/runtime": "^7.22.6",
"@babel/runtime": "^7.22.10",
"@enkryptcom/extension-bridge": "workspace:^",
"@enkryptcom/hw-wallets": "workspace:^",
"@enkryptcom/keyring": "workspace:^",
Expand All @@ -29,12 +29,12 @@
"@enkryptcom/utils": "workspace:^",
"@ethereumjs/common": "^3.2.0",
"@ethereumjs/tx": "^4.2.0",
"@ledgerhq/hw-transport-webusb": "^6.27.17",
"@ledgerhq/hw-transport-webusb": "^6.27.18",
"@metamask/eth-sig-util": "^6.0.0",
"@types/chrome": "^0.0.241",
"@types/events": "^3.0.0",
"@types/less": "^3.0.3",
"@types/lodash": "^4.14.195",
"@types/lodash": "^4.14.196",
"@types/utf-8-validate": "^5.0.0",
"@vueuse/core": "^9.13.0",
"add": "^2.0.6",
Expand All @@ -44,7 +44,7 @@
"bitcoinjs-message": "^2.2.0",
"chai": "^4.3.7",
"concurrently": "^7.6.0",
"core-js": "^3.31.1",
"core-js": "^3.32.0",
"echarts": "^5.4.3",
"ethereumjs-abi": "^0.6.8",
"ethereumjs-util": "^7.1.5",
Expand All @@ -54,13 +54,13 @@
"memoize-one": "^6.0.0",
"moment": "^2.29.4",
"nanoevents": "^7.0.1",
"pinia": "^2.1.4",
"qrcode.vue": "^3.4.0",
"pinia": "^2.1.6",
"qrcode.vue": "^3.4.1",
"switch-ts": "^1.1.1",
"url-parse": "^1.5.10",
"uuid": "^9.0.0",
"vue": "^3.3.4",
"vue-echarts": "^6.6.0",
"vue-echarts": "^6.6.1",
"vue-router": "4.2.4",
"vue3-lottie": "^2.7.4",
"vuedraggable": "^4.1.0",
Expand Down Expand Up @@ -100,12 +100,12 @@
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
"crypto-browserify": "^3.12.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^8.7.1",
"https-browserify": "^1.0.0",
"less": "^4.1.3",
"less": "^4.2.0",
"less-loader": "^11.1.3",
"mocha": "^10.2.0",
"path-browserify": "^1.0.1",
Expand All @@ -115,7 +115,7 @@
"rollup-plugin-uglify": "^6.0.4",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"systeminformation": "^5.18.7",
"systeminformation": "^5.18.14",
"ts-mocha": "^10.0.0",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5",
Expand Down
10 changes: 4 additions & 6 deletions packages/extension/src/libs/nft-handlers/simplehash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ export default async (
if (!allItems || !allItems.length) return [];
const collections: Record<string, NFTCollection> = {};
allItems.forEach((item) => {
if (
(!item.image_url && !item.previews.image_medium_url) ||
!item.collection.image_url
)
return;
if (!item.image_url && !item.previews.image_medium_url) return;
if (collections[item.contract_address]) {
const tItem: NFTItem = {
contract: item.contract_address,
Expand All @@ -70,7 +66,9 @@ export default async (
const ret: NFTCollection = {
name: item.collection.name,
description: item.collection.description,
image: item.collection.image_url,
image:
item.collection.image_url ||
require("@action/assets/common/not-found.jpg"),
contract: item.contract_address,
items: [
{
Expand Down
2 changes: 2 additions & 0 deletions packages/extension/src/libs/settings-state/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Browser from "webextension-polyfill";
import { InternalStorageNamespace } from "@/types/provider";
import BrowserStorage from "@/libs/common/browser-storage";
import {
Expand Down Expand Up @@ -51,6 +52,7 @@ class SettingsState {
return {
evm: evmstate,
substrate: substratestate,
manifestVersion: Browser.runtime.getManifest().manifest_version,
};
}
async getStateByKey(key: string): Promise<any> {
Expand Down
1 change: 1 addition & 0 deletions packages/extension/src/libs/settings-state/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export interface SubstrateSettingsType {
export interface SettingsType {
evm: EVMSettingsType;
substrate: SubstrateSettingsType;
manifestVersion: number;
}
7 changes: 7 additions & 0 deletions packages/extension/src/manifest/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
}
},
"content_scripts": [
{
"matches": ["file://*/*", "http://*/*", "https://*/*"],
"js": ["scripts/inject.js"],
"run_at": "document_start",
"all_frames": false,
"world": "MAIN"
},
{
"matches": ["file://*/*", "http://*/*", "https://*/*"],
"js": ["scripts/contentscript.js"],
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/src/manifest/manifest-chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
{
"resources": ["scripts/inject.js", "scripts/*.js.map"],
"use_dynamic_url": false,
"matches": ["http://*/*", "https://*/*"]
"matches": ["file://*/*", "http://*/*", "https://*/*"]
}
],
"minimum_chrome_version": "103",
"minimum_chrome_version": "111",
"content_security_policy": {
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"
}
Expand Down
13 changes: 13 additions & 0 deletions packages/extension/src/manifest/manifest-firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@
"default_title": "Enkrypt",
"default_popup": "action.html"
},
"content_scripts": [
{
"matches": ["file://*/*", "http://*/*", "https://*/*"],
"js": ["scripts/contentscript.js"],
"run_at": "document_start",
"all_frames": false
},
{
"matches": ["*://connect.trezor.io/*/popup.html"],
"js": ["vendor/trezor-content-script.js"],
"run_at": "document_start"
}
],
"browser_specific_settings": {
"gecko": {
"strict_min_version": "100.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const tempWindow: EnkryptWindow = {
substrate: {
injectPolkadotjs: true,
},
manifestVersion: 3,
},
},
};
Expand Down
8 changes: 5 additions & 3 deletions packages/extension/src/scripts/contentscript.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import browser from "webextension-polyfill";
import Browser from "webextension-polyfill";
import { setContentScriptNamespace } from "@/libs/messenger/extension";
import { InjectedIDs } from "@/types/messenger";
setContentScriptNamespace();
function injectScript() {
try {
const injectURL = browser.runtime.getURL("scripts/inject.js");
const injectURL = Browser.runtime.getURL("scripts/inject.js");
const container = document.head || document.documentElement;
const scriptTag = document.createElement("script");
scriptTag.setAttribute("async", "false");
Expand All @@ -21,4 +21,6 @@ function injectScript() {
}
}

injectScript();
if (Browser.runtime.getManifest().manifest_version === 2) {
injectScript();
}
14 changes: 7 additions & 7 deletions packages/hw-wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.4.9",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.7",
"eslint": "^8.45.0",
"eslint": "^8.46.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-module-resolver": "^1.5.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
Expand All @@ -48,9 +48,9 @@
"@enkryptcom/types": "workspace:^",
"@enkryptcom/utils": "workspace:^",
"@ethereumjs/tx": "^4.2.0",
"@ledgerhq/hw-app-eth": "^6.34.1",
"@ledgerhq/hw-transport": "^6.28.6",
"@ledgerhq/hw-transport-webusb": "^6.27.17",
"@ledgerhq/hw-app-eth": "^6.34.2",
"@ledgerhq/hw-transport": "^6.28.7",
"@ledgerhq/hw-transport-webusb": "^6.27.18",
"@ledgerhq/live-common": "^24.1.0",
"@polkadot/types": "^10.9.1",
"@polkadot/util": "^12.3.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/keyring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.4.9",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.7",
"eslint": "^8.45.0",
"eslint": "^8.46.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-module-resolver": "^1.5.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
Expand Down
8 changes: 4 additions & 4 deletions packages/name-resolution/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.4.9",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.7",
"eslint": "^8.45.0",
"eslint": "^8.46.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-module-resolver": "^1.5.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
Expand Down
8 changes: 4 additions & 4 deletions packages/request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.4.9",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.7",
"eslint": "^8.45.0",
"eslint": "^8.46.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-module-resolver": "^1.5.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
Expand Down
8 changes: 4 additions & 4 deletions packages/signers/bitcoin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
"@types/chai": "^4.3.5",
"@types/hdkey": "^2.0.1",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.4.9",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.45.0",
"eslint": "^8.46.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-module-resolver": "^1.5.0",
"mocha": "^9.2.2",
"prettier": "^2.8.8",
Expand Down
8 changes: 4 additions & 4 deletions packages/signers/ethereum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
"@types/chai": "^4.3.5",
"@types/hdkey": "^2.0.1",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.4.9",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.45.0",
"eslint": "^8.46.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-module-resolver": "^1.5.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
Expand Down
Loading

2 comments on commit dbf55c6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.