Skip to content

Commit

Permalink
Merge pull request #499 from enkryptcom/develop
Browse files Browse the repository at this point in the history
Release: v1.43.0
  • Loading branch information
kvhnuke authored Aug 21, 2024
2 parents a50537a + f333e24 commit 5314c88
Show file tree
Hide file tree
Showing 73 changed files with 2,689 additions and 1,575 deletions.
7 changes: 7 additions & 0 deletions .yarn/versions/81e941ed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
undecided:
- enkrypt
- "@enkryptcom/keyring"
- "@enkryptcom/name-resolution"
- "@enkryptcom/signer-ethereum"
- "@enkryptcom/signer-kadena"
- "@enkryptcom/storage"
10 changes: 5 additions & 5 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.2",
"version": "0.0.3",
"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 474911'",
"publish": "yarn workspaces foreach -pv --exclude @enkryptcom/extension exec 'yarn npm publish --access public --otp 312003'",
"version:apply": "yarn version apply --all",
"prepare": "husky"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@swc/core": "^1.6.3",
"@swc/core": "^1.7.6",
"concurrently": "^8.2.2",
"husky": "^9.0.11",
"husky": "^9.1.4",
"node-notifier": "^10.0.1",
"nodemon": "^3.1.3",
"nodemon": "^3.1.4",
"ultra-runner": "^3.10.5"
},
"resolutions": {
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 @@ -39,13 +39,13 @@
"webextension-polyfill": "^0.12.0"
},
"devDependencies": {
"@types/chai": "^4.3.16",
"@types/mocha": "^10.0.6",
"@types/node": "^20.14.6",
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.7",
"@types/node": "^20.14.14",
"@types/webextension-polyfill": "^0.10.7",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"bumpp": "^9.4.1",
"bumpp": "^9.4.2",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
Expand All @@ -55,8 +55,8 @@
"prettier": "^2.8.8",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.1.0",
"type-fest": "^4.20.1",
"tsup": "^8.2.4",
"type-fest": "^4.23.0",
"typescript": "^4.9.5",
"typescript-eslint": "0.0.1-alpha.0"
}
Expand Down
7 changes: 7 additions & 0 deletions packages/extension/configs/rollup.config.base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ import inject from "@rollup/plugin-inject";
import replace from "@rollup/plugin-replace";
import packageJson from "../package.json" assert { type: "json" };

/** @typedef {import('rollup').InputOptions} InputOptions */

const enableMinification = process.env.minify === "on";

