@curvefi/api 2.21.0 → 2.21.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.
@@ -408,8 +408,8 @@ var PoolTemplate = /** @class */ (function () {
408
408
  return [2 /*return*/, (0, utils_1.parseUnits)(Math.sqrt(Number(amounts[0]) * Number(amounts[1])))];
409
409
  case 8:
410
410
  _e.trys.push([8, 11, , 13]);
411
- N_coins = useUnderlying ? this.underlyingCoins.length : this.wrappedCoins.length;
412
- decimals_2 = useUnderlying ? this.underlyingDecimals : this.wrappedDecimals;
411
+ N_coins = this.isMeta && useUnderlying ? this.underlyingCoins.length : this.wrappedCoins.length;
412
+ decimals_2 = this.isMeta && useUnderlying ? this.underlyingDecimals : this.wrappedDecimals;
413
413
  calcContractAddress = this.isMeta && useUnderlying ? this.zap : this.address;
414
414
  calcContract = curve_1.curve.contracts[calcContractAddress].multicallContract;
415
415
  poolContract = curve_1.curve.contracts[this.address].multicallContract;
@@ -427,7 +427,7 @@ var PoolTemplate = /** @class */ (function () {
427
427
  }
428
428
  return [4 /*yield*/, Promise.all([
429
429
  curve_1.curve.multicallProvider.all(calls),
430
- useUnderlying ? this.stats.underlyingBalances() : this.stats.wrappedBalances(),
430
+ this.isMeta && useUnderlying ? this.stats.underlyingBalances() : this.stats.wrappedBalances(),
431
431
  ])];
432
432
  case 9:
433
433
  res = _e.sent();
@@ -445,12 +445,7 @@ var PoolTemplate = /** @class */ (function () {
445
445
  }
446
446
  }
447
447
  _fees = feesBN.map(function (fBN, i) { return (0, utils_1.fromBN)(fBN, decimals_2[i]); });
448
- if (!this.isMeta && useUnderlying) {
449
- _fees = _fees.map(function (_fee, i) {
450
- return _fee.mul(ethers_1.ethers.BigNumber.from(10).pow(18)).div(_rates[i]);
451
- });
452
- }
453
- return [4 /*yield*/, this._pureCalcLpTokenAmount(_fees, !isDeposit, useUnderlying)];
448
+ return [4 /*yield*/, this._pureCalcLpTokenAmount(_fees, !isDeposit, this.isMeta && useUnderlying)];
454
449
  case 10:
455
450
  _lpTokenFee = _e.sent();
456
451
  if (isDeposit)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.21.0",
3
+ "version": "2.21.1",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",