Skip to content

Commit

Permalink
Merge pull request #276 from enkryptcom/devop/prep-release
Browse files Browse the repository at this point in the history
Prep: release
  • Loading branch information
kvhnuke authored Apr 26, 2023
2 parents a98cdd1 + 82498e4 commit 94b5d62
Show file tree
Hide file tree
Showing 24 changed files with 1,064 additions and 849 deletions.
6 changes: 0 additions & 6 deletions .yarn/versions/8cbbf8cb.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
undecided:
- enkrypt
- "@enkryptcom/extension"
- "@enkryptcom/extension-bridge"
- "@enkryptcom/hw-wallets"
- "@enkryptcom/keyring"
- "@enkryptcom/name-resolution"
- "@enkryptcom/request"
- "@enkryptcom/signer-bitcoin"
- "@enkryptcom/signer-ethereum"
- "@enkryptcom/signer-polkadot"
- "@enkryptcom/storage"
77 changes: 41 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</div>

<!-- ABOUT THE PROJECT -->

## About Enkrypt

Enkrypt is a web3 wallet built from the ground up to support the multi-chain future. Send, receive, swap, manage your tokens and NFTs, and interact with dapps on all of your favorite chains with just a few clicks. With only one seed phrase for all of your accounts Enkrypt makes it easy to manage your assets and stay secure. If you're looking for that extra layer of security Enkrypt also supports popular hardware wallets such as Ledger and Trezor.
Expand All @@ -30,42 +31,49 @@ Enkrypt is a web3 wallet built from the ground up to support the multi-chain fut

## Currently Supported Chains

* Ethereum
* Polygon
* BNB Smart Chain
* Moonbeam
* Moonriver
* Karura EVM+
* Ethereum Classic
* Polkadot
* Kusama
* Edgeware
* Acala
* Karura
* TomoChain
* More coming soon!
- Ethereum
- Polygon
- BNB Smart Chain
- Moonbeam
- Moonriver
- Karura EVM
- Ethereum Classic
- Polkadot
- Kusama
- Edgeware
- Acala
- Karura
- TomoChain
- Arbitrum
- Gnosis
- Avalanche
- Fantom
- Klaytn
- Aurora
- Ontology
- Puppy Net
- More coming soon!

