Skip to content

Commit 6addbdb

Browse files
authored
chore: add required flag to stake deposit options (#626)
1 parent 0077de5 commit 6addbdb

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/command/stake/deposit.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { BZZ } from '@ethersphere/bee-js'
22
import { LeafCommand, Option } from 'furious-commander'
3+
import { exit } from 'process'
34
import { createSpinner } from '../../utils/spinner'
45
import { RootCommand } from '../root-command'
56
import { VerbosityLevel } from '../root-command/command-log'
@@ -11,23 +12,25 @@ export class Deposit extends RootCommand implements LeafCommand {
1112

1213
public readonly description = 'Stake xBZZ for the storage incentives'
1314

15+
@Option({
16+
key: 'bzz',
17+
description: "Amount of BZZ to add to the node's stake",
18+
type: 'string',
19+
conflicts: 'plur',
20+
required: true,
21+
})
22+
public amountBzz!: string | undefined
23+
1424
@Option({
1525
key: 'plur',
1626
description: "Amount of PLUR to add to the node's stake",
1727
type: 'bigint',
1828
minimum: BigInt(1),
1929
conflicts: 'bzz',
30+
required: true,
2031
})
2132
public amountPlur!: bigint | undefined
2233

23-
@Option({
24-
key: 'bzz',
25-
description: "Amount of BZZ to add to the node's stake",
26-
type: 'string',
27-
conflicts: 'plur',
28-
})
29-
public amountBzz!: string | undefined
30-
3134
public async run(): Promise<void> {
3235
super.init()
3336

@@ -75,7 +78,7 @@ export class Deposit extends RootCommand implements LeafCommand {
7578
}
7679

7780
if (!this.yes && !this.quiet) {
78-
return
81+
exit(1)
7982
}
8083

8184
const spinner = createSpinner('Depositing stake')

0 commit comments

Comments
 (0)