Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: clean up validator import options #5689

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions packages/cli/src/cmds/validator/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import {PersistedKeysBackend} from "./keymanager/persistedKeys.js";

/* eslint-disable no-console */

export const importCmd: CliCommand<IValidatorCliArgs, GlobalArgs> = {
type ValidatorImportArgs = Pick<IValidatorCliArgs, "importKeystores" | "importKeystoresPassword">;

const {importKeystores, importKeystoresPassword} = validatorOptions;

export const importCmd: CliCommand<ValidatorImportArgs, IValidatorCliArgs & GlobalArgs> = {
command: "import",

describe:
Expand All @@ -29,12 +33,11 @@ Ethereum Foundation utility.",
// Note: re-uses `--importKeystores` and `--importKeystoresPassword` from root validator command options

options: {
...validatorOptions,

importKeystores: {
...validatorOptions.importKeystores,
...importKeystores,
requiresArg: true,
},
importKeystoresPassword,
},

handler: async (args) => {
Expand Down