@ethersphere/bee-js 9.1.1 → 9.1.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/README.md +2 -0
- package/dist/cjs/bee.js +2 -2
- package/dist/cjs/utils/stamps.js +1 -1
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/bee.js +2 -2
- package/dist/mjs/utils/stamps.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -374,6 +374,8 @@ After making changes, link the package to your project by running `npm link` in
|
|
|
374
374
|
|
|
375
375
|
### Test
|
|
376
376
|
|
|
377
|
+
[Code coverage](https://bah5acgza26tlmya36bdiu5cdfs3hh22hqthkhfv6cvq2ugxqrv5aw267ydlq.bzz.limo/)
|
|
378
|
+
|
|
377
379
|
Tests are currently run against a mainnet Bee nodes. This is temporary and this section will be revised in the future.
|
|
378
380
|
|
|
379
381
|
## License
|
package/dist/cjs/bee.js
CHANGED
|
@@ -1150,7 +1150,7 @@ class Bee {
|
|
|
1150
1150
|
throw new error_1.BeeArgumentError(`Depth has to be between ${types_1.STAMPS_DEPTH_MIN}..${types_1.STAMPS_DEPTH_MAX}`, depth);
|
|
1151
1151
|
}
|
|
1152
1152
|
const chainState = await this.getChainState();
|
|
1153
|
-
const minimumAmount = BigInt(chainState.currentPrice) * 17280n;
|
|
1153
|
+
const minimumAmount = BigInt(chainState.currentPrice) * 17280n + 1n;
|
|
1154
1154
|
if (BigInt(amountString) < minimumAmount) {
|
|
1155
1155
|
throw new error_1.BeeArgumentError(`Amount has to be at least ${minimumAmount} (1 day at current price ${chainState.currentPrice})`, amountString);
|
|
1156
1156
|
}
|
|
@@ -1182,7 +1182,7 @@ class Bee {
|
|
|
1182
1182
|
if (delta <= 0) {
|
|
1183
1183
|
throw new error_1.BeeArgumentError('New depth has to be greater than the original depth', depth);
|
|
1184
1184
|
}
|
|
1185
|
-
await this.topUpBatch(batch.batchID, BigInt(batch.amount) * 2n ** BigInt(delta - 1), options);
|
|
1185
|
+
await this.topUpBatch(batch.batchID, BigInt(batch.amount) * 2n ** BigInt(delta - 1) + 1n, options);
|
|
1186
1186
|
return this.diluteBatch(batch.batchID, depth, options);
|
|
1187
1187
|
}
|
|
1188
1188
|
async extendStorageDuration(postageBatchId, duration, options) {
|
package/dist/cjs/utils/stamps.js
CHANGED
|
@@ -111,7 +111,7 @@ exports.getStampDuration = getStampDuration;
|
|
|
111
111
|
* @param blockTime The block time in seconds.
|
|
112
112
|
*/
|
|
113
113
|
function getAmountForDuration(duration, pricePerBlock, blockTime) {
|
|
114
|
-
return (BigInt(duration.toSeconds()) / BigInt(blockTime)) * BigInt(pricePerBlock);
|
|
114
|
+
return (BigInt(duration.toSeconds()) / BigInt(blockTime)) * BigInt(pricePerBlock) + 1n;
|
|
115
115
|
}
|
|
116
116
|
exports.getAmountForDuration = getAmountForDuration;
|
|
117
117
|
/**
|