diff --git a/README.md b/README.md index 7177e6f73..ce4ea61ad 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ Enkrypt is a web3 wallet built from the ground up to support the multi-chain fut * Ethereum Classic * Polkadot * Kusama +* Edgeware * Acala * Karura * More coming soon! diff --git a/package.json b/package.json index d4cbdbb9f..1cf6393dc 100644 --- a/package.json +++ b/package.json @@ -23,11 +23,12 @@ "watch-ts": "nodemon --exec 'yarn run build:all && node scripts/compile-done.js'" }, "devDependencies": { - "@commitlint/cli": "^17.1.2", - "@commitlint/config-conventional": "^17.1.0", - "concurrently": "^7.4.0", + "@commitlint/cli": "^17.4.2", + "@commitlint/config-conventional": "^17.4.2", + "@swc/core": "^1.3.26", + "concurrently": "^7.6.0", "devmoji": "^2.3.0", - "husky": "^8.0.1", + "husky": "^8.0.3", "node-notifier": "^10.0.1", "nodemon": "^2.0.20", "ultra-runner": "^3.10.5" diff --git a/packages/extension-bridge/package.json b/packages/extension-bridge/package.json index 26da5b627..3937485d0 100644 --- a/packages/extension-bridge/package.json +++ b/packages/extension-bridge/package.json @@ -40,25 +40,25 @@ }, "devDependencies": { "@antfu/eslint-config": "^0.27.0", - "@types/chai": "^4.3.3", + "@types/chai": "^4.3.4", "@types/mocha": "^9.1.1", - "@types/node": "^18.7.18", - "@types/webextension-polyfill": "^0.9.1", - "@typescript-eslint/eslint-plugin": "^5.38.0", - "@typescript-eslint/parser": "^5.38.0", + "@types/node": "^18.11.18", + "@types/webextension-polyfill": "^0.10.0", + "@typescript-eslint/eslint-plugin": "^5.48.1", + "@typescript-eslint/parser": "^5.48.1", "bumpp": "^8.2.1", - "eslint": "^8.23.1", + "eslint": "^8.31.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-prettier": "^8.5.0", + "eslint-config-prettier": "^8.6.0", "eslint-import-resolver-alias": "^1.1.2", - "eslint-plugin-import": "^2.26.0", + "eslint-plugin-import": "^2.27.4", "eslint-plugin-module-resolver": "^1.5.0", - "prettier": "^2.7.1", + "prettier": "^2.8.2", "ts-node": "^10.9.1", - "tsconfig-paths": "^4.1.0", - "tsup": "^6.2.3", + "tsconfig-paths": "^4.1.2", + "tsup": "^6.5.0", "type-fest": "^2.19.0", - "typescript": "^4.8.3", + "typescript": "^4.9.4", "typescript-eslint": "0.0.1-alpha.0" } } diff --git a/packages/extension/package.json b/packages/extension/package.json index 27ac08fb2..273d96e0a 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -1,6 +1,6 @@ { "name": "@enkryptcom/extension", - "version": "1.9.0", + "version": "1.10.0", "private": true, "scripts": { "zip": "cd dist; zip -r release.zip *;", @@ -27,24 +27,24 @@ "@enkryptcom/storage": "^0.0.1", "@enkryptcom/types": "^0.0.1", "@enkryptcom/utils": "^0.0.1", - "@ethereumjs/common": "^3.0.0", - "@ethereumjs/tx": "^4.0.0", - "@ledgerhq/hw-transport-webusb": "^6.27.4", - "@metamask/eth-sig-util": "^5.0.0", - "@types/chrome": "^0.0.197", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/tx": "^4.0.2", + "@ledgerhq/hw-transport-webusb": "^6.27.9", + "@metamask/eth-sig-util": "^5.0.2", + "@types/chrome": "^0.0.208", "@types/events": "^3.0.0", "@types/less": "^3.0.3", - "@types/lodash": "^4.14.185", + "@types/lodash": "^4.14.191", "@types/utf-8-validate": "^5.0.0", - "@vueuse/core": "^9.2.0", + "@vueuse/core": "^9.10.0", "add": "^2.0.6", - "bignumber.js": "^9.1.0", + "bignumber.js": "^9.1.1", "bip39": "^3.0.4", - "bitcoinjs-lib": "^6.0.2", + "bitcoinjs-lib": "^6.1.0", "bitcoinjs-message": "^2.2.0", - "chai": "^4.3.6", - "concurrently": "^7.4.0", - "core-js": "^3.25.2", + "chai": "^4.3.7", + "concurrently": "^7.6.0", + "core-js": "^3.27.1", "ethereumjs-abi": "^0.6.8", "ethereumjs-util": "^7.1.5", "ethereumjs-wallet": "^1.0.2", @@ -53,28 +53,28 @@ "memoize-one": "^6.0.0", "moment": "^2.29.4", "nanoevents": "^7.0.1", - "pinia": "^2.0.22", + "pinia": "^2.0.28", "qrcode.vue": "^3.3.3", "url-parse": "^1.5.10", "uuid": "^9.0.0", - "vue": "^3.2.39", - "vue-router": "4.1.5", - "vue3-lottie": "^2.3.0", + "vue": "^3.2.45", + "vue-router": "4.1.6", + "vue3-lottie": "^2.4.0", "vuedraggable": "^4.1.0", - "web3-eth": "^1.8.0", - "web3-utils": "^1.8.0", + "web3-eth": "^1.8.1", + "web3-utils": "^1.8.1", "zxcvbn": "^4.4.2" }, "devDependencies": { - "@polkadot/api": "^9.4.1", - "@polkadot/extension-inject": "^0.44.6", - "@polkadot/keyring": "^10.1.8", - "@polkadot/rpc-provider": "^9.4.1", - "@polkadot/types": "^9.4.1", - "@polkadot/types-known": "^9.4.1", - "@polkadot/ui-shared": "^2.9.9", - "@polkadot/util": "^10.1.8", - "@polkadot/wasm-crypto": "^6.3.1", + "@polkadot/api": "^9.11.1", + "@polkadot/extension-inject": "^0.44.8", + "@polkadot/keyring": "^10.2.3", + "@polkadot/rpc-provider": "^9.11.1", + "@polkadot/types": "^9.11.1", + "@polkadot/types-known": "^9.11.1", + "@polkadot/ui-shared": "^2.9.15", + "@polkadot/util": "^10.2.3", + "@polkadot/wasm-crypto": "^6.4.1", "@rollup/plugin-commonjs": "^22.0.2", "@rollup/plugin-inject": "^4.0.4", "@rollup/plugin-json": "^4.1.0", @@ -83,38 +83,38 @@ "@types/ethereumjs-abi": "^0.6.3", "@types/mocha": "^9.1.1", "@types/url-parse": "^1.4.8", - "@types/uuid": "^8.3.4", + "@types/uuid": "^9.0.0", "@types/wif": "^2.0.2", "@types/zxcvbn": "^4.4.1", - "@typescript-eslint/eslint-plugin": "^5.38.0", - "@typescript-eslint/parser": "^5.38.0", + "@typescript-eslint/eslint-plugin": "^5.48.1", + "@typescript-eslint/parser": "^5.48.1", "@vue/cli-plugin-babel": "~5.0.8", "@vue/cli-plugin-eslint": "~5.0.8", "@vue/cli-plugin-typescript": "~5.0.8", "@vue/cli-service": "~5.0.8", - "@vue/eslint-config-typescript": "^11.0.1", + "@vue/eslint-config-typescript": "^11.0.2", "buffer": "^6.0.3", "cross-env": "^7.0.3", "crypto-browserify": "^3.12.0", - "eslint": "^8.23.1", - "eslint-config-prettier": "^8.5.0", + "eslint": "^8.31.0", + "eslint-config-prettier": "^8.6.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.0.0", - "mocha": "^10.0.0", + "less-loader": "^11.1.0", + "mocha": "^10.2.0", "path-browserify": "^1.0.1", - "prettier": "^2.7.1", + "prettier": "^2.8.2", "rimraf": "^3.0.2", - "rollup": "^2.79.0", + "rollup": "^2.79.1", "rollup-plugin-uglify": "^6.0.4", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", - "systeminformation": "^5.12.6", + "systeminformation": "^5.17.3", "ts-mocha": "^10.0.0", - "tsconfig-paths": "^4.1.0", - "typescript": "^4.8.3", + "tsconfig-paths": "^4.1.2", + "typescript": "^4.9.4", "url": "^0.11.0", "webextension-polyfill": "^0.10.0" }, diff --git a/packages/extension/public/vendor/trezor-usb-permissions.js b/packages/extension/public/vendor/trezor-usb-permissions.js index 48eb50697..c258c2d8d 100644 --- a/packages/extension/public/vendor/trezor-usb-permissions.js +++ b/packages/extension/public/vendor/trezor-usb-permissions.js @@ -1,4 +1,4 @@ -const VERSION = "9.0.1"; +const VERSION = "9.0.5"; const versionN = VERSION.split(".").map((s) => parseInt(s, 10)); // const DIRECTORY = `${ versionN[0] }${ (versionN[1] > 0 ? `.${versionN[1]}` : '') }/`; const DIRECTORY = `${versionN[0]}/`; diff --git a/packages/extension/src/libs/dapp-list/index.ts b/packages/extension/src/libs/dapp-list/index.ts index c45a3650e..96016dc4b 100644 --- a/packages/extension/src/libs/dapp-list/index.ts +++ b/packages/extension/src/libs/dapp-list/index.ts @@ -39,6 +39,8 @@ const lists: Partial> = { "https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/bifrost.json", [NetworkNames.BifrostKusama]: "https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/bifrost.json", + [NetworkNames.Edgeware]: + "https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/edg.json", }; export default lists; diff --git a/packages/extension/src/providers/ethereum/libs/transaction/index.ts b/packages/extension/src/providers/ethereum/libs/transaction/index.ts index 85e00de2b..ea53e8231 100644 --- a/packages/extension/src/providers/ethereum/libs/transaction/index.ts +++ b/packages/extension/src/providers/ethereum/libs/transaction/index.ts @@ -31,6 +31,7 @@ class Transaction { to: this.tx.to || undefined, from: this.tx.from, data: this.tx.data || "0x", + value: this.tx.value || "0x0", }); } async finalizeTransaction(options: TransactionOptions): Promise<{ diff --git a/packages/extension/src/providers/ethereum/methods/eth_signTypedData.ts b/packages/extension/src/providers/ethereum/methods/eth_signTypedData.ts index 3159b50c5..73afcfcc9 100644 --- a/packages/extension/src/providers/ethereum/methods/eth_signTypedData.ts +++ b/packages/extension/src/providers/ethereum/methods/eth_signTypedData.ts @@ -1,6 +1,7 @@ import { getCustomError } from "@/libs/error"; import { WindowPromise } from "@/libs/window-promise"; import { MiddlewareFunction } from "@enkryptcom/types"; +import { toBN } from "web3-utils"; import EthereumProvider from ".."; const method: MiddlewareFunction = function ( this: EthereumProvider, @@ -22,6 +23,23 @@ const method: MiddlewareFunction = function ( const version = supportedMethods[payload.method as string]; const typedData = version === "V1" ? payload.params[0] : payload.params[1]; const address = version === "V1" ? payload.params[1] : payload.params[0]; + const typedDataJSON = version !== "V1" ? JSON.parse(typedData) : typedData; + + if ( + typedDataJSON.domain && + typedDataJSON.domain.chainId && + !toBN(typedDataJSON.domain.chainId).eq(toBN(this.network.chainID)) + ) + return res( + getCustomError( + `eth_signTypedData: Provided chainId ${ + typedDataJSON.domain.chainId + } must match the active chainId ${toBN( + this.network.chainID + ).toString()}`, + -32603 + ) + ); this.KeyRing.getAccount(address.toLowerCase()).then((account) => { const windowPromise = new WindowPromise(); windowPromise @@ -29,7 +47,7 @@ const method: MiddlewareFunction = function ( this.getUIPath(this.UIRoutes.ethSignTypedData.path), JSON.stringify({ ...payload, - params: [typedData, account, version, this.network.name], + params: [typedDataJSON, account, version, this.network.name], }), true ) diff --git a/packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue b/packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue index 81c40a0f4..5dbfb475a 100644 --- a/packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue +++ b/packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue @@ -99,10 +99,7 @@ onMounted(async () => { const approve = async () => { const { Request, Resolve, sendToBackground } = await windowPromise; const version = Request.value.params![2] as SignTypedDataVersion; - const typedData = - version !== "V1" - ? JSON.parse(Request.value.params![0]) - : Request.value.params![0]; + const typedData = Request.value.params![0]; let msgHash; try { if (version === SignTypedDataVersion.V1) { diff --git a/packages/extension/src/providers/polkadot/libs/activity-handlers/providers/subscan/configs.ts b/packages/extension/src/providers/polkadot/libs/activity-handlers/providers/subscan/configs.ts index 17fb554bd..47e2a426a 100644 --- a/packages/extension/src/providers/polkadot/libs/activity-handlers/providers/subscan/configs.ts +++ b/packages/extension/src/providers/polkadot/libs/activity-handlers/providers/subscan/configs.ts @@ -10,6 +10,7 @@ const NetworkEndpoints = { [NetworkNames.Shiden]: "https://shiden.api.subscan.io/", [NetworkNames.Bifrost]: "https://bifrost.api.subscan.io/", [NetworkNames.BifrostKusama]: "https://bifrost-kusama.api.subscan.io/", + [NetworkNames.Edgeware]: "https://edgeware.api.subscan.io/", }; export { NetworkEndpoints }; diff --git a/packages/extension/src/providers/polkadot/libs/provider.ts b/packages/extension/src/providers/polkadot/libs/provider.ts index 00c6865d3..5b712463d 100644 --- a/packages/extension/src/providers/polkadot/libs/provider.ts +++ b/packages/extension/src/providers/polkadot/libs/provider.ts @@ -4,6 +4,7 @@ import type { ProviderMeta, } from "@polkadot/extension-inject/types"; import type { + ProviderInterface, ProviderInterfaceEmitCb, ProviderInterfaceEmitted, } from "@polkadot/rpc-provider/types"; @@ -23,17 +24,17 @@ export default class PostMessageProvider implements InjectedProvider { eventEmitter: EventEmitter; sendMessageHandler: InjectedSendMessageHandler; options: InjectLibOptions; + isClonable: boolean; + constructor(options: InjectLibOptions) { this.eventEmitter = new EventEmitter(); this.sendMessageHandler = options.sendMessageHandler; this.options = options; + this.isClonable = true; } - - public clone(): PostMessageProvider { - console.error("PostMessageProvider.clone() is not implemented."); + public clone(): ProviderInterface { return new PostMessageProvider(this.options); } - public async connect(): Promise { console.error("PostMessageProvider.connect() is not implemented."); } diff --git a/packages/extension/src/providers/polkadot/networks/edgeware.ts b/packages/extension/src/providers/polkadot/networks/edgeware.ts new file mode 100644 index 000000000..e29b37c3e --- /dev/null +++ b/packages/extension/src/providers/polkadot/networks/edgeware.ts @@ -0,0 +1,34 @@ +import { CoingeckoPlatform, NetworkNames } from "@enkryptcom/types"; +import { toBN } from "web3-utils"; +import { subscanActivity } from "../libs/activity-handlers"; +import { + SubstrateNetwork, + SubstrateNetworkOptions, +} from "../types/substrate-network"; +import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler"; + +const ksmOptions: SubstrateNetworkOptions = { + name: NetworkNames.Edgeware, + name_long: "Edgeware", + homePage: "https://www.edgeware.io/", + blockExplorerTX: "https://edgeware.subscan.io/extrinsic/[[txHash]]", + blockExplorerAddr: "https://edgeware.subscan.io/account/[[address]]", + isTestNetwork: false, + currencyName: "EDG", + currencyNameLong: "Edge", + icon: require("./icons/edgeware.svg"), + decimals: 18, + prefix: 7, + gradient: "#000000", + node: "wss://edgeware.jelliedowl.net", + coingeckoID: "edgeware", + coingeckoPlatform: CoingeckoPlatform.Edgeware, + genesisHash: + "0x742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b", + activityHandler: wrapActivityHandler(subscanActivity), + existentialDeposit: toBN("10000000000000"), +}; + +const ksm = new SubstrateNetwork(ksmOptions); + +export default ksm; diff --git a/packages/extension/src/providers/polkadot/networks/icons/edgeware.svg b/packages/extension/src/providers/polkadot/networks/icons/edgeware.svg new file mode 100644 index 000000000..6e190f19a --- /dev/null +++ b/packages/extension/src/providers/polkadot/networks/icons/edgeware.svg @@ -0,0 +1,13 @@ + + + Brand/Outline/LogoMark@2x + + + + + + + + + + \ No newline at end of file diff --git a/packages/extension/src/providers/polkadot/networks/index.ts b/packages/extension/src/providers/polkadot/networks/index.ts index d05d7e7ba..198c52aa7 100644 --- a/packages/extension/src/providers/polkadot/networks/index.ts +++ b/packages/extension/src/providers/polkadot/networks/index.ts @@ -7,6 +7,7 @@ import astrNode from "./astar/astar"; import sdnNode from "./astar/shiden"; import bncNode from "./bifrost/polkadot"; import bncKusamaNode from "./bifrost/kusama"; +import edgNode from "./edgeware"; export default { acala: acaNode, @@ -18,4 +19,5 @@ export default { shiden: sdnNode, bifrost: bncNode, bifrostKusama: bncKusamaNode, + edgeware: edgNode, }; diff --git a/packages/extension/src/providers/swap/assets/bnb.webp b/packages/extension/src/providers/swap/assets/bnb.webp new file mode 100644 index 000000000..0e4ada7ef Binary files /dev/null and b/packages/extension/src/providers/swap/assets/bnb.webp differ diff --git a/packages/extension/src/providers/swap/types/ChangellySwapProvider.ts b/packages/extension/src/providers/swap/types/ChangellySwapProvider.ts index a1ab8eb81..53f99f618 100644 --- a/packages/extension/src/providers/swap/types/ChangellySwapProvider.ts +++ b/packages/extension/src/providers/swap/types/ChangellySwapProvider.ts @@ -60,6 +60,11 @@ const CHANGELLY_TOKEN_INFO = [ icon: require("../assets/bitcoin.svg"), coingeckoID: "bitcoin", }, + { + id: "bnbbsc", + icon: require("../assets/bnb.webp"), + coingeckoID: "binancecoin", + }, ]; interface ChangellyTokenInfo { @@ -133,6 +138,7 @@ export class ChangellySwapProvider extends SwapProvider { "MATIC", "MATICPOLYGON", "BTC", + "BNBBSC", ]; constructor() { super(); @@ -266,6 +272,8 @@ export class ChangellySwapProvider extends SwapProvider { } else if (tokenData.name === "maticpolygon") { name = "Polygon Mainnet"; symbol = "MATIC"; + } else if (tokenData.name === "bnbbsc") { + symbol = "BNB"; } const tokenOptions: ChangellyTokenOptions = { @@ -738,7 +746,6 @@ export class ChangellySwapProvider extends SwapProvider { }).then((signedTx) => { return new Promise((resolve) => { const onHash = (hash: string) => { - console.log(hash); activityState.addActivities( [ { diff --git a/packages/extension/src/ui/action/components/network-menu/index.vue b/packages/extension/src/ui/action/components/network-menu/index.vue index 5e295a401..9f5b72c4d 100644 --- a/packages/extension/src/ui/action/components/network-menu/index.vue +++ b/packages/extension/src/ui/action/components/network-menu/index.vue @@ -55,7 +55,7 @@ defineProps({ @import "~@action/styles/theme.less"; .network-menu { - position: fixed; + position: absolute; width: 460px; height: 56px; left: 340px; diff --git a/packages/extension/src/ui/action/icons/send/send-spinner-animation.vue b/packages/extension/src/ui/action/icons/send/send-spinner-animation.vue index 16bd00c55..82de2ed41 100644 --- a/packages/extension/src/ui/action/icons/send/send-spinner-animation.vue +++ b/packages/extension/src/ui/action/icons/send/send-spinner-animation.vue @@ -13,7 +13,7 @@ id="back" rx="5" ry="5" - stroke="#34c759" + stroke="#05C0A5" fill="none" stroke-width="2" stroke-linejoin="round" @@ -24,7 +24,7 @@ id="spin" rx="5" ry="5" - stroke="#34c759" + stroke="#05C0A5" fill="none" stroke-width="2" stroke-linejoin="round" diff --git a/packages/extension/src/ui/action/styles/color.less b/packages/extension/src/ui/action/styles/color.less index 1b92a0bb2..56d9cbedf 100644 --- a/packages/extension/src/ui/action/styles/color.less +++ b/packages/extension/src/ui/action/styles/color.less @@ -15,7 +15,7 @@ @error: #F4432C; @error01: rgba(244, 67, 44, 0.05); @elevation: rgba(0, 0, 0, 0.87); -@success: #34C759; +@success: #05C0A5; @darkBg: #DADCE0; @primaryBg: #FFFFFF; diff --git a/packages/extension/src/ui/action/views/add-network/components/add-network-search.vue b/packages/extension/src/ui/action/views/add-network/components/add-network-search.vue index 4f39f3fa4..ca102412a 100644 --- a/packages/extension/src/ui/action/views/add-network/components/add-network-search.vue +++ b/packages/extension/src/ui/action/views/add-network/components/add-network-search.vue @@ -3,24 +3,26 @@
-
- - - -
-
- + +
+ +
+ Show testnets + +
@@ -30,7 +32,6 @@ import { ref } from "vue"; import BaseSearch from "@action/components/base-search/index.vue"; import SliderIcon from "@action/icons/common/slider-icon.vue"; -import CustomNetworkIcon from "@action/icons/common/custom-network-icon.vue"; import TestNetworkIcon from "@action/icons/common/test-network-icon.vue"; import Switch from "@action/components/switch/index.vue"; import { onClickOutside } from "@vueuse/core"; @@ -51,7 +52,16 @@ defineEmits<{ }>(); const action = () => { - openList.value = !openList.value; + switch (openList.value) { + case false: + openList.value = true; + break; + case true: + openList.value = false; + break; + default: + console.error("No status for openList"); + } }; onClickOutside(tooltip, () => { diff --git a/packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue b/packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue index 550428bd6..22f1d9f81 100644 --- a/packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue +++ b/packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue @@ -158,8 +158,8 @@ const toggleDetail = () => { text-overflow: ellipsis; span { - font-variant: small-caps; margin-left: 4px; + text-transform: uppercase; } } diff --git a/packages/extension/src/ui/action/views/network-assets/components/network-assets-loading.vue b/packages/extension/src/ui/action/views/network-assets/components/network-assets-loading.vue index c229cee9c..f751a8984 100644 --- a/packages/extension/src/ui/action/views/network-assets/components/network-assets-loading.vue +++ b/packages/extension/src/ui/action/views/network-assets/components/network-assets-loading.vue @@ -14,19 +14,20 @@ import Loader from "@action/icons/common/loader.vue"; .network-assets { &__loading { width: 100%; - height: calc(~"100% - 216px"); + height: calc(100% - 150px); display: flex; justify-content: center; align-items: center; flex-direction: column; - padding-bottom: 56px; box-sizing: border-box; + position: absolute; + top: 150px; p { font-style: normal; font-weight: 400; font-size: 14px; - line-height: 20px; + line-height: 0.6; letter-spacing: 0.25px; color: @tertiaryLabel; margin: 0; diff --git a/packages/extension/src/ui/action/views/network-assets/index.vue b/packages/extension/src/ui/action/views/network-assets/index.vue index 69584311e..3dde50ec4 100644 --- a/packages/extension/src/ui/action/views/network-assets/index.vue +++ b/packages/extension/src/ui/action/views/network-assets/index.vue @@ -168,6 +168,7 @@ const addCustomAsset = (asset: AssetsType) => { position: relative; margin: auto; width: 100%; + height: 100%; max-height: 600px; margin: 0; padding: 68px 0 68px 0 !important; diff --git a/packages/extension/src/ui/action/views/network-nfts/components/network-nfts-item.vue b/packages/extension/src/ui/action/views/network-nfts/components/network-nfts-item.vue index b34b793f5..f333168ce 100644 --- a/packages/extension/src/ui/action/views/network-nfts/components/network-nfts-item.vue +++ b/packages/extension/src/ui/action/views/network-nfts/components/network-nfts-item.vue @@ -2,7 +2,11 @@
-
{{ item.name }}
+
+
+ {{ item.name }} +
+
@@ -151,7 +155,6 @@ onClickOutside( rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100% ); - padding: 4px 8px; font-style: normal; font-weight: 500; font-size: 14px; @@ -169,7 +172,10 @@ onClickOutside( -ms-line-clamp: 2; -webkit-line-clamp: 2; line-clamp: 2; - word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; text-overflow: ellipsis; } @@ -206,7 +212,7 @@ onClickOutside( &:nth-child(3n - 2) { .network-nfts__item-more-menu { left: 85px; - right: auto; + right: none; } } @@ -218,4 +224,22 @@ onClickOutside( } } } +.network-nfts__item-name-inner { + margin: 4px 8px; + overflow: hidden; + max-height: 48px; + height: 100%; + -ms-line-clamp: 2; + -webkit-line-clamp: 2; + line-clamp: 2; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} diff --git a/packages/extension/src/ui/action/views/swap/components/send-address-item.vue b/packages/extension/src/ui/action/views/swap/components/send-address-item.vue index bd4797b73..e63dd75c4 100644 --- a/packages/extension/src/ui/action/views/swap/components/send-address-item.vue +++ b/packages/extension/src/ui/action/views/swap/components/send-address-item.vue @@ -4,14 +4,16 @@ @click="emit('selected:account', account.address)" >
- +

{{ account.name }}

{{ $filters.replaceWithEllipsis( - network.displayAddress(account.address), + network.displayAddress + ? network.displayAddress(account.address) + : "", 4, 4 ) diff --git a/packages/extension/src/ui/onboard/hardware-wallet/components/hardware-importing-account.vue b/packages/extension/src/ui/onboard/hardware-wallet/components/hardware-importing-account.vue index 6227029cb..471e86fd3 100644 --- a/packages/extension/src/ui/onboard/hardware-wallet/components/hardware-importing-account.vue +++ b/packages/extension/src/ui/onboard/hardware-wallet/components/hardware-importing-account.vue @@ -4,16 +4,20 @@

- +
diff --git a/packages/extension/src/ui/onboard/hardware-wallet/views/importing-account.vue b/packages/extension/src/ui/onboard/hardware-wallet/views/importing-account.vue index 7db976161..8bcf41d3d 100644 --- a/packages/extension/src/ui/onboard/hardware-wallet/views/importing-account.vue +++ b/packages/extension/src/ui/onboard/hardware-wallet/views/importing-account.vue @@ -45,7 +45,7 @@