From 56668320896fff601796d5de783b82509f62b1fd Mon Sep 17 00:00:00 2001 From: ost-ptk Date: Tue, 9 Jun 2026 16:39:56 +0300 Subject: [PATCH 1/2] feat(tokens): show CEP-18 contract package hash in list tooltip and details Display the CEP-18 contract package hash so users can distinguish tokens that share the same name: - Token details: new "Contract package hash" row under Decimals (truncated, copy on click, full value in tooltip); not shown for CSPR. - Token list: the name tooltip now always shows name + truncated hash for CEP-18 tokens; CSPR keeps the previous long-name-only behavior. WALLET-1309 Co-Authored-By: Claude Opus 4.8 --- src/apps/popup/pages/token-details/token.tsx | 20 ++++++++++++++++- .../ui/components/token-plate/token-plate.tsx | 22 +++++++++++++------ 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/apps/popup/pages/token-details/token.tsx b/src/apps/popup/pages/token-details/token.tsx index 65c3899e4..907311541 100644 --- a/src/apps/popup/pages/token-details/token.tsx +++ b/src/apps/popup/pages/token-details/token.tsx @@ -25,6 +25,8 @@ import { import { useFetchCep18Tokens } from '@libs/services/cep18-service'; import { Button, + Hash, + HashVariant, List, SvgIcon, TokenPlate, @@ -94,10 +96,26 @@ export const Token = () => { return [ { id: 1, name: 'Symbol', value: token?.symbol ?? '' }, { id: 2, name: 'Decimals', value: (token?.decimals || 0).toString() }, - ...(Boolean(Number(token?.tokenPrice)) && token + ...(token?.contractPackageHash ? [ { id: 3, + name: 'Contract package hash', + value: ( + + ) + } + ] + : []), + ...(Boolean(Number(token?.tokenPrice)) && token + ? [ + { + id: 4, name: 'Market Price', value: } diff --git a/src/libs/ui/components/token-plate/token-plate.tsx b/src/libs/ui/components/token-plate/token-plate.tsx index 54fc85087..5d34ef67c 100644 --- a/src/libs/ui/components/token-plate/token-plate.tsx +++ b/src/libs/ui/components/token-plate/token-plate.tsx @@ -11,6 +11,7 @@ import { getSpacingSize } from '@libs/layout'; import { SvgIcon, Tooltip, Typography } from '@libs/ui/components'; +import { truncateKey } from '@libs/ui/components/hash/utils'; const TokenAmountContainer = styled(FlexColumn)` max-width: 300px; @@ -52,6 +53,19 @@ export const TokenPlate = ({ const tokenIconFormat = token?.icon?.split('.').pop()?.toLowerCase(); const isTokenIconSvg = tokenIconFormat === 'svg'; + const nameTooltipTitle = token?.contractPackageHash ? ( + + + {token.name} + + + {truncateKey(token.contractPackageHash, { size: 'base' })} + + + ) : token?.name && token.name.length > 10 ? ( + token.name + ) : undefined; + return ( - 10 ? token.name : undefined - } - fullWidth - overflowWrap - > + {token?.name} From 3993c47ec2702d3a246de056a393cea186ab1d9a Mon Sep 17 00:00:00 2001 From: ost-ptk Date: Tue, 9 Jun 2026 16:44:08 +0300 Subject: [PATCH 2/2] chore(deps): update `casper-wallet-core` URL and add new transitive dependencies Switched `casper-wallet-core` to SSH-based Git URL, and added several new `addons-linter` dependencies (`node-fetch`, `tr46`, `webidl-conversions`, `whatwg-url`). Adjusted `package-lock.json` accordingly. --- package-lock.json | 52 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 24bcb8347..ae5cb20c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "base64-loader": "1.0.0", "big.js": "^6.2.1", "casper-js-sdk": "5.0.10", - "casper-wallet-core": "https://github.com/make-software/casper-wallet-core.git#0fb57d84b85ca2812ca8845a24a7c5552603e9bb", + "casper-wallet-core": "git+ssh://git@github.com:make-software/casper-wallet-core.git#0fb57d84b85ca2812ca8845a24a7c5552603e9bb", "date-fns": "^2.30.0", "dotenv-webpack": "^8.1.0", "i18next": "^23.11.0", @@ -9352,6 +9352,28 @@ "dev": true, "license": "MIT" }, + "node_modules/addons-linter/node_modules/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/addons-linter/node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -9399,6 +9421,34 @@ "node": ">=8" } }, + "node_modules/addons-linter/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/addons-linter/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/addons-linter/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/addons-moz-compare": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/addons-moz-compare/-/addons-moz-compare-1.3.0.tgz",