diff --git a/public/images/tokens/ckb_token.svg b/public/images/tokens/ckb_token.svg new file mode 100644 index 000000000..27302bd6f --- /dev/null +++ b/public/images/tokens/ckb_token.svg @@ -0,0 +1,9 @@ + + + diff --git a/src/locales/en.json b/src/locales/en.json index 5aaf030a7..9783c2a73 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1105,7 +1105,7 @@ "id": "Node ID", "name": "Name", "alias": "Alias", - "auto_accept_min_ckb_funding_amount": "Auto-accepting Threshold", + "auto_accept_funding_amount": "Auto-accepting Threshold", "first_seen": "First Seen", "node_id": "Node ID", "chain_hash": "Chain Hash", diff --git a/src/pages/Fiber/GraphNode/index.module.scss b/src/pages/Fiber/GraphNode/index.module.scss index ace74b7cd..600744360 100644 --- a/src/pages/Fiber/GraphNode/index.module.scss +++ b/src/pages/Fiber/GraphNode/index.module.scss @@ -94,6 +94,24 @@ } } + .thresholds { + dt { + align-items: start; + } + + dd { + margin-left: 8px; + display: flex; + flex-direction: column; + + .token { + display: flex; + gap: 8px; + align-items: center; + } + } + } + .activities { display: flex; gap: 16px; diff --git a/src/pages/Fiber/GraphNode/index.tsx b/src/pages/Fiber/GraphNode/index.tsx index ecad750b2..7e4484ad9 100644 --- a/src/pages/Fiber/GraphNode/index.tsx +++ b/src/pages/Fiber/GraphNode/index.tsx @@ -11,10 +11,8 @@ import { explorerService } from '../../../services/ExplorerService' import { useSetToast } from '../../../components/Toast' import styles from './index.module.scss' import Loading from '../../../components/Loading' -import { shannonToCkb } from '../../../utils/util' -import { parseNumericAbbr } from '../../../utils/chart' -import { localeNumberString } from '../../../utils/number' import GraphChannelList from '../../../components/GraphChannelList' +import { getFundingThreshold } from '../utils' const TIME_TEMPLATE = 'YYYY/MM/DD hh:mm:ss' @@ -82,8 +80,9 @@ const GraphNode = () => { } const channels = node.fiberGraphChannels - const ckb = shannonToCkb(node.autoAcceptMinCkbFundingAmount) - const amount = parseNumericAbbr(ckb) + // const ckb = shannonToCkb(node.autoAcceptMinCkbFundingAmount) + // const amount = parseNumericAbbr(ckb) + const thresholds = getFundingThreshold(node) const handleCopy = (e: React.SyntheticEvent) => { const elm = e.target @@ -150,12 +149,19 @@ const GraphNode = () => {