@gearbox-protocol/sdk 1.15.1 → 1.15.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.
|
@@ -168,10 +168,12 @@ var PoolRewards = /** @class */ (function () {
|
|
|
168
168
|
for (var i = 0; i < keys.length; i++) {
|
|
169
169
|
var curBlock = keys[i];
|
|
170
170
|
var nextBlock = i === keys.length - 1 ? toBlock : keys[i + 1];
|
|
171
|
-
|
|
172
|
-
.
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
if (!totalSupplyArr[i].isZero()) {
|
|
172
|
+
total = total.add(balancesArr[i]
|
|
173
|
+
.mul(nextBlock - curBlock)
|
|
174
|
+
.mul(rewardsArr[i])
|
|
175
|
+
.div(totalSupplyArr[i]));
|
|
176
|
+
}
|
|
175
177
|
}
|
|
176
178
|
return total;
|
|
177
179
|
};
|