Skip to content

Commit

Permalink
format block height with commas
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamkmr04 committed Dec 13, 2024
1 parent 8e953d6 commit 4274e04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion views/NodeInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Screen from '../components/Screen';
import { version } from '../package.json';
import { localeString } from '../utils/LocaleUtils';
import { themeColor } from '../utils/ThemeUtils';
import { numberWithCommas } from '../utils/UnitsUtils';

import NodeInfoStore from '../stores/NodeInfoStore';
import SettingsStore from '../stores/SettingsStore';
Expand Down Expand Up @@ -125,7 +126,7 @@ export default class NodeInfo extends React.Component<NodeInfoProps, {}> {
{nodeInfo.currentBlockHeight && (
<KeyValue
keyValue={localeString('views.NodeInfo.blockHeight')}
value={nodeInfo.currentBlockHeight}
value={numberWithCommas(nodeInfo.currentBlockHeight)}
/>
)}

Expand Down
7 changes: 4 additions & 3 deletions views/Sync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import SyncStore from '../stores/SyncStore';

import { localeString } from '../utils/LocaleUtils';
import { themeColor } from '../utils/ThemeUtils';
import { numberWithCommas } from '../utils/UnitsUtils';

interface SyncProps {
navigation: StackNavigationProp<any, any>;
Expand Down Expand Up @@ -90,21 +91,21 @@ export default class Sync extends React.PureComponent<SyncProps, {}> {
keyValue={localeString(
'views.Sync.currentBlockHeight'
)}
value={currentBlockHeight}
value={numberWithCommas(currentBlockHeight)}
/>
)}
{bestBlockHeight && (
<KeyValue
keyValue={localeString('views.Sync.tip')}
value={bestBlockHeight}
value={numberWithCommas(bestBlockHeight)}
/>
)}
{!!numBlocksUntilSynced && (
<KeyValue
keyValue={localeString(
'views.Sync.numBlocksUntilSynced'
)}
value={numBlocksUntilSynced}
value={numberWithCommas(numBlocksUntilSynced)}
/>
)}
</View>
Expand Down

0 comments on commit 4274e04

Please sign in to comment.