From 1e8b6b44704f08d454bbbfca52d3fe88d2572993 Mon Sep 17 00:00:00 2001 From: Cafe137 Date: Thu, 3 Jul 2025 09:49:33 +0200 Subject: [PATCH] chore: add required flag to stake deposit options --- src/command/stake/deposit.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/command/stake/deposit.ts b/src/command/stake/deposit.ts index 3d3a60f2..984eb5a0 100644 --- a/src/command/stake/deposit.ts +++ b/src/command/stake/deposit.ts @@ -1,5 +1,6 @@ import { BZZ } from '@ethersphere/bee-js' import { LeafCommand, Option } from 'furious-commander' +import { exit } from 'process' import { createSpinner } from '../../utils/spinner' import { RootCommand } from '../root-command' import { VerbosityLevel } from '../root-command/command-log' @@ -11,23 +12,25 @@ export class Deposit extends RootCommand implements LeafCommand { public readonly description = 'Stake xBZZ for the storage incentives' + @Option({ + key: 'bzz', + description: "Amount of BZZ to add to the node's stake", + type: 'string', + conflicts: 'plur', + required: true, + }) + public amountBzz!: string | undefined + @Option({ key: 'plur', description: "Amount of PLUR to add to the node's stake", type: 'bigint', minimum: BigInt(1), conflicts: 'bzz', + required: true, }) public amountPlur!: bigint | undefined - @Option({ - key: 'bzz', - description: "Amount of BZZ to add to the node's stake", - type: 'string', - conflicts: 'plur', - }) - public amountBzz!: string | undefined - public async run(): Promise { super.init() @@ -75,7 +78,7 @@ export class Deposit extends RootCommand implements LeafCommand { } if (!this.yes && !this.quiet) { - return + exit(1) } const spinner = createSpinner('Depositing stake')