@ethersphere/bee-js 7.0.2 → 7.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mjs/bee.js CHANGED
@@ -1321,19 +1321,14 @@ export class Bee {
1321
1321
  return stake.getRedistributionState(this.getRequestOptionsForCall(options));
1322
1322
  }
1323
1323
  async waitForUsablePostageStamp(id, timeout = 240000) {
1324
- const TIME_STEP = 2000;
1324
+ const TIME_STEP = 3000;
1325
1325
  for (let time = 0; time < timeout; time += TIME_STEP) {
1326
1326
  try {
1327
1327
  const stamp = await this.getPostageBatch(id);
1328
1328
  if (stamp.usable) {
1329
1329
  return;
1330
1330
  }
1331
- } catch (error) {
1332
- const message = error?.response?.data?.message || error?.message || '';
1333
- if (!message.includes('batch not usable')) {
1334
- throw error;
1335
- }
1336
- }
1331
+ } catch (error) {}
1337
1332
  await System.sleepMillis(TIME_STEP);
1338
1333
  }
1339
1334
  throw new BeeError('Timeout on waiting for postage stamp to become usable');
@@ -233,6 +233,7 @@ export interface ReserveState {
233
233
  }
234
234
  export interface ChainState {
235
235
  block: number;
236
+ chainTip: number;
236
237
  totalAmount: NumberString;
237
238
  currentPrice: NumberString;
238
239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethersphere/bee-js",
3
- "version": "7.0.2",
3
+ "version": "7.0.4",
4
4
  "description": "Javascript client for Bee",
5
5
  "keywords": [
6
6
  "bee",