From 4274e045406e90d29e998304d31e5b0f70598984 Mon Sep 17 00:00:00 2001 From: shubham Date: Fri, 13 Dec 2024 15:15:03 +0530 Subject: [PATCH] format block height with commas --- views/NodeInfo.tsx | 3 ++- views/Sync.tsx | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/views/NodeInfo.tsx b/views/NodeInfo.tsx index 3573b6d3e..841403dbf 100644 --- a/views/NodeInfo.tsx +++ b/views/NodeInfo.tsx @@ -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'; @@ -125,7 +126,7 @@ export default class NodeInfo extends React.Component { {nodeInfo.currentBlockHeight && ( )} diff --git a/views/Sync.tsx b/views/Sync.tsx index 7af285a8a..8bba7f05b 100644 --- a/views/Sync.tsx +++ b/views/Sync.tsx @@ -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; @@ -90,13 +91,13 @@ export default class Sync extends React.PureComponent { keyValue={localeString( 'views.Sync.currentBlockHeight' )} - value={currentBlockHeight} + value={numberWithCommas(currentBlockHeight)} /> )} {bestBlockHeight && ( )} {!!numBlocksUntilSynced && ( @@ -104,7 +105,7 @@ export default class Sync extends React.PureComponent { keyValue={localeString( 'views.Sync.numBlocksUntilSynced' )} - value={numBlocksUntilSynced} + value={numberWithCommas(numBlocksUntilSynced)} /> )}