@curvefi/api 2.41.0 → 2.41.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/README.md CHANGED
@@ -1218,7 +1218,7 @@ import curve from "@curvefi/api";
1218
1218
  // }
1219
1219
  await pool.stats.tokenApy();
1220
1220
  // [ '0.3324', '0.8309' ]
1221
- await pool.currentCrvApy();
1221
+ await pool.userCrvApy();
1222
1222
  // 0.3324
1223
1223
  await pool.boost();
1224
1224
  // 1.0
package/lib/boosting.js CHANGED
@@ -516,7 +516,7 @@ var _sendBlockhash = function (block, chainId, estimateGas) { return __awaiter(v
516
516
  case 2:
517
517
  _a.sent();
518
518
  gasLimit = mulBy1_3(gas);
519
- return [4 /*yield*/, veOracleContract.deposit(curve.constants.ALIASES.voting_escrow_oracle, __assign(__assign({}, curve.options), { gasLimit: gasLimit }))];
519
+ return [4 /*yield*/, veOracleContract.send_blockhash(block, chainId, __assign(__assign({}, curve.options), { gasLimit: gasLimit }))];
520
520
  case 3: return [2 /*return*/, (_a.sent()).hash];
521
521
  }
522
522
  });
@@ -136,7 +136,7 @@ export declare class PoolTemplate {
136
136
  claimCrvEstimateGas(): Promise<number>;
137
137
  claimCrv(): Promise<string>;
138
138
  boost: (address?: string) => Promise<string>;
139
- currentCrvApy: (address?: string) => Promise<number>;
139
+ userCrvApy: (address?: string) => Promise<number>;
140
140
  maxBoostedStake: (...addresses: string[]) => Promise<IDict<string> | string>;
141
141
  rewardTokens: ((useApi?: any) => Promise<{
142
142
  token: string;
@@ -619,7 +619,7 @@ var PoolTemplate = /** @class */ (function () {
619
619
  });
620
620
  });
621
621
  };
622
- this.currentCrvApy = function (address) {
622
+ this.userCrvApy = function (address) {
623
623
  if (address === void 0) { address = ""; }
624
624
  return __awaiter(_this, void 0, void 0, function () {
625
625
  var _c, baseApy, maxApy, boost;
@@ -632,8 +632,6 @@ var PoolTemplate = /** @class */ (function () {
632
632
  return [4 /*yield*/, this.statsTokenApy()];
633
633
  case 1:
634
634
  _c = _d.sent(), baseApy = _c[0], maxApy = _c[1];
635
- if (curve.chainId !== 1)
636
- return [2 /*return*/, baseApy];
637
635
  return [4 /*yield*/, this.boost(address)];
638
636
  case 2:
639
637
  boost = _d.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.41.0",
3
+ "version": "2.41.2",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",