Skip to content

Commit

Permalink
feat! enable waiting for postage batch to be usable by default
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed Jul 27, 2022
1 parent 0b46862 commit ab47121
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/bee-debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ export class BeeDebug {

const stamp = await stamps.createPostageBatch(this.getKy(options), amount, depth, options)

if (options?.waitForUsable) {
if (options?.waitForUsable !== false) {
await this.waitForUsablePostageStamp(stamp, options?.waitForUsableTimeout)
}

Expand Down
6 changes: 3 additions & 3 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,12 @@ export interface PostageBatchOptions extends RequestOptions {
/**
* The returned Promise will await until the purchased Postage Batch is usable.
* In other word, it has to have enough block confirmations that Bee pronounce it usable.
* If turned on, this significantly prolong the creation of postage batch!
* When turned on, this significantly prolongs the creation of postage batch!
*
* If you plan to use the stamp right away for some action with Bee (like uploading using this stamp) it is
* highly recommended to use this option, otherwise you might get errors "stamp not usable" from Bee.
*
* In next breaking release this option will be turned on by default.
* @default false
* @default true
*/
waitForUsable?: boolean

Expand Down

0 comments on commit ab47121

Please sign in to comment.