From 2a3732ec89205357a24b9f6e527c634a10aec438 Mon Sep 17 00:00:00 2001 From: Bharath Vedartham Date: Tue, 16 Jan 2024 15:30:07 +0530 Subject: [PATCH] do not show repayment instructions if there is no utilized position --- stader-cli/node/status.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stader-cli/node/status.go b/stader-cli/node/status.go index abd5bb419..d6ec1e6a6 100644 --- a/stader-cli/node/status.go +++ b/stader-cli/node/status.go @@ -187,8 +187,13 @@ func getNodeStatus(c *cli.Context) error { fmt.Printf("The Operator has utilized %s from the Utility Pool.\n\n", eth.DisplayAmountInUnits(sdStatus.SdUtilizedBalance, "sd")) - fmt.Printf("The Operator has a current Utilization Position of %s. (including the utilization fee)\nNote: For repayment of your utilized SD, please use the `stader-cli node repay-sd ` command.\n\n", + fmt.Printf("The Operator has a current Utilization Position of %s. (including the utilization fee)\n", eth.DisplayAmountInUnits(sdStatus.SdUtilizerLatestBalance, "sd")) + if sdStatus.SdUtilizerLatestBalance.Cmp(big.NewInt(0)) == 0 { + fmt.Println("") + } else { + fmt.Printf("Note: For repayment of your utilized SD, please use the `stader-cli node repay-sd ` command.\n\n") + } maxUtilizable := new(big.Int).Sub(sdStatus.SdMaxUtilizableAmount, sdStatus.SdUtilizerLatestBalance) if maxUtilizable.Cmp(sdStatus.PoolAvailableSDBalance) > 0 {