mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-18 15:54:13 +00:00
add a log and update size for promptui (#13542)
This commit is contained in:
parent
224b136737
commit
258123341e
@ -42,10 +42,14 @@ func selectAccounts(selectionPrompt string, pubKeys [][fieldparams.BLSPubkeyLeng
|
|||||||
exit := "Done selecting"
|
exit := "Done selecting"
|
||||||
results := make([]int, 0)
|
results := make([]int, 0)
|
||||||
au := aurora.NewAurora(true)
|
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 {
|
for result != exit {
|
||||||
p := promptui.Select{
|
p := promptui.Select{
|
||||||
Label: selectionPrompt,
|
Label: selectionPrompt,
|
||||||
HideSelected: true,
|
HideSelected: true,
|
||||||
|
Size: len(pubKeyStrings),
|
||||||
Items: append([]string{exit, allAccountsText}, pubKeyStrings...),
|
Items: append([]string{exit, allAccountsText}, pubKeyStrings...),
|
||||||
Templates: templates,
|
Templates: templates,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user