/** @type {InputOptions} */
const base = {
input: [],
watch: {
exclude: /node_modules/,
},
output: {
dir: "dist/scripts",
format: "iife",
Expand Down
66 changes: 33 additions & 33 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enkryptcom/extension",
"version": "1.42.0",
"version": "1.43.0",
"private": true,
"scripts": {
"zip": "cd dist; zip -r release.zip *;",
Expand All @@ -21,8 +21,8 @@
"watch-vue-firefox": "cross-env BROWSER='firefox' vue-cli-service build --watch --no-clean"
},
"dependencies": {
"@amplitude/analytics-browser": "^2.9.0",
"@babel/runtime": "^7.24.7",
"@amplitude/analytics-browser": "^2.10.0",
"@babel/runtime": "^7.25.0",
"@enkryptcom/extension-bridge": "workspace:^",
"@enkryptcom/hw-wallets": "workspace:^",
"@enkryptcom/keyring": "workspace:^",
Expand All @@ -34,25 +34,25 @@
"@ethereumjs/common": "^4.3.0",
"@ethereumjs/tx": "^5.3.0",
"@ethereumjs/util": "^9.0.3",
"@kadena/client": "^1.12.0",
"@ledgerhq/hw-transport-webusb": "^6.29.0",
"@metamask/eth-sig-util": "^7.0.2",
"@kadena/client": "^1.13.0",
"@ledgerhq/hw-transport-webusb": "^6.29.2",
"@metamask/eth-sig-util": "^7.0.3",
"@rollup/plugin-replace": "^5.0.7",
"@types/chrome": "^0.0.268",
"@types/chrome": "^0.0.269",
"@types/events": "^3.0.3",
"@types/less": "^3.0.6",
"@types/lodash": "^4.17.5",
"@types/lodash": "^4.17.7",
"@types/utf-8-validate": "^5.0.2",
"@vueuse/core": "^10.11.0",
"add": "^2.0.6",
"bignumber.js": "^9.1.2",
"bip39": "^3.1.0",
"bitcoinjs-lib": "^6.1.6",
"chai": "^4.4.1",
"chai": "^4.5.0",
"concurrently": "^8.2.2",
"core-js": "^3.37.1",
"echarts": "^5.5.0",
"ethereum-cryptography": "^2.2.0",
"core-js": "^3.38.0",
"echarts": "^5.5.1",
"ethereum-cryptography": "^2.2.1",
"ethereumjs-abi": "^0.6.8",
"ethereumjs-wallet": "^1.0.2",
"eventemitter3": "^5.0.1",
Expand All @@ -61,14 +61,14 @@
"moment": "^2.30.1",
"nanoevents": "^9.0.0",
"pact-lang-api": "^4.3.6",
"pinia": "^2.1.7",
"pinia": "^2.2.0",
"qrcode.vue": "^3.4.1",
"switch-ts": "^1.1.1",
"url-parse": "^1.5.10",
"uuid": "^10.0.0",
"vue": "^3.4.29",
"vue-echarts": "6.7.3",
"vue-router": "4.3.3",
"vue": "^3.4.35",
"vue-echarts": "7.0.1",
"vue-router": "4.4.2",
"vue3-lottie": "^3.3.0",
"vuedraggable": "^4.1.0",
"web3-eth": "^1.10.4",
Expand All @@ -78,24 +78,24 @@
},
"devDependencies": {
"@babel/plugin-transform-class-static-block": "^7.24.7",
"@kadena/pactjs-cli": "^1.12.0",
"@polkadot/api": "^11.3.1",
"@polkadot/extension-inject": "^0.47.6",
"@polkadot/keyring": "^12.6.2",
"@polkadot/rpc-provider": "^11.3.1",
"@polkadot/types": "^11.3.1",
"@polkadot/types-known": "^11.3.1",
"@polkadot/ui-shared": "^3.6.6",
"@polkadot/util": "^12.6.2",
"@kadena/pactjs-cli": "^1.13.0",
"@polkadot/api": "^12.2.3",
"@polkadot/extension-inject": "^0.50.1",
"@polkadot/keyring": "^13.0.2",
"@polkadot/rpc-provider": "^12.2.3",
"@polkadot/types": "^12.2.3",
"@polkadot/types-known": "^12.2.3",
"@polkadot/ui-shared": "^3.8.3",
"@polkadot/util": "^13.0.2",
"@polkadot/wasm-crypto": "^7.3.2",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-inject": "^5.0.5",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@types/ethereumjs-abi": "^0.6.5",
"@types/mocha": "^10.0.6",
"@types/mocha": "^10.0.7",
"@types/url-parse": "^1.4.11",
"@types/uuid": "^9.0.8",
"@types/uuid": "^10.0.0",
"@types/wif": "^2.0.5",
"@types/zxcvbn": "^4.4.4",
"@typescript-eslint/eslint-plugin": "^5.62.0",
Expand All @@ -115,20 +115,20 @@
"https-browserify": "^1.0.0",
"less": "^4.2.0",
"less-loader": "^12.2.0",
"mocha": "^10.4.0",
"mocha": "^10.7.0",
"path-browserify": "^1.0.1",
"prettier": "^2.8.8",
"rimraf": "^5.0.7",
"rollup": "^4.18.0",
"rimraf": "^6.0.1",
"rollup": "^4.20.0",
"rollup-plugin-uglify": "^6.0.4",
"semver": "^7.6.2",
"semver": "^7.6.3",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"systeminformation": "^5.22.11",
"systeminformation": "^5.23.3",
"ts-mocha": "^10.0.0",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5",
"url": "^0.11.3",
"url": "^0.11.4",
"webextension-polyfill": "^0.12.0"
},
"installConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/src/libs/background/internal/unlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const unlock = (
const initNewAccounts = (message.params[1] as boolean) ?? false;
return keyring
.unlock(password)
.then(() => {
.then(async () => {
if (initNewAccounts) {
initAccounts(keyring);
await initAccounts(keyring);
}
return {
result: JSON.stringify(true),
Expand Down
26 changes: 26 additions & 0 deletions packages/extension/src/libs/dapp-list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,32 @@ const lists: Partial<Record<NetworkNames, string>> = {
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/btc.json",
[NetworkNames.Arthera]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/arthera.json",
[NetworkNames.Blast]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/blast.json",
[NetworkNames.ArbitrumNova]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/nova.json",
[NetworkNames.Forma]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/forma.json",
[NetworkNames.Godwoken]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/godwoken.json",
[NetworkNames.ImmutableZkevm]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/imx.json",
[NetworkNames.ZChains]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/zchains.json",
[NetworkNames.MantaPacific]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/manta.json",
[NetworkNames.Mode]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/mode.json",
[NetworkNames.OpBNB]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/opBNB.json",
[NetworkNames.Palm]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/palm.json",
[NetworkNames.ProofOfPlayApex]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/popApex.json",
[NetworkNames.Scroll]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/scroll.json",
[NetworkNames.Rari]:
"https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/rari.json",
};

export default lists;
2 changes: 1 addition & 1 deletion packages/extension/src/libs/market-data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MarketData {
const fiat = await this.getFiatValue(fiatSymbol);
if (market && fiat) {
return balanceBN
.multipliedBy(market.current_price)
.multipliedBy(market.current_price ?? 0)
.multipliedBy(fiat.exchange_rate)
.toFixed(2);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/libs/market-data/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface CoinGeckoTokenMarket {
symbol: string;
name: string;
image: string;
current_price: number;
current_price: null | number;
market_cap: number;
market_cap_rank: number;
high_24h: number;
Expand Down
13 changes: 13 additions & 0 deletions packages/extension/src/libs/nft-handlers/simplehash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,26 @@ export default async (
[NetworkNames.Optimism]: "optimism",
[NetworkNames.Binance]: "bsc",
[NetworkNames.Arbitrum]: "arbitrum",
[NetworkNames.ArbitrumNova]: "arbitrum-nova",
[NetworkNames.Gnosis]: "gnosis",
[NetworkNames.Avalanche]: "avalanche",
[NetworkNames.Matic]: "polygon",
[NetworkNames.MaticZK]: "polygon-zkevm",
[NetworkNames.ZkSync]: "zksync-era",
[NetworkNames.ZkSyncGoerli]: "zksync-era-testnet",
[NetworkNames.Base]: "base",
[NetworkNames.Blast]: "blast",
[NetworkNames.ImmutableZkevm]: "immutable-zkevm",
[NetworkNames.Rari]: "rari",
[NetworkNames.Forma]: "forma",
[NetworkNames.Godwoken]: "godwoken",
[NetworkNames.Linea]: "linea",
[NetworkNames.MantaPacific]: "manta",
[NetworkNames.Mode]: "mode",
[NetworkNames.OpBNB]: "opbnb",
[NetworkNames.Palm]: "palm",
[NetworkNames.ProofOfPlayApex]: "proof-of-play",
[NetworkNames.Scroll]: "scroll",
};
if (!Object.keys(supportedNetworks).includes(network.name))
throw new Error("Simplehash: network not supported");
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/src/libs/nft-handlers/types/simplehash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export interface SHNFTType {
};
external_url: string;
collection: {
name: string;
description: string;
name: null | string;
description: null | string;
image_url: string;
external_url: string;
collection_id: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class BitcoinNetwork extends BaseNetwork {
}
const userBalance = fromBase(balance, this.decimals);
const usdBalance = new BigNumber(userBalance).times(
marketData.length ? marketData[0]!.current_price : 0
marketData[0]?.current_price ?? 0
);
const nativeAsset: AssetsType = {
balance: balance,
Expand All @@ -135,10 +135,9 @@ export class BitcoinNetwork extends BaseNetwork {
icon: this.icon,
name: this.name_long,
symbol: this.currencyName,
value: marketData.length ? marketData[0]!.current_price.toString() : "0",
valuef: formatFiatValue(
marketData.length ? marketData[0]!.current_price.toString() : "0"
).value,
value: marketData[0]?.current_price?.toString() ?? "0",
valuef: formatFiatValue(marketData[0]?.current_price?.toString() ?? "0")
.value,
contract: "",
decimals: this.decimals,
sparkline: marketData.length
Expand Down
8 changes: 1 addition & 7 deletions packages/extension/src/providers/common/libs/new-features.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import { NetworkNames } from "@enkryptcom/types";

const newNetworks = [
NetworkNames.Telos,
NetworkNames.Blast,
NetworkNames.Sanko,
NetworkNames.Degen,
NetworkNames.Ham,
];
const newNetworks = [NetworkNames.MantaPacific];
const newSwaps: NetworkNames[] = [];

export { newNetworks, newSwaps };
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import OkcActivity from "./providers/okc";
import TomoScan from "./providers/tomoscan";
import OntEVMActivity from "./providers/ont-evm";
import TelosActivity from "./providers/telos";
import GodwokenActivity from "./providers/godwoken";
export {
RivetActivity,
EtherscanActivity,
OkcActivity,
OntEVMActivity,
TomoScan,
TelosActivity,
GodwokenActivity,
};
Loading

2 comments on commit 5314c88

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