@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.
- package/dist/open-auction.js +3 -6
- package/package.json +1 -1
package/dist/open-auction.js
CHANGED
|
@@ -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.
|
|
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];
|