@ethersphere/bee-js 6.7.0 → 6.7.3
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/cjs/bee-debug.js +13 -5
- package/dist/cjs/feed/index.js +1 -1
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/bee-debug.js +12 -5
- package/dist/mjs/feed/index.js +1 -1
- package/dist/types/feed/index.d.ts +1 -1
- package/dist/types/modules/feed.d.ts +3 -2
- package/package.json +1 -1
package/dist/cjs/bee-debug.js
CHANGED
|
@@ -564,12 +564,20 @@ class BeeDebug {
|
|
|
564
564
|
(0, type_1.assertRequestOptions)(options);
|
|
565
565
|
return stake.getRedistributionState(this.getRequestOptionsForCall(options));
|
|
566
566
|
}
|
|
567
|
-
async waitForUsablePostageStamp(id, timeout =
|
|
568
|
-
const TIME_STEP =
|
|
567
|
+
async waitForUsablePostageStamp(id, timeout = 240000) {
|
|
568
|
+
const TIME_STEP = 2000;
|
|
569
569
|
for (let time = 0; time < timeout; time += TIME_STEP) {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
570
|
+
try {
|
|
571
|
+
const stamp = await this.getPostageBatch(id);
|
|
572
|
+
if (stamp.usable) {
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
catch (error) {
|
|
577
|
+
const message = error?.response?.data?.message || error?.message || '';
|
|
578
|
+
if (!message.includes('batch not usable')) {
|
|
579
|
+
throw error;
|
|
580
|
+
}
|
|
573
581
|
}
|
|
574
582
|
await cafe_utility_1.System.sleepMillis(TIME_STEP);
|
|
575
583
|
}
|
package/dist/cjs/feed/index.js
CHANGED
|
@@ -89,7 +89,7 @@ function makeFeedReader(requestOptions, type, topic, owner) {
|
|
|
89
89
|
owner,
|
|
90
90
|
topic,
|
|
91
91
|
async download(options) {
|
|
92
|
-
if (!options?.index) {
|
|
92
|
+
if (!options?.index && options?.index !== 0) {
|
|
93
93
|
return (0, feed_1.fetchLatestFeedUpdate)(requestOptions, owner, topic, { ...options, type });
|
|
94
94
|
}
|
|
95
95
|
const update = await downloadFeedUpdate(requestOptions, (0, hex_1.hexToBytes)(owner), topic, options.index);
|