Skip to content

Commit ab0847b

Browse files
authored
move args to be above flags in wallet command definitions (#5259)
1 parent abbf3f9 commit ab0847b

File tree

15 files changed

+100
-100
lines changed

15 files changed

+100
-100
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ export class AddressCommand extends IronfishCommand {
1010
1111
The address for an account is the accounts public key, see more here: https://ironfish.network/docs/whitepaper/5_account`
1212

13-
static flags = {
14-
...RemoteFlags,
15-
}
16-
1713
static args = {
1814
account: Args.string({
1915
required: false,
2016
description: 'Name of the account to get the address for',
2117
}),
2218
}
2319

20+
static flags = {
21+
...RemoteFlags,
22+
}
23+
2424
async start(): Promise<void> {
2525
const { args } = await this.parse(AddressCommand)
2626
const { account } = args

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ const MIN_ASSET_NAME_COLUMN_WIDTH = ASSET_NAME_LENGTH / 2 + 1
2525
export class AssetsCommand extends IronfishCommand {
2626
static description = `Display the wallet's assets`
2727

28+
static args = {
29+
account: Args.string({
30+
required: false,
31+
description: 'Name of the account. DEPRECATED: use --account flag',
32+
}),
33+
}
34+
2835
static flags = {
2936
...RemoteFlags,
3037
...TableFlags,
@@ -34,13 +41,6 @@ export class AssetsCommand extends IronfishCommand {
3441
}),
3542
}
3643

37-
static args = {
38-
account: Args.string({
39-
required: false,
40-
description: 'Name of the account. DEPRECATED: use --account flag',
41-
}),
42-
}
43-
4444
async start(): Promise<void> {
4545
const { flags, args } = await this.parse(AssetsCommand)
4646
// TODO: remove account arg

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ export class BalanceCommand extends IronfishCommand {
1515
Available to spend balance is your coins from transactions that have been mined on blocks on your main chain.\n\
1616
Balance is your coins from all of your transactions, even if they are on forks or not yet included as part of a mined block.'
1717

18+
static args = {
19+
account: Args.string({
20+
required: false,
21+
description: 'Name of the account to get balance for. DEPRECATED: use --account flag',
22+
}),
23+
}
24+
1825
static flags = {
1926
...RemoteFlags,
2027
account: Flags.string({
@@ -39,13 +46,6 @@ export class BalanceCommand extends IronfishCommand {
3946
}),
4047
}
4148

42-
static args = {
43-
account: Args.string({
44-
required: false,
45-
description: 'Name of the account to get balance for. DEPRECATED: use --account flag',
46-
}),
47-
}
48-
4949
async start(): Promise<void> {
5050
const { flags, args } = await this.parse(BalanceCommand)
5151
// TODO: remove account arg

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ type AssetBalancePairs = { asset: RpcAsset; balance: GetBalancesResponse['balanc
1313
export class BalancesCommand extends IronfishCommand {
1414
static description = `Display the account's balances for all assets`
1515

16+
static args = {
17+
account: Args.string({
18+
required: false,
19+
description: 'Name of the account to get balances for. DEPRECATED: use --account flag',
20+
}),
21+
}
22+
1623
static flags = {
1724
...RemoteFlags,
1825
...TableFlags,
@@ -30,13 +37,6 @@ export class BalancesCommand extends IronfishCommand {
3037
}),
3138
}
3239

33-
static args = {
34-
account: Args.string({
35-
required: false,
36-
description: 'Name of the account to get balances for. DEPRECATED: use --account flag',
37-
}),
38-
}
39-
4040
async start(): Promise<void> {
4141
const { flags, args } = await this.parse(BalancesCommand)
4242
const client = await this.connectRpc()

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ export class ExportCommand extends IronfishCommand {
1313
static description = `Export an account`
1414
static enableJsonFlag = true
1515

16+
static args = {
17+
account: Args.string({
18+
required: false,
19+
description: 'Name of the account to export',
20+
}),
21+
}
22+
1623
static flags = {
1724
...RemoteFlags,
1825
...JsonFlags,
@@ -39,13 +46,6 @@ export class ExportCommand extends IronfishCommand {
3946
}),
4047
}
4148

42-
static args = {
43-
account: Args.string({
44-
required: false,
45-
description: 'Name of the account to export',
46-
}),
47-
}
48-
4949
async start(): Promise<unknown> {
5050
const { flags, args } = await this.parse(ExportCommand)
5151
const { local, path: exportPath, viewonly: viewOnly } = flags

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ import { Ledger } from '../../utils/ledger'
1717
export class ImportCommand extends IronfishCommand {
1818
static description = `Import an account`
1919

20+
static args = {
21+
blob: Args.string({
22+
required: false,
23+
description: 'The copy-pasted output of wallet:export; or, a raw spending key',
24+
}),
25+
}
26+
2027
static flags = {
2128
...RemoteFlags,
2229
rescan: Flags.boolean({
@@ -40,13 +47,6 @@ export class ImportCommand extends IronfishCommand {
4047
}),
4148
}
4249

43-
static args = {
44-
blob: Args.string({
45-
required: false,
46-
description: 'The copy-pasted output of wallet:export; or, a raw spending key',
47-
}),
48-
}
49-
5050
async start(): Promise<void> {
5151
const { flags, args } = await this.parse(ImportCommand)
5252
const { blob } = args

ironfish-cli/src/commands/wallet/notes/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ const { sort: _, ...tableFlags } = TableFlags
1212
export class NotesCommand extends IronfishCommand {
1313
static description = `Display the account notes`
1414

15+
static args = {
16+
account: Args.string({
17+
required: false,
18+
description: 'Name of the account to get notes for. DEPRECATED: use --account flag',
19+
}),
20+
}
21+
1522
static flags = {
1623
...RemoteFlags,
1724
...tableFlags,
@@ -21,13 +28,6 @@ export class NotesCommand extends IronfishCommand {
2128
}),
2229
}
2330

24-
static args = {
25-
account: Args.string({
26-
required: false,
27-
description: 'Name of the account to get notes for. DEPRECATED: use --account flag',
28-
}),
29-
}
30-
3131
async start(): Promise<void> {
3232
const { flags, args } = await this.parse(NotesCommand)
3333
// TODO: remove account arg

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ import { confirmOrQuit } from '../../ui'
1010
export class ResetCommand extends IronfishCommand {
1111
static description = `Resets the transaction of an account but keeps all keys.`
1212

13+
static args = {
14+
account: Args.string({
15+
required: true,
16+
description: 'Name of the account to reset',
17+
}),
18+
}
19+
1320
static flags = {
1421
...RemoteFlags,
1522
resetCreated: Flags.boolean({
@@ -26,13 +33,6 @@ export class ResetCommand extends IronfishCommand {
2633
}),
2734
}
2835

29-
static args = {
30-
account: Args.string({
31-
required: true,
32-
description: 'Name of the account to reset',
33-
}),
34-
}
35-
3636
async start(): Promise<void> {
3737
const { args, flags } = await this.parse(ResetCommand)
3838
const { account } = args

ironfish-cli/src/commands/wallet/scanning/off.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import { RemoteFlags } from '../../../flags'
88
export class ScanningOffCommand extends IronfishCommand {
99
static description = `Turn off scanning for an account. The wallet will no longer scan the blockchain for new account transactions.`
1010

11-
static flags = {
12-
...RemoteFlags,
13-
}
14-
1511
static args = {
1612
account: Args.string({
1713
required: true,
1814
description: 'Name of the account to update',
1915
}),
2016
}
2117

18+
static flags = {
19+
...RemoteFlags,
20+
}
21+
2222
async start(): Promise<void> {
2323
const { args } = await this.parse(ScanningOffCommand)
2424
const { account } = args

ironfish-cli/src/commands/wallet/scanning/on.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import { RemoteFlags } from '../../../flags'
88
export class ScanningOnCommand extends IronfishCommand {
99
static description = `Turn on scanning for an account. Scanning is on by default. The wallet will scan the blockchain for new account transactions.`
1010

11-
static flags = {
12-
...RemoteFlags,
13-
}
14-
1511
static args = {
1612
account: Args.string({
1713
required: true,
1814
description: 'Name of the account to update',
1915
}),
2016
}
2117

18+
static flags = {
19+
...RemoteFlags,
20+
}
21+
2222
async start(): Promise<void> {
2323
const { args } = await this.parse(ScanningOnCommand)
2424
const { account } = args

0 commit comments

Comments
 (0)