@@ -12,11 +12,11 @@ import { AccountAvatar } from '../AccountAvatar'
1212import { AccountSizeBadge } from '../AccountSizeBadge'
1313import { ConsensusAccountLink } from './ConsensusAccountLink'
1414import { CopyToClipboard } from '../CopyToClipboard'
15- import { getPreciseNumberFormat } from '../../../locales/getPreciseNumberFormat'
1615import { Link as RouterLink } from 'react-router-dom'
1716import Link from '@mui/material/Link'
1817import { RouteUtils } from '../../utils/route-utils'
1918import { transactionsContainerId } from '../../utils/tabAnchors'
19+ import { RoundedBalance } from '../RoundedBalance'
2020
2121export const StyledListTitle = styled ( 'dt' ) ( ( { theme } ) => ( {
2222 marginLeft : theme . spacing ( 4 ) ,
@@ -71,37 +71,21 @@ export const ConsensusAccountDetailsView: FC<ConsensusAccountDetailsViewProps> =
7171 < CopyToClipboard value = { account . address } />
7272 </ div >
7373 </ dd >
74- < dt >
75- < strong > { t ( 'account.totalBalance' ) } </ strong >
76- </ dt >
74+ < dt > { t ( 'account.totalBalance' ) } </ dt >
7775 < dd >
78- < strong >
79- { t ( 'common.valueInToken' , {
80- ...getPreciseNumberFormat ( account . total ) ,
81- ticker : account . ticker ,
82- } ) }
83- </ strong >
76+ < RoundedBalance value = { account . total } ticker = { account . ticker } />
8477 </ dd >
8578 < StyledListTitle > { t ( 'account.available' ) } </ StyledListTitle >
8679 < dd >
87- { t ( 'common.valueInToken' , {
88- ...getPreciseNumberFormat ( account . available ) ,
89- ticker : account . ticker ,
90- } ) }
80+ < RoundedBalance value = { account . available } ticker = { account . ticker } />
9181 </ dd >
9282 < StyledListTitle > { t ( 'common.staked' ) } </ StyledListTitle >
9383 < dd >
94- { t ( 'common.valueInToken' , {
95- ...getPreciseNumberFormat ( account . delegations_balance ! ) ,
96- ticker : account . ticker ,
97- } ) }
84+ < RoundedBalance value = { account . delegations_balance } ticker = { account . ticker } />
9885 </ dd >
9986 < StyledListTitle > { t ( 'account.debonding' ) } </ StyledListTitle >
10087 < dd >
101- { t ( 'common.valueInToken' , {
102- ...getPreciseNumberFormat ( account . debonding_delegations_balance ! ) ,
103- ticker : account . ticker ,
104- } ) }
88+ < RoundedBalance value = { account . debonding_delegations_balance } ticker = { account . ticker } />
10589 </ dd >
10690 < dt > { t ( 'common.nonce' ) } </ dt >
10791 < dd > { account . nonce } </ dd >
0 commit comments