@reserve-protocol/dtf-rebalance-lib 2.5.0 → 2.5.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.
@@ -161,10 +161,7 @@ const getOpenAuction = (rebalance, _supply, _initialSupply, _initialAssets = [],
161
161
  // {1} = {USD/wholeShare} / {USD/wholeShare}
162
162
  let progression = folio
163
163
  .map((actualBalance, i) => {
164
- if (!rebalance.inRebalance[i]) {
165
- return numbers_1.ZERO;
166
- }
167
- if (expectedBalances[i].eq(numbers_1.ZERO)) {
164
+ if (!rebalance.inRebalance[i] || expectedBalances[i].eq(numbers_1.ZERO)) {
168
165
  return numbers_1.ONE;
169
166
  }
170
167
  // {wholeTok/wholeShare}
@@ -177,8 +174,8 @@ const getOpenAuction = (rebalance, _supply, _initialSupply, _initialAssets = [],
177
174
  // {1} = {USD/wholeShare} / {USD/wholeShare}
178
175
  const initialProgression = initialFolio
179
176
  .map((initialBalance, i) => {
180
- if (!rebalance.inRebalance[i]) {
181
- return numbers_1.ZERO;
177
+ if (!rebalance.inRebalance[i] || expectedBalances[i].eq(numbers_1.ZERO)) {
178
+ return numbers_1.ONE;
182
179
  }
183
180
  // {wholeTok/wholeShare}
184
181
  const balanceInBasket = expectedBalances[i].gt(initialBalance) ? initialBalance : expectedBalances[i];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reserve-protocol/dtf-rebalance-lib",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
4
4
  "description": "Rebalancing library for DTFs in typescript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",