Skip to content

Commit 3f1243d

Browse files
authored
clarify arg/flag names to better indicate what resource it is acting on (#5274)
1 parent 500abe5 commit 3f1243d

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

ironfish-cli/src/commands/wallet/create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class CreateCommand extends IronfishCommand {
1111
static description = `Create a new account for sending and receiving coins`
1212

1313
static args = {
14-
account: Args.string({
14+
name: Args.string({
1515
required: false,
1616
description: 'Name of the account',
1717
}),
@@ -23,7 +23,7 @@ export class CreateCommand extends IronfishCommand {
2323

2424
async start(): Promise<void> {
2525
const { args } = await this.parse(CreateCommand)
26-
let name = args.account
26+
let name = args.name
2727

2828
if (!name) {
2929
name = await inputPrompt('Enter the name of the account', true)

ironfish-cli/src/commands/wallet/transactions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ export class TransactionsCommand extends IronfishCommand {
3636
char: 'a',
3737
description: 'Name of the account to get transactions for',
3838
}),
39-
hash: Flags.string({
39+
transaction: Flags.string({
4040
char: 't',
41+
aliases: ['hash'],
4142
description: 'Transaction hash to get details for',
4243
}),
4344
sequence: Flags.integer({
@@ -77,7 +78,7 @@ export class TransactionsCommand extends IronfishCommand {
7778

7879
const response = client.wallet.getAccountTransactionsStream({
7980
account,
80-
hash: flags.hash,
81+
hash: flags.transaction,
8182
sequence: flags.sequence,
8283
limit: flags.limit,
8384
offset: flags.offset,

ironfish-cli/src/commands/wallet/transactions/info.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class TransactionInfoCommand extends IronfishCommand {
2727
static hiddenAliases = ['wallet:transaction']
2828

2929
static args = {
30-
hash: Args.string({
30+
transaction: Args.string({
3131
required: true,
3232
description: 'Hash of the transaction',
3333
}),
@@ -47,7 +47,7 @@ export class TransactionInfoCommand extends IronfishCommand {
4747

4848
async start(): Promise<void> {
4949
const { flags, args } = await this.parse(TransactionInfoCommand)
50-
const { hash } = args
50+
const { transaction: hash } = args
5151
// TODO: remove account arg
5252
const account = flags.account ? flags.account : args.account
5353

ironfish-cli/src/commands/wallet/transactions/post.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class TransactionsPostCommand extends IronfishCommand {
2222
static hiddenAliases = ['wallet:post']
2323

2424
static args = {
25-
transaction: Args.string({
25+
raw_transaction: Args.string({
2626
description: 'The raw transaction in hex encoding',
2727
}),
2828
}
@@ -48,7 +48,7 @@ export class TransactionsPostCommand extends IronfishCommand {
4848

4949
async start(): Promise<void> {
5050
const { flags, args } = await this.parse(TransactionsPostCommand)
51-
let transaction = args.transaction
51+
let transaction = args.raw_transaction
5252

5353
if (!transaction) {
5454
transaction = await longPrompt('Enter the raw transaction in hex encoding', {

ironfish-cli/src/commands/wallet/transactions/watch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class TransactionsWatchCommand extends IronfishCommand {
1111
static hiddenAliases = ['wallet:transaction:watch']
1212

1313
static args = {
14-
hash: Args.string({
14+
transaction: Args.string({
1515
required: true,
1616
description: 'Hash of the transaction',
1717
}),
@@ -35,7 +35,7 @@ export class TransactionsWatchCommand extends IronfishCommand {
3535

3636
async start(): Promise<void> {
3737
const { flags, args } = await this.parse(TransactionsWatchCommand)
38-
const { hash } = args
38+
const { transaction: hash } = args
3939
// TODO: remove account arg
4040
const account = flags.account ? flags.account : args.account
4141

0 commit comments

Comments
 (0)