Skip to content

Commit 2e3b1dc

Browse files
authored
fix: change order of status checks so chainsync comes earlier (#602)
1 parent e2fac67 commit 2e3b1dc

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/command/status.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ export class Status extends RootCommand implements LeafCommand {
2828
const nodeInfo = await this.bee.getNodeInfo()
2929
this.console.all(createKeyValue('Mode', nodeInfo.beeMode))
3030

31+
if (nodeInfo.beeMode !== BeeModes.ULTRA_LIGHT && nodeInfo.beeMode !== BeeModes.DEV) {
32+
this.console.all('')
33+
this.console.all(chalk.bold('Chainsync'))
34+
const { block, chainTip } = await this.bee.getChainState()
35+
this.console.all(
36+
createKeyValue(
37+
'Block',
38+
`${block.toLocaleString()} / ${chainTip.toLocaleString()}${(chainTip - block).toLocaleString()})`,
39+
),
40+
)
41+
}
42+
3143
if (nodeInfo.beeMode !== BeeModes.DEV) {
3244
this.console.all('')
3345
this.console.all(chalk.bold('Topology'))
@@ -43,15 +55,6 @@ export class Status extends RootCommand implements LeafCommand {
4355
const { bzzBalance, nativeTokenBalance } = await this.bee.getWalletBalance()
4456
this.console.all(createKeyValue('xBZZ', bzzBalance.toDecimalString()))
4557
this.console.all(createKeyValue('xDAI', nativeTokenBalance.toDecimalString()))
46-
this.console.all('')
47-
this.console.all(chalk.bold('Chainsync'))
48-
const { block, chainTip } = await this.bee.getChainState()
49-
this.console.all(
50-
createKeyValue(
51-
'Block',
52-
`${block.toLocaleString()} / ${chainTip.toLocaleString()}${(chainTip - block).toLocaleString()})`,
53-
),
54-
)
5558
}
5659

5760
if (nodeInfo.beeMode !== BeeModes.ULTRA_LIGHT && nodeInfo.beeMode !== BeeModes.DEV) {

0 commit comments

Comments
 (0)