Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
"prepare": "husky"
},
"devDependencies": {
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@swc/core": "^1.9.2",
"concurrently": "^9.1.0",
"husky": "^9.1.6",
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@swc/core": "^1.10.14",
"concurrently": "^9.1.2",
"husky": "^9.1.7",
"node-notifier": "^10.0.1",
"nodemon": "^3.1.7",
"nodemon": "^3.1.9",
"ultra-runner": "^3.10.5"
},
"resolutions": {
Expand Down
18 changes: 9 additions & 9 deletions packages/extension-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,28 @@
],
"dependencies": {
"nanoevents": "^9.1.0",
"serialize-error": "11.0.3",
"serialize-error": "12.0.0",
"tiny-uid": "^1.1.2",
"webextension-polyfill": "^0.12.0"
},
"devDependencies": {
"@types/node": "^22.9.0",
"@types/node": "^22.13.1",
"@types/webextension-polyfill": "^0.12.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"bumpp": "^9.8.1",
"eslint": "^9.14.0",
"bumpp": "^10.0.2",
"eslint": "^9.20.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^3.3.3",
"prettier": "^3.4.2",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.3.5",
"type-fest": "^4.26.1",
"typescript": "^5.6.3",
"typescript-eslint": "8.14.0"
"tsup": "^8.3.6",
"type-fest": "^4.33.0",
"typescript": "^5.7.3",
"typescript-eslint": "8.23.0"
}
}
4 changes: 4 additions & 0 deletions packages/extension/configs/vite/empty.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const readFileSync = () => {};
const writeFileSync = () => {};

export { readFileSync, writeFileSync };
14 changes: 7 additions & 7 deletions packages/extension/configs/vite/transform-manifest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CrxPlugin } from '@crxjs/vite-plugin'
import { CrxPlugin } from '@crxjs/vite-plugin';

