From e85bbf70c8434f577ba046f22847fab8edab0694 Mon Sep 17 00:00:00 2001 From: Nipun Jindal Date: Fri, 18 Oct 2024 11:59:02 +0530 Subject: [PATCH] adds reload keys as false for validator deposit command --- stader-cli/validator/deposit.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/stader-cli/validator/deposit.go b/stader-cli/validator/deposit.go index 83e3d43e..3dc5f644 100644 --- a/stader-cli/validator/deposit.go +++ b/stader-cli/validator/deposit.go @@ -148,7 +148,19 @@ func nodeDeposit(c *cli.Context) error { fmt.Println("Validator creation process initiate, please wait...") } - canNodeDepositResponse, err := staderClient.CanNodeDeposit(baseAmount, utilityAmount, big.NewInt(int64(numValidators)), true) + cfg, _, err := staderClient.LoadConfig() + if err != nil { + return err + } + canNodeDepositReloadKeysFlag := true + nodeDepositReloadKeysFlag := true + + if !cfg.IsSSVMode { + canNodeDepositReloadKeysFlag = false + nodeDepositReloadKeysFlag = false + } + + canNodeDepositResponse, err := staderClient.CanNodeDeposit(baseAmount, utilityAmount, big.NewInt(int64(numValidators)), canNodeDepositReloadKeysFlag) if err != nil { return err } @@ -174,7 +186,7 @@ func nodeDeposit(c *cli.Context) error { } // Make deposit - response, err := staderClient.NodeDeposit(baseAmount, big.NewInt(int64(numValidators)), utilityAmount, true) + response, err := staderClient.NodeDeposit(baseAmount, big.NewInt(int64(numValidators)), utilityAmount, nodeDepositReloadKeysFlag) if err != nil { return err }