Skip to content

Commit

Permalink
do not show repayment instructions if there is no utilized position
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-123 committed Jan 16, 2024
1 parent 26e4376 commit 2a3732e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stader-cli/node/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <amount to repay>` 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 <amount to repay>` command.\n\n")
}

maxUtilizable := new(big.Int).Sub(sdStatus.SdMaxUtilizableAmount, sdStatus.SdUtilizerLatestBalance)
if maxUtilizable.Cmp(sdStatus.PoolAvailableSDBalance) > 0 {
Expand Down

0 comments on commit 2a3732e

Please sign in to comment.