@curvefi/llamalend-api 1.0.19 → 1.0.20

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/lib/llamalend.js CHANGED
@@ -471,9 +471,6 @@ class Llamalend {
471
471
  this.setContract(this.constants.ALIASES.crv, ERC20ABI);
472
472
  this.setContract(this.constants.ALIASES.crvUSD, ERC20ABI);
473
473
  this.setContract(this.constants.ALIASES.st_crvUSD, ERC4626ABI);
474
- this.constants.DECIMALS[this.constants.ALIASES.crv] = 18;
475
- this.constants.DECIMALS[this.constants.ALIASES.crvUSD] = 18;
476
- this.constants.DECIMALS[this.constants.ALIASES.st_crvUSD] = 18;
477
474
  this.multicallProvider = new MulticallProvider(this.chainId, this.provider);
478
475
  if (this.signer) {
479
476
  try {
@@ -607,8 +604,7 @@ class Llamalend {
607
604
  }
608
605
  }
609
606
  }
610
- this.constants.DECIMALS = extractDecimals(this.constants.LLAMMAS);
611
- this.constants.DECIMALS[this.crvUsdAddress] = 18;
607
+ this.constants.DECIMALS = Object.assign(Object.assign({}, extractDecimals(this.constants.LLAMMAS)), { [this.crvUsdAddress]: 18, [this.constants.ALIASES.crv]: 18, [this.constants.ALIASES.crvUSD]: 18, [this.constants.ALIASES.st_crvUSD]: 18 });
612
608
  if (L2Networks.includes(this.chainId)) {
613
609
  // eslint-disable-next-line @typescript-eslint/no-this-alias
614
610
  const lendingInstance = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/llamalend-api",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "JavaScript library for Curve Lending",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",
@@ -14,8 +14,10 @@
14
14
  "url": "https://github.com/curvefi/curve-lending-js/issues"
15
15
  },
16
16
  "scripts": {
17
- "build": "rm -rf lib && tsc -p tsconfig.build.json",
18
- "lint": "eslint src --ext .ts"
17
+ "build": "rm -rf lib && tsc --project tsconfig.build.json",
18
+ "lint": "eslint src --ext .ts",
19
+ "watch": "tsc --watch",
20
+ "watch:lib": "rm -rf lib && tsc --watch --project tsconfig.build.json"
19
21
  },
20
22
  "engines": {
21
23
  "node": "^22.0.0"
package/src/llamalend.ts CHANGED
@@ -328,9 +328,6 @@ class Llamalend implements ILlamalend {
328
328
  this.setContract(this.constants.ALIASES.crv, ERC20ABI);
329
329
  this.setContract(this.constants.ALIASES.crvUSD, ERC20ABI);
330
330
  this.setContract(this.constants.ALIASES.st_crvUSD, ERC4626ABI);
331
- this.constants.DECIMALS[this.constants.ALIASES.crv] = 18;
332
- this.constants.DECIMALS[this.constants.ALIASES.crvUSD] = 18;
333
- this.constants.DECIMALS[this.constants.ALIASES.st_crvUSD] = 18;
334
331
 
335
332
  this.multicallProvider = new MulticallProvider(this.chainId, this.provider);
336
333
 
@@ -480,8 +477,13 @@ class Llamalend implements ILlamalend {
480
477
  }
481
478
  }
482
479
 
483
- this.constants.DECIMALS = extractDecimals(this.constants.LLAMMAS);
484
- this.constants.DECIMALS[this.crvUsdAddress] = 18;
480
+ this.constants.DECIMALS = {
481
+ ...extractDecimals(this.constants.LLAMMAS),
482
+ [this.crvUsdAddress]: 18,
483
+ [this.constants.ALIASES.crv]: 18,
484
+ [this.constants.ALIASES.crvUSD]: 18,
485
+ [this.constants.ALIASES.st_crvUSD]: 18,
486
+ }
485
487
 
486
488
  if(L2Networks.includes(this.chainId)) {
487
489
  // eslint-disable-next-line @typescript-eslint/no-this-alias