@ethersphere/bee-js 7.0.1 → 7.0.2
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/feed/index.js
CHANGED
|
@@ -26,7 +26,7 @@ export async function findNextIndex(requestOptions, owner, topic, options) {
|
|
|
26
26
|
}
|
|
27
27
|
export async function updateFeed(requestOptions, signer, topic, reference, postageBatchId, options) {
|
|
28
28
|
const ownerHex = makeHexEthAddress(signer.address);
|
|
29
|
-
const nextIndex = options?.index
|
|
29
|
+
const nextIndex = options?.index ?? (await findNextIndex(requestOptions, ownerHex, topic, options));
|
|
30
30
|
const identifier = makeFeedIdentifier(topic, nextIndex);
|
|
31
31
|
const at = options?.at ?? Date.now() / 1000.0;
|
|
32
32
|
const timestamp = Binary.numberToUint64BE(Math.floor(at));
|