From fd919a36f77509a6dde4025fe362e7abcbbdcd17 Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Fri, 4 Aug 2023 17:25:44 +0200 Subject: [PATCH 1/2] Default confirm to exit prompt to No --- packages/cli/src/cmds/validator/voluntaryExit.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/src/cmds/validator/voluntaryExit.ts b/packages/cli/src/cmds/validator/voluntaryExit.ts index 4eb4c5b9a019..f35170a0630b 100644 --- a/packages/cli/src/cmds/validator/voluntaryExit.ts +++ b/packages/cli/src/cmds/validator/voluntaryExit.ts @@ -91,6 +91,7 @@ If no `pubkeys` are provided, it will exit all validators that have been importe { name: "yes", type: "confirm", + default: false, message: `Confirm to exit pubkeys at epoch ${exitEpoch} from network ${network}? ${validatorsToExit.map((v) => `${v.pubkey} ${v.index} ${v.status}`).join("\n")}`, }, From 01765061e5c077bf92e384d6959a525f24d7e3eb Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Fri, 4 Aug 2023 17:26:33 +0200 Subject: [PATCH 2/2] Add warning that this operation is irreversible --- packages/cli/src/cmds/validator/voluntaryExit.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/src/cmds/validator/voluntaryExit.ts b/packages/cli/src/cmds/validator/voluntaryExit.ts index f35170a0630b..ebc60c16a7fd 100644 --- a/packages/cli/src/cmds/validator/voluntaryExit.ts +++ b/packages/cli/src/cmds/validator/voluntaryExit.ts @@ -87,6 +87,7 @@ If no `pubkeys` are provided, it will exit all validators that have been importe const validatorsToExit = await resolveValidatorIndexes(client, signersToExit); if (!args.yes) { + console.log("\nWARNING: THIS IS AN IRREVERSIBLE OPERATION\n"); const confirmation = await inquirer.prompt<{yes: boolean}>([ { name: "yes",