@ethersphere/bee-js 12.2.0 → 12.2.1
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.js +7 -1
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/bee.js +7 -1
- package/dist/types/bee.d.ts +1 -1
- package/package.json +2 -2
package/dist/cjs/bee.js
CHANGED
|
@@ -1629,10 +1629,16 @@ class Bee {
|
|
|
1629
1629
|
? currentAmount * multiplier
|
|
1630
1630
|
: (currentAmount + additionalAmount) * multiplier;
|
|
1631
1631
|
const amountDelta = targetAmount - currentAmount;
|
|
1632
|
-
|
|
1632
|
+
let transactionId;
|
|
1633
|
+
if (amountDelta > 0n) {
|
|
1634
|
+
transactionId = await this.topUpBatch(batch.batchID, amountDelta, requestOptions);
|
|
1635
|
+
}
|
|
1633
1636
|
if (depthDelta > 0) {
|
|
1634
1637
|
return this.diluteBatch(batch.batchID, depth, requestOptions);
|
|
1635
1638
|
}
|
|
1639
|
+
if (!transactionId) {
|
|
1640
|
+
throw new Error('Nothing to extend, both size and duration are already sufficient');
|
|
1641
|
+
}
|
|
1636
1642
|
return transactionId;
|
|
1637
1643
|
}
|
|
1638
1644
|
/**
|