diff --git a/src/command/root-command/command-config.ts b/src/command/root-command/command-config.ts index 4b66619f..e598b2fd 100644 --- a/src/command/root-command/command-config.ts +++ b/src/command/root-command/command-config.ts @@ -1,4 +1,4 @@ -import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from 'fs' +import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs' import { homedir, platform } from 'os' import { join } from 'path' import { exit } from 'process' diff --git a/src/command/stake/deposit.ts b/src/command/stake/deposit.ts index 84f56df8..8c31fc17 100644 --- a/src/command/stake/deposit.ts +++ b/src/command/stake/deposit.ts @@ -69,6 +69,20 @@ export class Deposit extends RootCommand implements LeafCommand { } if (!this.quiet && !this.yes) { + const reserveState = await this.bee.getReserveState() + const reserveCapacityDoubling = reserveState.reserveCapacityDoubling + + if (amount.eq(BZZ.fromDecimalString('10')) && reserveCapacityDoubling > 0) { + this.yes = await this.console.confirm( + `It is recommended to stake ${ + 10 * 2 ** reserveCapacityDoubling + } xBZZ with a doubled node. Countinue with 10 xBZZ anyway?`, + ) + } + + if (!this.yes) { + exit(1) + } this.yes = await this.console.confirm( `You are about to deposit a non-refundable stake of ${amount.toDecimalString()} xBZZ, are you sure you wish to proceed?`, ) diff --git a/src/command/status.ts b/src/command/status.ts index cdb81cd6..05bedb10 100644 --- a/src/command/status.ts +++ b/src/command/status.ts @@ -115,6 +115,14 @@ export class Status extends RootCommand implements LeafCommand { ' GB)', ), ) + const reserveState = await this.bee.getReserveState() + const reserveCapacityDoubling = reserveState.reserveCapacityDoubling + this.console.all( + createKeyValue( + 'Reserve capacity doubling', + `${reserveCapacityDoubling} (${2 ** reserveCapacityDoubling} neighbourhood(s))`, + ), + ) this.console.all('') this.console.all(chalk.bold('Redistribution')) const redistributionState = await this.bee.getRedistributionState()