function transFormManifest(): CrxPlugin {
return {
Expand All @@ -17,15 +17,15 @@ function transFormManifest(): CrxPlugin {
js: ['vendor/trezor-content-script.js'],
run_at: 'document_start',
},
] as any
] as any;
if (process.env.BROWSER !== 'opera') {
manifest.content_scripts?.push({
matches: ['file://*/*', 'http://*/*', 'https://*/*'],
js: ['scripts/inject.js'],
run_at: 'document_start',
all_frames: false,
world: 'MAIN',
} as any)
} as any);
}
manifest.web_accessible_resources?.push({
resources: [
Expand All @@ -35,9 +35,9 @@ function transFormManifest(): CrxPlugin {
],
use_dynamic_url: false,
matches: ['file://*/*', 'http://*/*', 'https://*/*'],
})
return manifest
});
return manifest;
},
}
};
}
export default transFormManifest
export default transFormManifest;
120 changes: 60 additions & 60 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"watch:firefox": "yarn prebuild && cross-env BROWSER='firefox' vite"
},
"dependencies": {
"@amplitude/analytics-browser": "^2.11.9",
"@amplitude/analytics-browser": "^2.11.11",
"@enkryptcom/extension-bridge": "workspace:^",
"@enkryptcom/hw-wallets": "workspace:^",
"@enkryptcom/keyring": "workspace:^",
Expand All @@ -35,51 +35,51 @@
"@ethereumjs/common": "^4.4.0",
"@ethereumjs/tx": "^5.4.0",
"@ethereumjs/util": "^9.1.0",
"@kadena/client": "^1.15.0",
"@kadena/pactjs-cli": "^1.15.0",
"@ethereumjs/wallet": "^2.0.4",
"@kadena/client": "^1.16.0",
"@kadena/pactjs-cli": "^1.16.0",
"@ledgerhq/hw-transport-webusb": "^6.29.4",
"@metamask/eth-sig-util": "^7.0.3",
"@metaplex-foundation/mpl-bubblegum": "^4.2.1",
"@metaplex-foundation/umi": "^0.9.2",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
"@polkadot/api": "^14.3.1",
"@polkadot/extension-inject": "^0.56.2",
"@polkadot/keyring": "^13.2.3",
"@polkadot/rpc-provider": "^14.3.1",
"@polkadot/types": "^14.3.1",
"@polkadot/types-known": "^14.3.1",
"@polkadot/ui-shared": "^3.11.3",
"@polkadot/util": "^13.2.3",
"@metamask/eth-sig-util": "^8.2.0",
"@metaplex-foundation/mpl-bubblegum": "^4.3.1",
"@metaplex-foundation/umi": "^1.0.0",
"@metaplex-foundation/umi-bundle-defaults": "^1.0.0",
"@polkadot/api": "^15.5.2",
"@polkadot/extension-inject": "^0.58.3",
"@polkadot/keyring": "^13.3.1",
"@polkadot/rpc-provider": "^15.5.2",
"@polkadot/types": "^15.5.2",
"@polkadot/types-known": "^15.5.2",
"@polkadot/ui-shared": "^3.12.1",
"@polkadot/util": "^13.3.1",
"@polkadot/wasm-crypto": "^7.4.1",
"@solana-developers/helpers": "^2.5.6",
"@solana/spl-token": "^0.4.9",
"@solana/wallet-standard-features": "^1.2.0",
"@solana/web3.js": "^1.95.4",
"@wallet-standard/base": "^0.0.0-20240703212708",
"@solana-developers/helpers": "^2.7.0",
"@solana/spl-token": "^0.4.12",
"@solana/wallet-standard-features": "^1.3.0",
"@solana/web3.js": "^1.98.0",
"@wallet-standard/base": "^1.1.0",
"add": "^2.0.6",
"bignumber.js": "^9.1.2",
"bip39": "^3.1.0",
"bitcoinjs-lib": "^6.1.6",
"bitcoinjs-lib": "^6.1.7",
"bs58": "^6.0.0",
"concurrently": "^9.1.0",
"echarts": "^5.5.1",
"concurrently": "^9.1.2",
"echarts": "^5.6.0",
"ethereum-cryptography": "^2.2.1",
"ethereumjs-abi": "^0.6.8",
"ethereumjs-wallet": "^1.0.2",
"eventemitter3": "^5.0.1",
"lodash": "^4.17.21",
"memoize-one": "^6.0.0",
"moment": "^2.30.1",
"nanoevents": "^9.1.0",
"pact-lang-api": "^4.3.6",
"pinia": "^2.2.6",
"pinia": "^2.3.1",
"qrcode.vue": "^3.6.0",
"switch-ts": "^1.1.1",
"url-parse": "^1.5.10",
"uuid": "^10.0.0",
"vue": "^3.5.12",
"uuid": "^11.0.5",
"vue": "^3.5.13",
"vue-echarts": "7.0.3",
"vue-router": "^4.4.5",
"vue-router": "^4.5.0",
"vue3-lottie": "^3.3.1",
"vuedraggable": "^4.1.0",
"web3-eth": "^1.10.4",
Expand All @@ -88,55 +88,55 @@
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"@crxjs/vite-plugin": "^2.0.0-beta.26",
"@rollup/plugin-commonjs": "^28.0.1",
"@crxjs/vite-plugin": "^2.0.0-beta.31",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-inject": "^5.0.5",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-replace": "^6.0.1",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-replace": "^6.0.2",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.1",
"@rollup/plugin-typescript": "^12.1.2",
"@tsconfig/node20": "^20.1.4",
"@types/bs58": "^4.0.4",
"@types/chrome": "^0.0.280",
"@types/chrome": "^0.0.302",
"@types/ethereumjs-abi": "^0.6.5",
"@types/events": "^3.0.3",
"@types/fs-extra": "^11.0.4",
"@types/less": "^3.0.6",
"@types/lodash": "^4.17.13",
"@types/node": "^22.9.0",
"@types/less": "^3.0.8",
"@types/lodash": "^4.17.15",
"@types/node": "^22.13.1",
"@types/url-parse": "^1.4.11",
"@types/utf-8-validate": "^5.0.2",
"@types/uuid": "^10.0.0",
"@types/wif": "^2.0.5",
"@types/zxcvbn": "^4.4.5",
"@vitejs/plugin-vue": "^5.1.5",
"@vue/eslint-config-prettier": "^10.1.0",
"@vue/eslint-config-typescript": "^14.1.3",
"@vue/tsconfig": "^0.6.0",
"@vueuse/core": "^11.2.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vue/eslint-config-prettier": "^10.2.0",
"@vue/eslint-config-typescript": "^14.3.0",
"@vue/tsconfig": "^0.7.0",
"@vueuse/core": "^12.5.0",
"cross-env": "^7.0.3",
"eslint": "^9.14.0",
"eslint-plugin-vue": "^9.31.0",
"fs-extra": "^11.2.0",
"jsdom": "^25.0.1",
"less": "^4.2.0",
"eslint": "^9.20.0",
"eslint-plugin-vue": "^9.32.0",
"fs-extra": "^11.3.0",
"jsdom": "^26.0.0",
"less": "^4.2.2",
"less-loader": "^12.2.0",
"npm-run-all2": "^6.2.6",
"prettier": "^3.3.3",
"npm-run-all2": "^7.0.2",
"prettier": "^3.4.2",
"rimraf": "^6.0.1",
"rollup": "^4.25.0",
"rollup-plugin-visualizer": "^5.12.0",
"semver": "^7.6.3",
"systeminformation": "^5.23.5",
"tsup": "^8.3.5",
"typescript": "~5.6.3",
"rollup": "^4.34.6",
"rollup-plugin-visualizer": "^5.14.0",
"semver": "^7.7.1",
"systeminformation": "^5.25.11",
"tsup": "^8.3.6",
"typescript": "~5.7.3",
"url": "^0.11.4",
"vite": "^5.4.11",
"vite-plugin-node-polyfills": "0.17.0",
"vite-tsconfig-paths": "^5.1.2",
"vitest": "^2.1.4",
"vue-tsc": "^2.1.10",
"vite": "^6.1.0",
"vite-plugin-node-polyfills": "0.23.0",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^3.0.5",
"vue-tsc": "^2.2.0",
"webextension-polyfill": "^0.12.0"
},
"installConfig": {
Expand Down
3 changes: 1 addition & 2 deletions packages/extension/src/ui/action/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import Vue3Lottie from 'vue3-lottie';
global.WeakMap = WeakMap;

if (import.meta.env.DEV) {
globalThis.__ENKRYPT_DEBUG_LOG_CONF__ = import.meta.env.VITE_DEBUG_LOG
globalThis.__ENKRYPT_DEBUG_LOG_CONF__ = import.meta.env.VITE_DEBUG_LOG;
}


const app = createApp(App);

app.use(router).use(Vue3Lottie, { name: 'vue3lottie' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { computed, PropType, ref } from 'vue';
import ImportAccountHeader from '../components/import-account-header.vue';
import BaseInput from '@action/components/base-input/index.vue';
import BaseButton from '@action/components/base-button/index.vue';
import Wallet, { thirdparty } from 'ethereumjs-wallet';
import { Wallet, thirdparty } from '@ethereumjs/wallet';
import type { KeyringPair$Json } from '@polkadot/keyring/types';
import { BaseNetwork } from '@/types/base-network';
import { ProviderName } from '@/types/provider';
Expand Down Expand Up @@ -113,7 +113,7 @@ const unlock = async () => {
props.keystorePassword,
);

const newAddress = `0x${wallet.getAddress().toString('hex')}`;
const newAddress = wallet.getAddressString();

if (await keyring.accountAlreadyAdded(newAddress)) {
error.value = 'This account has already been added';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { ref, computed, type PropType } from 'vue';
import ImportAccountHeader from '../components/import-account-header.vue';
import BaseButton from '@action/components/base-button/index.vue';
import bs58 from 'bs58';
import Wallet from 'ethereumjs-wallet';
import { Wallet } from '@ethereumjs/wallet';
import { bufferToHex, hexToBuffer } from '@enkryptcom/utils';
import { type KeyPairAdd, SignerType } from '@enkryptcom/types';
import PublicKeyRing from '@/libs/keyring/public-keyring';
Expand Down Expand Up @@ -93,7 +93,7 @@ const importAction = async () => {
if (props.network.provider === ProviderName.ethereum) {
const buffer = hexToBuffer(formattedPrivateKey.value);
const wallet = new Wallet(buffer);
const newAddress = `0x${wallet.getAddress().toString('hex')}`;
const newAddress = wallet.getAddressString();

if (await keyring.accountAlreadyAdded(newAddress)) {
accountAlreadyExists.value = true;
Expand Down
11 changes: 9 additions & 2 deletions packages/extension/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@
"vite.config.ts",
"vite.firefox.config.ts",
"manifest.config.ts",
"manifest.firefox.config.ts"
"manifest.firefox.config.ts",
"src/**/*.ts",
"configs/**/*.ts",
"src/**/*.vue"
],
"compilerOptions": {
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]
"types": ["node"],
"paths": {
"@/*": ["./src/*"],
"@action/*": ["./src/ui/action/*"]
}
}
}
7 changes: 6 additions & 1 deletion packages/extension/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const getManifest = () => {
};

export default defineConfig({
legacy: {
skipWebSocketTokenCheck: true,
},
server: {
port: 5173,
strictPort: true,
Expand Down Expand Up @@ -67,6 +70,7 @@ export default defineConfig({
'http',
'https',
'path',
'os',
],
protocolImports: true,
}),
Expand All @@ -86,7 +90,6 @@ export default defineConfig({
preprocessorOptions: {
less: {
math: 'always',
relativeUrls: true,
javascriptEnabled: true,
},
},
Expand All @@ -98,6 +101,7 @@ export default defineConfig({
minify: process.env.MINIFY === 'true' ? 'esbuild' : false,
rollupOptions: {
plugins: [],
external: [],
input: {
action: 'action.html',
onboard: 'onboard.html',
Expand All @@ -116,6 +120,7 @@ export default defineConfig({
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@action': fileURLToPath(new URL('./src/ui/action', import.meta.url)),
fs: './configs/vite/empty.js',
},
},
});
Loading
Loading