Skip to content

Commit 8639497

Browse files
authored
fix: allow buying stamps in dev mode (#640)
1 parent 20aaa69 commit 8639497

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/command/stamp/buy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class Buy extends StampCommand implements LeafCommand {
8282
const estimatedCost = Utils.getStampCost(this.depth, BigInt(this.amount))
8383
const { bzzBalance } = await this.bee.getWalletBalance()
8484

85-
if (estimatedCost.gt(bzzBalance)) {
85+
if (!this.dev && estimatedCost.gt(bzzBalance)) {
8686
this.console.error('You do not have enough BZZ to create this postage stamp.')
8787
this.console.error(`Estimated cost: ${estimatedCost.toDecimalString()} xBZZ`)
8888
this.console.error(`Available balance: ${bzzBalance.toDecimalString()} xBZZ`)

src/command/stamp/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class Create extends StampCommand implements LeafCommand {
8787
const estimatedCost = await this.bee.getStorageCost(size, duration)
8888
const { bzzBalance } = await this.bee.getWalletBalance()
8989

90-
if (estimatedCost.gt(bzzBalance)) {
90+
if (!this.dev && estimatedCost.gt(bzzBalance)) {
9191
this.console.error('You do not have enough BZZ to create this postage stamp.')
9292
this.console.error(`Estimated cost: ${estimatedCost.toDecimalString()} xBZZ`)
9393
this.console.error(`Available balance: ${bzzBalance.toDecimalString()} xBZZ`)

0 commit comments

Comments
 (0)