Skip to content

Commit

Permalink
fix: Correct account alias used for deploy and tx commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ipapandinas committed Jan 30, 2024
1 parent 15a0330 commit 1ab38dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/commands/contract/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ import chalk from "chalk";
import { Contract } from "../../lib/contract.js";
import { SwankyCommand } from "../../lib/swankyCommand.js";
import { ApiError, ConfigError, FileError } from "../../lib/errors.js";
import { DEFAULT_ACCOUNT } from "../../lib/consts.js";

export class DeployContract extends SwankyCommand<typeof DeployContract> {
static description = "Deploy contract to a running node";

static flags = {
account: Flags.string({
default: DEFAULT_ACCOUNT,
description: "Alias of account to be used",
description: "Account alias to deploy contract with",
}),
gas: Flags.integer({
char: "g",
Expand Down Expand Up @@ -158,7 +156,7 @@ export class DeployContract extends SwankyCommand<typeof DeployContract> {
timestamp: Date.now(),
address: contractAddress,
networkUrl,
deployerAlias: flags.account,
deployerAlias: accountAlias!,
},
];

Expand Down
5 changes: 0 additions & 5 deletions src/commands/contract/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ export class Tx extends ContractCall<typeof Tx> {
char: "d",
description: "Do a dry run, without signing the transaction",
}),
account: Flags.string({
required: true,
char: "a",
description: "Account to sign the transaction with",
}),
...ContractCall.callFlags,
};

Expand Down
2 changes: 1 addition & 1 deletion src/lib/contractCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ ContractCall.baseFlags = {
}),
account: Flags.string({
char: "a",
description: "Account to sign the transaction with",
description: "Account alias to sign the transaction with",
}),
address: Flags.string({
required: false,
Expand Down

0 comments on commit 1ab38dd

Please sign in to comment.