From 1ab38ddce1810a3ec6c48974ab04e5f2b870f4d9 Mon Sep 17 00:00:00 2001 From: Igor Papandinas Date: Tue, 30 Jan 2024 12:37:17 +0100 Subject: [PATCH] fix: Correct account alias used for deploy and tx commands --- src/commands/contract/deploy.ts | 6 ++---- src/commands/contract/tx.ts | 5 ----- src/lib/contractCall.ts | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/commands/contract/deploy.ts b/src/commands/contract/deploy.ts index d1687156..c807ef94 100644 --- a/src/commands/contract/deploy.ts +++ b/src/commands/contract/deploy.ts @@ -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 { 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", @@ -158,7 +156,7 @@ export class DeployContract extends SwankyCommand { timestamp: Date.now(), address: contractAddress, networkUrl, - deployerAlias: flags.account, + deployerAlias: accountAlias!, }, ]; diff --git a/src/commands/contract/tx.ts b/src/commands/contract/tx.ts index 49d75e30..dbe13ce0 100644 --- a/src/commands/contract/tx.ts +++ b/src/commands/contract/tx.ts @@ -12,11 +12,6 @@ export class Tx extends ContractCall { 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, }; diff --git a/src/lib/contractCall.ts b/src/lib/contractCall.ts index 85490761..9bb8adaa 100644 --- a/src/lib/contractCall.ts +++ b/src/lib/contractCall.ts @@ -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,