add a log and update size for promptui (#13542)

This commit is contained in:
james-prysm
2024-01-30 11:19:31 -06:00
committed by GitHub
parent 224b136737
commit 258123341e

View File

@@ -42,10 +42,14 @@ func selectAccounts(selectionPrompt string, pubKeys [][fieldparams.BLSPubkeyLeng
exit := "Done selecting"
results := make([]int, 0)
au := aurora.NewAurora(true)
if len(pubKeyStrings) > 5 {
log.Warnf("there are more than %d potential public keys to exit, please consider using the --%s or --%s flags", 5, flags.VoluntaryExitPublicKeysFlag.Name, flags.ExitAllFlag.Name)
}
for result != exit {
p := promptui.Select{
Label: selectionPrompt,
HideSelected: true,
Size: len(pubKeyStrings),
Items: append([]string{exit, allAccountsText}, pubKeyStrings...),
Templates: templates,
}