Skip to content

Commit

Permalink
fix: create config encrypted wallet path required (#253)
Browse files Browse the repository at this point in the history
* fix: create config encrypted wallet path required

* fix: remove withWalletOption function
  • Loading branch information
isaackps authored Jan 31, 2023
1 parent 5027020 commit 49d6838
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/commands/config/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { create } from "../../implementations/config/create";
import { getLogger } from "../../logger";
import { highlight } from "../../utils";
import { supportedNetwork } from "../networks";
import { withWalletOption } from "../shared";
import { CreateConfigCommand } from "./config.type";

const { trace } = getLogger("config:create");
Expand All @@ -16,14 +15,20 @@ export const command = "create [options]";
export const describe = "Create a config file";

export const builder = (yargs: Argv): Argv =>
withWalletOption(
yargs.option("output-dir", {
yargs
.option("output-dir", {
alias: "od",
description: "Write output to a directory",
type: "string",
demandOption: true,
})
);
// encrypted wallet path is referenced from command.shared.ts as we need additional properties for this instance.
.option("encrypted-wallet-path", {
type: "string",
description: "Path to wallet.json file",
normalize: true,
demandOption: true,
});

export const handler = async (args: CreateConfigCommand): Promise<void> => {
trace(`Args: ${JSON.stringify(args, null, 2)}`);
Expand Down

0 comments on commit 49d6838

Please sign in to comment.