Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/command/root-command/command-config.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
14 changes: 14 additions & 0 deletions src/command/stake/deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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?`,
)
Expand Down
8 changes: 8 additions & 0 deletions src/command/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading