Skip to content

Commit

Permalink
Merge pull request #383 from enkryptcom/fix/keyring-timeout-lock
Browse files Browse the repository at this point in the history
fix: reset lock screen issue and package updates
  • Loading branch information
kvhnuke authored Jan 23, 2024
2 parents c2ca03c + 1255907 commit 3ce2093
Show file tree
Hide file tree
Showing 24 changed files with 1,139 additions and 2,029 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
"devDependencies": {
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@swc/core": "^1.3.100",
"@swc/core": "^1.3.104",
"concurrently": "^8.2.2",
"devmoji": "^2.3.0",
"husky": "^8.0.3",
"node-notifier": "^10.0.1",
"nodemon": "^3.0.2",
"nodemon": "^3.0.3",
"ultra-runner": "^3.10.5"
},
"resolutions": {
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 @@ -41,19 +41,19 @@
"devDependencies": {
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.4",
"@types/node": "^20.11.5",
"@types/webextension-polyfill": "^0.10.7",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"bumpp": "^9.2.0",
"eslint": "^8.55.0",
"bumpp": "^9.3.0",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^2.8.8",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^6.7.0",
"type-fest": "^2.19.0",
Expand Down
40 changes: 20 additions & 20 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enkryptcom/extension",
"version": "1.31.0",
"version": "1.32.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.23.5",
"@babel/runtime": "^7.23.8",
"@enkryptcom/extension-bridge": "workspace:^",
"@enkryptcom/hw-wallets": "workspace:^",
"@enkryptcom/keyring": "workspace:^",
Expand All @@ -29,10 +29,10 @@
"@enkryptcom/utils": "workspace:^",
"@ethereumjs/common": "^3.2.0",
"@ethereumjs/tx": "^4.2.0",
"@ledgerhq/hw-transport-webusb": "^6.28.0",
"@metamask/eth-sig-util": "^6.0.2",
"@ledgerhq/hw-transport-webusb": "^6.28.1",
"@metamask/eth-sig-util": "^7.0.1",
"@rollup/plugin-replace": "^5.0.5",
"@types/chrome": "^0.0.250",
"@types/chrome": "^0.0.258",
"@types/events": "^3.0.3",
"@types/less": "^3.0.6",
"@types/lodash": "^4.14.202",
Expand All @@ -43,25 +43,25 @@
"bip39": "^3.1.0",
"bitcoinjs-lib": "^6.1.5",
"bitcoinjs-message": "^2.2.0",
"chai": "^4.3.10",
"chai": "^4.4.1",
"concurrently": "^8.2.2",
"core-js": "^3.34.0",
"core-js": "^3.35.0",
"echarts": "^5.4.3",
"ethereumjs-abi": "^0.6.8",
"ethereumjs-util": "^7.1.5",
"ethereumjs-wallet": "^1.0.2",
"eventemitter3": "^5.0.1",
"lodash": "^4.17.21",
"memoize-one": "^6.0.0",
"moment": "^2.29.4",
"moment": "^2.30.1",
"nanoevents": "^7.0.1",
"pinia": "^2.1.7",
"qrcode.vue": "^3.4.1",
"switch-ts": "^1.1.1",
"url-parse": "^1.5.10",
"uuid": "^9.0.1",
"vue": "^3.3.10",
"vue-echarts": "6.6.1",
"vue": "^3.4.15",
"vue-echarts": "6.6.8",
"vue-router": "4.2.5",
"vue3-lottie": "^2.7.4",
"vuedraggable": "^4.1.0",
Expand All @@ -72,19 +72,19 @@
},
"devDependencies": {
"@babel/plugin-transform-class-static-block": "^7.23.4",
"@polkadot/api": "^10.11.1",
"@polkadot/api": "^10.11.2",
"@polkadot/extension-inject": "^0.46.6",
"@polkadot/keyring": "^12.6.1",
"@polkadot/rpc-provider": "^10.11.1",
"@polkadot/types": "^10.11.1",
"@polkadot/types-known": "^10.11.1",
"@polkadot/keyring": "^12.6.2",
"@polkadot/rpc-provider": "^10.11.2",
"@polkadot/types": "^10.11.2",
"@polkadot/types-known": "^10.11.2",
"@polkadot/ui-shared": "^3.6.4",
"@polkadot/util": "^12.6.1",
"@polkadot/util": "^12.6.2",
"@polkadot/wasm-crypto": "^7.3.2",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-inject": "^5.0.5",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.5",
"@rollup/plugin-typescript": "^11.1.6",
"@types/ethereumjs-abi": "^0.6.5",
"@types/mocha": "^10.0.6",
"@types/url-parse": "^1.4.11",
Expand All @@ -101,13 +101,13 @@
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
"crypto-browserify": "^3.12.0",
"eslint": "^8.55.0",
"eslint": "^8.56.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.2.0",
"less-loader": "^11.1.3",
"less-loader": "^11.1.4",
"mocha": "^10.2.0",
"path-browserify": "^1.0.1",
"prettier": "^2.8.8",
Expand All @@ -117,7 +117,7 @@
"semver": "^7.5.4",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"systeminformation": "^5.21.20",
"systeminformation": "^5.21.22",
"ts-mocha": "^10.0.0",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ class Transaction {
gasLimit: string;
formattedFeeHistory?: FormattedFeeHistory;
}> {
const latestBlock = await this.web3.getBlock("latest", false);
const { isFeeMarketNetwork, feeHistory } = await this.web3
.getFeeHistory(6, "latest", GAS_PERCENTILES)
.then((history) => ({
isFeeMarketNetwork: true,
isFeeMarketNetwork: !!latestBlock.baseFeePerGas,
feeHistory: history,
}))
.catch(() => ({
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/providers/ethereum/networks/aa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const artheraOptions: EvmNetworkOptions = {
isTestNetwork: false,
currencyName: "AA",
currencyNameLong: "Arthera",
node: "https://rpc.arthera.net",
node: "wss://ws.arthera.net",
icon: require("./icons/aa.svg"),
activityHandler: wrapActivityHandler(EtherscanActivity),
};
Expand Down
2 changes: 2 additions & 0 deletions packages/extension/src/providers/ethereum/networks/glmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler";
import { CoingeckoPlatform, NetworkNames } from "@enkryptcom/types";
import { EtherscanActivity } from "../libs/activity-handlers";
import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network";
import assetsInfoHandler from "@/providers/ethereum/libs/assets-handlers/assetinfo-mew";

const moonbeamOptions: EvmNetworkOptions = {
name: NetworkNames.Moonbeam,
Expand All @@ -17,6 +18,7 @@ const moonbeamOptions: EvmNetworkOptions = {
icon: require("./icons/moonbeam.svg"),
coingeckoID: "moonbeam",
coingeckoPlatform: CoingeckoPlatform.Moonbeam,
assetsInfoHandler,
activityHandler: wrapActivityHandler(EtherscanActivity),
};

Expand Down
2 changes: 2 additions & 0 deletions packages/extension/src/providers/ethereum/networks/movr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler";
import { CoingeckoPlatform, NetworkNames } from "@enkryptcom/types";
import { EtherscanActivity } from "../libs/activity-handlers";
import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network";
import assetsInfoHandler from "@/providers/ethereum/libs/assets-handlers/assetinfo-mew";

const moonriverOptions: EvmNetworkOptions = {
name: NetworkNames.Moonriver,
Expand All @@ -16,6 +17,7 @@ const moonriverOptions: EvmNetworkOptions = {
node: "wss://wss.api.moonriver.moonbeam.network",
icon: require("./icons/moonriver.svg"),
coingeckoID: "moonriver",
assetsInfoHandler,
coingeckoPlatform: CoingeckoPlatform.Moonriver,
activityHandler: wrapActivityHandler(EtherscanActivity),
};
Expand Down
6 changes: 5 additions & 1 deletion packages/extension/src/ui/action/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@
@update:active-networks="setActiveNetworks"
/>

<settings v-if="settingsShow" @close:popup="settingsShow = !settingsShow" />
<settings
v-if="settingsShow"
@close:popup="settingsShow = !settingsShow"
@action:lock="lockAction"
/>
<modal-rate v-if="rateShow" @close:popup="rateShow = !rateShow" />
<modal-new-version
v-if="updateShow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
<h3>Add new {{ network.name_long }} account</h3>

<div class="add-account-form__input" :class="{ focus: isFocus }">
<img :src="network.identicon(newAccount?.address || '')" />
<img
v-if="newAccount?.address"
:src="network.identicon(network.displayAddress(newAccount.address))"
/>
<input
ref="addAccountInput"
v-model="accountName"
Expand Down
5 changes: 5 additions & 0 deletions packages/extension/src/ui/action/views/reset-wallet/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ import BaseInput from "@action/components/base-input/index.vue";
import KeyRingBase from "@/libs/keyring/keyring";
import openOnboard from "@/libs/utils/open-onboard";
const emit = defineEmits<{
(e: "action:lock"): void;
}>();
const reset = ref("");
const isProcessing = ref(false);
Expand All @@ -63,6 +67,7 @@ const resetAction = async () => {
isProcessing.value = true;
const keyring = new KeyRingBase();
await keyring.reset();
emit("action:lock");
openOnboard();
};
</script>
Expand Down
1 change: 1 addition & 0 deletions packages/extension/src/ui/action/views/settings/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
/>
<reset-wallet
v-if="isReset"
v-bind="$attrs"
@window:close="close"
@window:back="startAction"
/>
Expand Down
22 changes: 11 additions & 11 deletions packages/hw-wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
"devDependencies": {
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.4",
"@types/node": "^20.11.5",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.10",
"eslint": "^8.55.0",
"chai": "^4.4.1",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-module-resolver": "^1.5.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^6.7.0",
"typescript": "^4.9.5",
Expand All @@ -48,13 +48,13 @@
"@enkryptcom/types": "workspace:^",
"@enkryptcom/utils": "workspace:^",
"@ethereumjs/tx": "^4.2.0",
"@ledgerhq/hw-app-eth": "^6.35.0",
"@ledgerhq/hw-transport": "^6.30.0",
"@ledgerhq/hw-transport-webusb": "^6.28.0",
"@ledgerhq/hw-app-eth": "^6.35.2",
"@ledgerhq/hw-transport": "^6.30.1",
"@ledgerhq/hw-transport-webusb": "^6.28.1",
"@ledgerhq/live-common": "^31.8.0",
"@polkadot/types": "^10.11.1",
"@polkadot/util": "^12.6.1",
"@trezor/connect-web": "^9.1.6",
"@polkadot/types": "^10.11.2",
"@polkadot/util": "^12.6.2",
"@trezor/connect-web": "^9.1.9",
"@zondax/ledger-substrate": "^0.41.3",
"ethereumjs-util": "^7.1.5",
"hdkey": "^2.1.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 @@ -23,27 +23,27 @@
"@enkryptcom/storage": "workspace:^",
"@enkryptcom/types": "workspace:^",
"@enkryptcom/utils": "workspace:^",
"@polkadot/util": "^12.6.1",
"@polkadot/util": "^12.6.2",
"assert": "^2.1.0",
"bip39": "^3.1.0"
},
"devDependencies": {
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.4",
"@types/node": "^20.11.5",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.10",
"eslint": "^8.55.0",
"chai": "^4.4.1",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-module-resolver": "^1.5.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^6.7.0",
"typescript": "^4.9.5",
Expand Down
1 change: 1 addition & 0 deletions packages/keyring/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ class KeyRing {
}

async reset(): Promise<void> {
this.lock();
const resetPromises = Object.values(configs.STORAGE_KEYS).map((name) =>
this.#storage.remove(name)
);
Expand Down
10 changes: 5 additions & 5 deletions packages/name-resolution/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
"devDependencies": {
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.4",
"@types/node": "^20.11.5",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.10",
"eslint": "^8.55.0",
"chai": "^4.4.1",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-module-resolver": "^1.5.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^6.7.0",
"typescript": "^4.9.5",
Expand Down
Loading

1 comment on commit 3ce2093

@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.