Skip to content
Open
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
"prepare": "husky"
},
"devDependencies": {
"@commitlint/cli": "^20.5.0",
"@commitlint/config-conventional": "^20.5.0",
"@swc/core": "^1.15.21",
"@commitlint/cli": "^20.5.3",
"@commitlint/config-conventional": "^20.5.3",
"@swc/core": "^1.15.40",
"concurrently": "^9.2.1",
"husky": "^9.1.7",
"node-notifier": "^10.0.1",
"nodemon": "^3.1.14",
"ultra-runner": "^3.10.5",
"vite-plugin-node-polyfills": "0.26.0"
"vite-plugin-node-polyfills": "0.28.0"
},
"resolutions": {
"@zondax/ledger-cosmos-js/vue": "^3.5.12",
Expand Down
12 changes: 6 additions & 6 deletions packages/extension-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,23 @@
"webextension-polyfill": "^0.12.0"
},
"devDependencies": {
"@types/node": "^22.19.15",
"@types/node": "^22.19.19",
"@types/webextension-polyfill": "^0.12.5",
"@typescript-eslint/eslint-plugin": "^8.58.0",
"@typescript-eslint/parser": "^8.58.0",
"@typescript-eslint/eslint-plugin": "^8.59.4",
"@typescript-eslint/parser": "^8.59.4",
"bumpp": "^10.4.1",
"eslint": "^9.39.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^3.8.1",
"prettier": "^3.8.3",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.1",
"type-fest": "^5.5.0",
"type-fest": "^5.6.0",
"typescript": "^5.9.3",
"typescript-eslint": "8.58.0"
"typescript-eslint": "8.59.4"
}
}
50 changes: 25 additions & 25 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enkryptcom/extension",
"version": "2.17.0",
"version": "2.18.0",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -23,7 +23,7 @@
"watch:firefox": "yarn prebuild && cross-env BROWSER='firefox' vite"
},
"dependencies": {
"@amplitude/analytics-browser": "^2.38.1",
"@amplitude/analytics-browser": "^2.42.4",
"@enkryptcom/extension-bridge": "workspace:^",
"@enkryptcom/hw-wallets": "workspace:^",
"@enkryptcom/keyring": "workspace:^",
Expand All @@ -38,7 +38,7 @@
"@ethereumjs/wallet": "^2.0.4",
"@kadena/client": "^1.18.3",
"@kadena/pactjs-cli": "^1.18.3",
"@ledgerhq/hw-transport-webusb": "^6.33.0",
"@ledgerhq/hw-transport-webusb": "^6.34.2",
"@massalabs/massa-web3": "^5.3.0",
"@metamask/eth-sig-util": "^8.2.0",
"@metaplex-foundation/mpl-bubblegum": "^5.0.2",
Expand All @@ -64,22 +64,22 @@
"bitcoinjs-lib": "^6.1.7",
"bs58": "^6.0.0",
"concurrently": "^9.2.1",
"echarts": "^6.0.0",
"echarts": "^6.1.0",
"ethereum-cryptography": "^2.2.1",
"ethereumjs-abi": "^0.6.8",
"eventemitter3": "^5.0.4",
"jdenticon": "^3.3.0",
"lodash": "^4.18.0",
"lodash": "^4.18.1",
"memoize-one": "^6.0.0",
"moment": "^2.30.1",
"nanoevents": "^9.1.0",
"pact-lang-api": "^4.3.6",
"pinia": "^3.0.4",
"qrcode.vue": "^3.8.0",
"qrcode.vue": "^3.9.1",
"switch-ts": "^2.0.0",
"url-parse": "^1.5.10",
"uuid": "^13.0.0",
"vue": "^3.5.31",
"uuid": "^13.0.2",
"vue": "^3.5.34",
"vue-echarts": "8.0.1",
"vue-router": "^4.6.4",
"vue3-lottie": "^3.3.1",
Expand All @@ -100,46 +100,46 @@
"@rollup/plugin-typescript": "^12.3.0",
"@tsconfig/node20": "^20.1.9",
"@types/bs58": "^5.0.0",
"@types/chrome": "^0.1.38",
"@types/chrome": "^0.1.42",
"@types/ethereumjs-abi": "^0.6.5",
"@types/events": "^3.0.3",
"@types/fs-extra": "^11.0.4",
"@types/less": "^3.0.8",
"@types/lodash": "^4.17.24",
"@types/node": "^22.19.15",
"@types/node": "^22.19.19",
"@types/semver": "^7.7.1",
"@types/url-parse": "^1.4.11",
"@types/utf-8-validate": "^5.0.2",
"@types/uuid": "^11.0.0",
"@types/wif": "^2.0.5",
"@types/zxcvbn": "^4.4.5",
"@vitejs/plugin-vue": "^6.0.5",
"@vitejs/plugin-vue": "^6.0.7",
"@vue/eslint-config-prettier": "^10.2.0",
"@vue/eslint-config-typescript": "^14.7.0",
"@vue/tsconfig": "^0.8.1",
"@vueuse/core": "^14.2.1",
"@vue/tsconfig": "^0.9.1",
"@vueuse/core": "^14.3.0",
"cross-env": "^10.1.0",
"eslint": "^9.39.4",
"eslint-plugin-vue": "^10.8.0",
"fs-extra": "^11.3.4",
"jsdom": "^29.0.1",
"eslint-plugin-vue": "^10.9.1",
"fs-extra": "^11.3.5",
"jsdom": "^29.1.1",
"less": "^4.6.4",
"less-loader": "^12.3.2",
"less-loader": "^12.3.3",
"npm-run-all2": "^8.0.4",
"prettier": "^3.8.1",
"prettier": "^3.8.3",
"rimraf": "^6.1.3",
"rollup": "^4.60.1",
"rollup": "^4.60.4",
"rollup-plugin-visualizer": "^6.0.11",
"semver": "^7.7.4",
"systeminformation": "^5.31.5",
"semver": "^7.8.1",
"systeminformation": "^5.31.6",
"tsup": "^8.5.1",
"typescript": "~5.9.3",
"url": "^0.11.4",
"vite": "^7.3.1",
"vite-plugin-node-polyfills": "0.26.0",
"vite": "^7.3.3",
"vite-plugin-node-polyfills": "0.28.0",
"vite-tsconfig-paths": "^6.1.1",
"vitest": "^4.1.2",
"vue-tsc": "^3.2.6",
"vitest": "^4.1.7",
"vue-tsc": "^3.3.1",
"webextension-polyfill": "^0.12.0"
},
"installConfig": {
Expand Down
8 changes: 5 additions & 3 deletions packages/extension/src/libs/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ class BackgroundHandler {
method === InternalMethods.newWindowUnload
) {
this.#persistentEvents.deleteEvents(_tabid);
isGeoRestricted().then(restricted => {
this.#geoRestricted = restricted;
});
if (this.#geoRestricted === undefined) {
isGeoRestricted().then(restricted => {
this.#geoRestricted = restricted;
});
}
Comment on lines +92 to +96
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Cache the in-flight geo check, not only the resolved value.

this.#geoRestricted === undefined remains true until the first promise resolves, so repeated init/unload messages can still fire multiple isGeoRestricted() requests. Store a pending promise (or await a shared one) to truly dedupe calls.

Suggested adjustment
+ `#geoRestrictedPromise`: Promise<boolean> | undefined;
...
- if (this.#geoRestricted === undefined) {
-   isGeoRestricted().then(restricted => {
-     this.#geoRestricted = restricted;
-   });
- }
+ if (this.#geoRestricted === undefined && !this.#geoRestrictedPromise) {
+   this.#geoRestrictedPromise = isGeoRestricted().then(restricted => {
+     this.#geoRestricted = restricted;
+     this.#geoRestrictedPromise = undefined;
+     return restricted;
+   });
+ }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/extension/src/libs/background/index.ts` around lines 92 - 96, The
geo-check currently only caches the resolved boolean in this.#geoRestricted,
causing repeated calls while the first promise is pending; change the logic to
store the in-flight promise (e.g., a new private field like
`#geoRestrictedPromise` or reuse `#geoRestricted` to hold Promise<boolean> until
resolution), set that promise when calling isGeoRestricted(), have all callers
await that shared promise, and when it resolves assign the final boolean to
this.#geoRestricted (or a separate boolean field) and clear the promise; also
handle promise rejection by logging/setting a safe default so subsequent calls
can retry.