Looking to add your project? [Contact us!](https://mewwallet.typeform.com/enkrypt-inquiry?typeform-source=www.enkrypt.com)

<p align="right">(<a href="#top">back to top</a>)</p>

### Built With

* [Typescript](https://www.typescriptlang.org/)
* [Vue.js](https://vuejs.org/)
- [Typescript](https://www.typescriptlang.org/)
- [Vue.js](https://vuejs.org/)

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- GETTING STARTED -->

## Getting Started

To get started make sure you have `nodejs` and `nvm` installed on your system

### Prerequisites

* npm
- npm
```sh
nvm install 16
nvm use 16
Expand All @@ -83,25 +91,24 @@ To get started make sure you have `nodejs` and `nvm` installed on your system
yarn install
```
3. Build the project and watch for changes
```sh
yarn watch-extension # chromium based browsers
yarn watch:firefox # firefox
```
```sh
yarn watch-extension # chromium based browsers
yarn watch:firefox # firefox
```
4. Build the project for release
```sh
yarn build:all
yarn build:chrome # chromium based browsers
yarn build:firefox # firefox
```
```sh
yarn build:all
yarn build:chrome # chromium based browsers
yarn build:firefox # firefox
```
5. Add to your browser
* [Chrome/Brave/Opera](https://developer.chrome.com/docs/extensions/mv2/getstarted/#manifest)
* [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#installing)
- [Chrome/Brave/Opera](https://developer.chrome.com/docs/extensions/mv2/getstarted/#manifest)
- [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#installing)

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- CONTRIBUTING -->

## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
Expand All @@ -117,18 +124,16 @@ Don't forget to give the project a star! Thanks again!

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- LICENSE -->

## License

Distributed under the MIT License. See `LICENSE.md` for more information.

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- CONTACT -->

## Contact

Twitter - [@enkrypt](https://twitter.com/enkrypt)
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "enkrypt",
"packageManager": "[email protected]",
"version": "0.0.1",
"version": "0.0.2",
"private": true,
"workspaces": [
"packages/signers/*",
Expand All @@ -25,18 +25,18 @@
"watch-ts": "nodemon --exec 'yarn run build:all && node scripts/compile-done.js'",
"upgrade": "yarn upgrade-interactive",
"version:bump:patch": "yarn workspaces foreach -pv --exclude @enkryptcom/extension exec 'yarn version --immediate patch'",
"publish": "yarn workspaces foreach -pv --exclude @enkryptcom/extension exec 'yarn npm publish --access public --otp'",
"publish": "yarn workspaces foreach -pv --exclude @enkryptcom/extension exec 'yarn npm publish --access public --otp 474911'",
"version:apply": "yarn version apply --all"
},
"devDependencies": {
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@swc/core": "^1.3.41",
"@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.6.1",
"@swc/core": "^1.3.53",
"concurrently": "^7.6.0",
"devmoji": "^2.3.0",
"husky": "^8.0.3",
"node-notifier": "^10.0.1",
"nodemon": "^2.0.21",
"nodemon": "^2.0.22",
"ultra-runner": "^3.10.5"
}
}
16 changes: 8 additions & 8 deletions packages/extension-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@
"@antfu/eslint-config": "^0.27.0",
"@types/chai": "^4.3.4",
"@types/mocha": "^9.1.1",
"@types/node": "^18.15.3",
"@types/node": "^18.16.0",
"@types/webextension-polyfill": "^0.10.0",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"bumpp": "^8.2.1",
"eslint": "^8.36.0",
"eslint": "^8.39.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.7.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^2.8.4",
"prettier": "^2.8.8",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.2",
"tsup": "^6.6.3",
"tsconfig-paths": "^4.2.0",
"tsup": "^6.7.0",
"type-fest": "^2.19.0",
"typescript": "^4.9.5",
"typescript-eslint": "0.0.1-alpha.0"
Expand Down
38 changes: 19 additions & 19 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"@enkryptcom/swap": "workspace:^",
"@enkryptcom/types": "workspace:^",
"@enkryptcom/utils": "workspace:^",
"@ethereumjs/common": "^3.1.1",
"@ethereumjs/tx": "^4.1.1",
"@ledgerhq/hw-transport-webusb": "^6.27.12",
"@ethereumjs/common": "^3.1.2",
"@ethereumjs/tx": "^4.1.2",
"@ledgerhq/hw-transport-webusb": "^6.27.13",
"@metamask/eth-sig-util": "^5.0.2",
"@types/chrome": "^0.0.224",
"@types/chrome": "^0.0.233",
"@types/events": "^3.0.0",
"@types/less": "^3.0.3",
"@types/lodash": "^4.14.191",
"@types/lodash": "^4.14.194",
"@types/utf-8-validate": "^5.0.0",
"@vueuse/core": "^9.13.0",
"add": "^2.0.6",
Expand All @@ -44,8 +44,8 @@
"bitcoinjs-message": "^2.2.0",
"chai": "^4.3.7",
"concurrently": "^7.6.0",
"core-js": "^3.29.1",
"echarts": "^5.4.1",
"core-js": "^3.30.1",
"echarts": "^5.4.2",
"ethereumjs-abi": "^0.6.8",
"ethereumjs-util": "^7.1.5",
"ethereumjs-wallet": "^1.0.2",
Expand All @@ -54,18 +54,18 @@
"memoize-one": "^6.0.0",
"moment": "^2.29.4",
"nanoevents": "^7.0.1",
"pinia": "^2.0.33",
"qrcode.vue": "^3.3.4",
"pinia": "^2.0.35",
"qrcode.vue": "^3.4.0",
"switch-ts": "^1.1.1",
"url-parse": "^1.5.10",
"uuid": "^9.0.0",
"vue": "^3.2.47",
"vue-echarts": "^6.5.4",
"vue-echarts": "^6.5.5",
"vue-router": "4.1.6",
"vue3-lottie": "^2.5.0",
"vuedraggable": "^4.1.0",
"web3-eth": "^1.8.2",
"web3-utils": "^1.8.2",
"web3-eth": "^1.9.0",
"web3-utils": "^1.9.0",
"zxcvbn": "^4.4.2"
},
"devDependencies": {
Expand All @@ -89,8 +89,8 @@
"@types/uuid": "^9.0.1",
"@types/wif": "^2.0.2",
"@types/zxcvbn": "^4.4.1",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-typescript": "~5.0.8",
Expand All @@ -99,24 +99,24 @@
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
"crypto-browserify": "^3.12.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^8.7.1",
"https-browserify": "^1.0.0",
"less": "^4.1.3",
"less-loader": "^11.1.0",
"mocha": "^10.2.0",
"path-browserify": "^1.0.1",
"prettier": "^2.8.4",
"rimraf": "^4.4.0",
"prettier": "^2.8.8",
"rimraf": "^4.4.1",
"rollup": "^2.79.1",
"rollup-plugin-uglify": "^6.0.4",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"systeminformation": "^5.17.12",
"ts-mocha": "^10.0.0",
"tsconfig-paths": "^4.1.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5",
"url": "^0.11.0",
"webextension-polyfill": "^0.10.0"
Expand Down
18 changes: 16 additions & 2 deletions packages/extension/src/providers/ethereum/methods/eth_accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let isAccountAccessPending = false;
import { throttle } from "lodash";

const throttledOpenOnboard = throttle(() => openOnboard(), 10000);

const existingErrors: Record<string, { time: number; error: any }> = {};
const pendingPromises: {
payload: ProviderRPCRequest;
res: CallbackFunction;
Expand Down Expand Up @@ -56,6 +56,14 @@ const method: MiddlewareFunction = async function (
return handleRemainingPromises();
}
const accountsState = new AccountState();
if (
existingErrors[_payload.options.domain] &&
existingErrors[_payload.options.domain].time >
new Date().getTime() - 2000
) {
_res(existingErrors[_payload.options.domain].error as any);
return handleRemainingPromises();
}
accountsState
.getApprovedAddresses(_payload.options.domain)
.then((accounts) => {
Expand All @@ -76,7 +84,13 @@ const method: MiddlewareFunction = async function (
})
)
.then(({ error, result }) => {
if (error) _res(error as any);
if (error) {
existingErrors[_payload.options!.domain] = {
time: new Date().getTime(),
error,
};
return _res(error as any);
}
const accounts = JSON.parse(result || "[]");
_res(
null,
Expand Down
3 changes: 2 additions & 1 deletion packages/extension/src/providers/ethereum/networks/bsc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NetworkNames } from "@enkryptcom/types";
import { CoingeckoPlatform, NetworkNames } from "@enkryptcom/types";
import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network";
import assetsInfoHandler from "@/providers/ethereum/libs/assets-handlers/assetinfo-mew";
import { EtherscanActivity } from "../libs/activity-handlers";
Expand All @@ -19,6 +19,7 @@ const bscOptions: EvmNetworkOptions = {
icon: require("./icons/bsc.svg"),
gradient: "#F0B90B",
coingeckoID: "binancecoin",
coingeckoPlatform: CoingeckoPlatform.Binance,
basePath: "m/44'/714'",
NFTHandler: shNFTHandler,
assetsInfoHandler,
Expand Down
3 changes: 2 additions & 1 deletion packages/extension/src/providers/ethereum/networks/zksync.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NetworkNames } from "@enkryptcom/types";
import { NetworkNames, CoingeckoPlatform } from "@enkryptcom/types";
import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network";
import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler";
import { EtherscanActivity } from "../libs/activity-handlers";
Expand All @@ -18,6 +18,7 @@ const zkSyncOptions: EvmNetworkOptions = {
icon: require("./icons/zksync.svg"),
gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)",
coingeckoID: "ethereum",
coingeckoPlatform: CoingeckoPlatform.Zksync,
assetsInfoHandler,
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 @@ -178,7 +178,11 @@ const toggleDepositWindow = () => {
showDepositWindow.value = !showDepositWindow.value;
};
const openBuyPage = () => {
Browser.tabs.create({ url: "https://ccswap.myetherwallet.com/" });
Browser.tabs.create({
url: `https://ccswap.myetherwallet.com/?to=${currentNetwork.value.displayAddress(
accountHeaderData.value.selectedAccount!.address
)}`,
});
};
const isKeyRingLocked = async (): Promise<boolean> => {
return await sendToBackgroundFromAction({
Expand Down
Loading

2 comments on commit 94b5d62

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