Skip to content

Commit

Permalink
Merge pull request #344 from enkryptcom/develop
Browse files Browse the repository at this point in the history
Release: v1.26.0
  • Loading branch information
kvhnuke authored Sep 5, 2023
2 parents dbf55c6 + 400ab22 commit 78b8593
Show file tree
Hide file tree
Showing 49 changed files with 2,706 additions and 3,844 deletions.
783 changes: 0 additions & 783 deletions .yarn/releases/yarn-3.2.2.cjs

This file was deleted.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"

yarnPath: .yarn/releases/yarn-3.2.2.cjs
yarnPath: .yarn/releases/yarn-3.6.3.cjs
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enkrypt",
"packageManager": "yarn@3.2.2",
"packageManager": "yarn@3.6.3",
"version": "0.0.2",
"private": true,
"workspaces": [
Expand Down Expand Up @@ -29,9 +29,9 @@
"version:apply": "yarn version apply --all"
},
"devDependencies": {
"@commitlint/cli": "^17.7.0",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@swc/core": "^1.3.75",
"@swc/core": "^1.3.80",
"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.1",
"serialize-error": "11.0.2",
"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.9",
"@types/webextension-polyfill": "^0.10.1",
"@types/node": "^20.5.7",
"@types/webextension-polyfill": "^0.10.2",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"bumpp": "^8.2.1",
"eslint": "^8.46.0",
"eslint": "^8.48.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.28.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^2.8.8",
"ts-node": "^10.9.1",
Expand Down
30 changes: 15 additions & 15 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enkryptcom/extension",
"version": "1.25.0",
"version": "1.26.0",
"private": true,
"scripts": {
"zip": "cd dist; zip -r release.zip *;",
Expand Down Expand Up @@ -29,22 +29,22 @@
"@enkryptcom/utils": "workspace:^",
"@ethereumjs/common": "^3.2.0",
"@ethereumjs/tx": "^4.2.0",
"@ledgerhq/hw-transport-webusb": "^6.27.18",
"@ledgerhq/hw-transport-webusb": "^6.27.19",
"@metamask/eth-sig-util": "^6.0.0",
"@types/chrome": "^0.0.241",
"@types/chrome": "^0.0.244",
"@types/events": "^3.0.0",
"@types/less": "^3.0.3",
"@types/lodash": "^4.14.196",
"@types/lodash": "^4.14.197",
"@types/utf-8-validate": "^5.0.0",
"@vueuse/core": "^9.13.0",
"add": "^2.0.6",
"bignumber.js": "^9.1.1",
"bignumber.js": "^9.1.2",
"bip39": "^3.1.0",
"bitcoinjs-lib": "^6.1.3",
"bitcoinjs-message": "^2.2.0",
"chai": "^4.3.7",
"chai": "^4.3.8",
"concurrently": "^7.6.0",
"core-js": "^3.32.0",
"core-js": "^3.32.1",
"echarts": "^5.4.3",
"ethereumjs-abi": "^0.6.8",
"ethereumjs-util": "^7.1.5",
Expand All @@ -64,21 +64,21 @@
"vue-router": "4.2.4",
"vue3-lottie": "^2.7.4",
"vuedraggable": "^4.1.0",
"web3-eth": "^1.10.0",
"web3-utils": "^1.10.0",
"web3-eth": "^1.10.2",
"web3-utils": "^1.10.2",
"yarn": "^1.22.19",
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"@polkadot/api": "^10.9.1",
"@polkadot/extension-inject": "^0.46.5",
"@polkadot/keyring": "^12.3.2",
"@polkadot/keyring": "^12.4.2",
"@polkadot/rpc-provider": "^10.9.1",
"@polkadot/types": "^10.9.1",
"@polkadot/types-known": "^10.9.1",
"@polkadot/ui-shared": "^3.5.1",
"@polkadot/util": "^12.3.2",
"@polkadot/wasm-crypto": "^7.2.1",
"@polkadot/ui-shared": "^3.6.2",
"@polkadot/util": "^12.4.2",
"@polkadot/wasm-crypto": "^7.2.2",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-inject": "^4.0.4",
"@rollup/plugin-json": "^4.1.0",
Expand All @@ -100,7 +100,7 @@
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
"crypto-browserify": "^3.12.0",
"eslint": "^8.46.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^8.7.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.14",
"systeminformation": "^5.21.1",
"ts-mocha": "^10.0.0",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5",
Expand Down
17 changes: 15 additions & 2 deletions packages/extension/src/libs/cache-fetch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,25 @@ const cacheFetch = async (
} else if (!storagetimestamp) {
await storage.set(TIMESTAMP, { [TIMESTAMP]: new Date().getTime() });
}
const hash = keccak256(options.url);
const hash = keccak256(JSON.stringify(options));
const cached: StoredData = await storage.get(hash);

if (cached && cached.timestamp + ttl > new Date().getTime()) {
return JSON.parse(cached.data);
} else {
return fetch(options.url)
const fetchOptions: {
method?: string;
headers?: Record<string, any>;
body?: string;
} = {};
if (options.post) {
fetchOptions.method = "POST";
fetchOptions.body = JSON.stringify(options.post);
}
if (options.headers) {
fetchOptions.headers = options.headers;
}
return fetch(options.url, fetchOptions)
.then((res) => res.json())
.then((json) => {
const jsonstring = JSON.stringify(json);
Expand Down
1 change: 1 addition & 0 deletions packages/extension/src/libs/cache-fetch/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface RequestOptions {
url: string;
post?: Record<string, any>;
headers?: Record<string, any>;
}
export interface StoredData {
timestamp: number;
Expand Down
16 changes: 10 additions & 6 deletions packages/extension/src/libs/market-data/ethvm.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import cacheFetch from "../cache-fetch";
import {
CoinGeckoToken,
CoinGeckoTokenMarket,
Expand All @@ -20,13 +21,16 @@ interface getCoinGeckoTokenInfoAllType {
const ETHVM_BASE = `https://api-v2.ethvm.dev/`;

const ethvmPost = (requestData: string): Promise<any> => {
return fetch(ETHVM_BASE, {
method: "POST",
headers: {
"Content-Type": "application/json",
return cacheFetch(
{
url: ETHVM_BASE,
post: JSON.parse(requestData),
headers: {
"Content-Type": "application/json",
},
},
body: requestData,
}).then((res) => res.json());
10 * 60 * 1000
);
};

export const getAllPlatformData = (): Promise<CoinGeckoToken[]> => {
Expand Down
117 changes: 0 additions & 117 deletions packages/extension/src/libs/nft-handlers/rarible.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/extension/src/libs/nft-handlers/simplehash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default async (
[NetworkNames.Arbitrum]: "arbitrum",
[NetworkNames.Gnosis]: "gnosis",
[NetworkNames.Avalanche]: "avalanche",
[NetworkNames.Matic]: "polygon",
[NetworkNames.MaticZK]: "polygon-zkevm",
[NetworkNames.ZkSync]: "zksync-era",
[NetworkNames.ZkSyncGoerli]: "zksync-era-testnet",
Expand Down
36 changes: 0 additions & 36 deletions packages/extension/src/libs/nft-handlers/types/rarible.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const NetworkEndpoints: Record<string, string> = {
[NetworkNames.Fantom]: "https://api.ftmscan.com/",
[NetworkNames.Aurora]: "https://explorer.mainnet.aurora.dev/",
[NetworkNames.PuppyNet]: "https://puppyscan.shib.io/",
[NetworkNames.Shibarium]: "https://www.shibariumscan.io/",
[NetworkNames.MaticZK]: "https://api-zkevm.polygonscan.com/",
[NetworkNames.Base]: "https://api.basescan.org/",
[NetworkNames.Celo]: "https://explorer.celo.org/mainnet/",
Expand Down
2 changes: 2 additions & 0 deletions packages/extension/src/providers/ethereum/networks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import puppyNode from "./puppy";
import sepoliaNode from "./sepolia";
import baseNode from "./base";
import celoNode from "./celo";
import shibNode from "./shib";

export default {
goerli: goerliNode,
Expand Down Expand Up @@ -71,4 +72,5 @@ export default {
puppy: puppyNode,
base: baseNode,
celo: celoNode,
shib: shibNode,
};
Loading

2 comments on commit 78b8593

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