return {
result: JSON.stringify(true),
};
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/libs/utils/screening.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const isGeoRestricted = async (): Promise<boolean> => {
return fetch('https://partners.mewapi.io/o/ipcomply')
return fetch('https://partners.mewapi.io/o/ipcomply/enkrypt')
.then(async res => {
if (res.ok) {
const json = await res.json();
Expand Down
28 changes: 14 additions & 14 deletions packages/hw-wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
"node": ">=14.15.0"
},
"devDependencies": {
"@types/node": "^25.5.0",
"@typescript-eslint/eslint-plugin": "^8.58.0",
"@typescript-eslint/parser": "^8.58.0",
"@types/node": "^25.9.1",
"@typescript-eslint/eslint-plugin": "^8.59.4",
"@typescript-eslint/parser": "^8.59.4",
"eslint": "^9.39.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^3.8.1",
"prettier": "^3.8.3",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.1",
"typescript": "^5.9.3",
"typescript-eslint": "8.58.0",
"vitest": "^4.1.2"
"typescript-eslint": "8.59.4",
"vitest": "^4.1.7"
},
"repository": {
"type": "git",
Expand All @@ -52,19 +52,19 @@
"@ethereumjs/rlp": "^5.0.2",
"@ethereumjs/tx": "^5.4.0",
"@ethereumjs/util": "^9.1.0",
"@ledgerhq/hw-app-btc": "^10.20.1",
"@ledgerhq/hw-app-eth": "^7.6.2",
"@ledgerhq/hw-app-solana": "^7.9.1",
"@ledgerhq/hw-transport": "^6.34.1",
"@ledgerhq/hw-transport-webusb": "^6.33.0",
"@ledgerhq/hw-app-btc": "^10.22.1",
"@ledgerhq/hw-app-eth": "^7.8.3",
"@ledgerhq/hw-app-solana": "^7.10.2",
"@ledgerhq/hw-transport": "^6.35.2",
"@ledgerhq/hw-transport-webusb": "^6.34.2",
"@ledgerhq/live-common": "^34.20.0",
"@metamask/eth-sig-util": "^8.2.0",
"@polkadot/types": "^16.5.6",
"@polkadot/util": "^14.0.3",
"@trezor/connect": "^9.7.2",
"@trezor/connect": "^9.7.3",
"@trezor/connect-plugin-ethereum": "^9.1.5",
"@trezor/connect-web": "^9.7.2",
"@trezor/connect-webextension": "^9.7.2",
"@trezor/connect-web": "^9.7.3",
"@trezor/connect-webextension": "^9.7.3",
"@zondax/ledger-substrate": "^2.1.2",
"bitcoinjs-lib": "^6.1.7",
"bs58": "^6.0.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/keyring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@
"bip39": "^3.1.0"
},
"devDependencies": {
"@types/node": "^22.19.15",
"@typescript-eslint/eslint-plugin": "^8.58.0",
"@typescript-eslint/parser": "^8.58.0",
"@types/node": "^22.19.19",
"@typescript-eslint/eslint-plugin": "^8.59.4",
"@typescript-eslint/parser": "^8.59.4",
"eslint": "^9.39.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^3.8.1",
"prettier": "^3.8.3",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.1",
"typescript": "^5.9.3",
"typescript-eslint": "8.58.0",
"vitest": "^4.1.2"
"typescript-eslint": "8.59.4",
"vitest": "^4.1.7"
},
"repository": {
"type": "git",
Expand Down
16 changes: 8 additions & 8 deletions packages/name-resolution/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@
"node": ">=14.15.0"
},
"devDependencies": {
"@types/node": "^22.19.15",
"@typescript-eslint/eslint-plugin": "^8.58.0",
"@typescript-eslint/parser": "^8.58.0",
"@types/node": "^22.19.19",
"@typescript-eslint/eslint-plugin": "^8.59.4",
"@typescript-eslint/parser": "^8.59.4",
"eslint": "^9.39.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^3.8.1",
"prettier": "^3.8.3",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.1",
"typescript": "^5.9.3",
"typescript-eslint": "8.58.0",
"viem": "^2.47.6",
"vitest": "^4.1.2"
"typescript-eslint": "8.59.4",
"viem": "^2.50.4",
"vitest": "^4.1.7"
},
"repository": {
"type": "git",
Expand All @@ -48,7 +48,7 @@
"author": "kvhnuke",
"license": "MIT",
"dependencies": {
"@bonfida/spl-name-service": "3.0.20",
"@bonfida/spl-name-service": "3.0.21",
"@ensdomains/address-encoder": "^1.1.4",
"@unstoppabledomains/resolution": "^9.3.3",
"@web3-name-sdk/core": "0.4.2",
Expand Down
16 changes: 8 additions & 8 deletions packages/request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@
"isomorphic-ws": "^5.0.0",
"json-rpc-2.0": "^1.7.1",
"reconnecting-websocket": "^4.4.0",
"uuid": "^13.0.0",
"ws": "^8.20.0"
"uuid": "^13.0.2",
"ws": "^8.21.0"
},
"devDependencies": {
"@types/node": "^22.19.15",
"@typescript-eslint/eslint-plugin": "^8.58.0",
"@typescript-eslint/parser": "^8.58.0",
"@types/node": "^22.19.19",
"@typescript-eslint/eslint-plugin": "^8.59.4",
"@typescript-eslint/parser": "^8.59.4",
"eslint": "^9.39.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^3.8.1",
"prettier": "^3.8.3",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.1",
"typescript": "^5.9.3",
"typescript-eslint": "8.58.0",
"vitest": "^4.1.2"
"typescript-eslint": "8.59.4",
"vitest": "^4.1.7"
},
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions packages/signers/bitcoin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@
"devDependencies": {
"@enkryptcom/types": "workspace:^",
"@types/hdkey": "^2.1.0",
"@types/node": "^25.5.0",
"@typescript-eslint/eslint-plugin": "^8.58.0",
"@typescript-eslint/parser": "^8.58.0",
"@types/node": "^25.9.1",
"@typescript-eslint/eslint-plugin": "^8.59.4",
"@typescript-eslint/parser": "^8.59.4",
"eslint": "^9.39.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^3.8.1",
"prettier": "^3.8.3",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.1",
"typescript": "^5.9.3",
"typescript-eslint": "8.58.0",
"vitest": "^4.1.2"
"typescript-eslint": "8.59.4",
"vitest": "^4.1.7"
},
"repository": {
"type": "git",
Expand Down
Loading
Loading