Skip to content

Commit

Permalink
adds reload keys as false for validator deposit command
Browse files Browse the repository at this point in the history
  • Loading branch information
fighting-dreamer committed Oct 22, 2024
1 parent 0cd790f commit e85bbf7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions stader-cli/validator/deposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit e85bbf7

Please sign in to comment.