@defisaver/positions-sdk 0.0.19 → 0.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.
@@ -68,6 +68,11 @@ const getCompoundV3MarketsData = (web3, network, selectedMarket, defaultWeb3) =>
68
68
  coll.incentiveSupplyApy = yield (0, staking_1.getCbETHApr)(defaultWeb3);
69
69
  coll.incentiveSupplyToken = 'cbETH';
70
70
  }
71
+ if (coll.symbol === 'rETH') {
72
+ // eslint-disable-next-line no-await-in-loop
73
+ coll.incentiveSupplyApy = yield (0, staking_1.getREthApr)(defaultWeb3);
74
+ coll.incentiveSupplyToken = 'rETH';
75
+ }
71
76
  }
72
77
  }
73
78
  const base = (0, compoundHelpers_1.formatBaseData)(data[0].baseToken, network, baseAssetPrice);
@@ -6,7 +6,7 @@ export declare const v3USDCCollAssets: {
6
6
  readonly 8453: readonly [];
7
7
  };
8
8
  export declare const v3ETHCollAssets: {
9
- readonly 1: readonly ["cbETH", "wstETH"];
9
+ readonly 1: readonly ["cbETH", "wstETH", "rETH"];
10
10
  readonly 10: readonly [];
11
11
  readonly 42161: readonly [];
12
12
  readonly 8453: readonly ["cbETH"];
@@ -17,7 +17,7 @@ exports.v3USDCCollAssets = {
17
17
  };
18
18
  exports.v3ETHCollAssets = {
19
19
  [common_1.NetworkNumber.Eth]: [
20
- 'cbETH', 'wstETH',
20
+ 'cbETH', 'wstETH', 'rETH',
21
21
  ],
22
22
  [common_1.NetworkNumber.Opt]: [],
23
23
  [common_1.NetworkNumber.Arb]: [],
@@ -12,7 +12,7 @@ import { assetAmountInEth, assetAmountInWei, getAssetInfo, getAssetInfoByAddress
12
12
  import { CompV3ViewContract } from '../contracts';
13
13
  import { multicall } from '../multicall';
14
14
  import { CompoundVersions, } from '../types/compound';
15
- import { getCbETHApr, getStETHApr, getStETHByWstETHMultiple, getWstETHByStETH, } from '../staking';
15
+ import { getCbETHApr, getREthApr, getStETHApr, getStETHByWstETHMultiple, getWstETHByStETH, } from '../staking';
16
16
  import { wethToEth } from '../services/utils';
17
17
  import { ZERO_ADDRESS } from '../constants';
18
18
  import { calculateBorrowingAssetLimit } from '../moneymarket';
@@ -62,6 +62,11 @@ export const getCompoundV3MarketsData = (web3, network, selectedMarket, defaultW
62
62
  coll.incentiveSupplyApy = yield getCbETHApr(defaultWeb3);
63
63
  coll.incentiveSupplyToken = 'cbETH';
64
64
  }
65
+ if (coll.symbol === 'rETH') {
66
+ // eslint-disable-next-line no-await-in-loop
67
+ coll.incentiveSupplyApy = yield getREthApr(defaultWeb3);
68
+ coll.incentiveSupplyToken = 'rETH';
69
+ }
65
70
  }
66
71
  }
67
72
  const base = formatBaseData(data[0].baseToken, network, baseAssetPrice);
@@ -6,7 +6,7 @@ export declare const v3USDCCollAssets: {
6
6
  readonly 8453: readonly [];
7
7
  };
8
8
  export declare const v3ETHCollAssets: {
9
- readonly 1: readonly ["cbETH", "wstETH"];
9
+ readonly 1: readonly ["cbETH", "wstETH", "rETH"];
10
10
  readonly 10: readonly [];
11
11
  readonly 42161: readonly [];
12
12
  readonly 8453: readonly ["cbETH"];
@@ -14,7 +14,7 @@ export const v3USDCCollAssets = {
14
14
  };
15
15
  export const v3ETHCollAssets = {
16
16
  [NetworkNumber.Eth]: [
17
- 'cbETH', 'wstETH',
17
+ 'cbETH', 'wstETH', 'rETH',
18
18
  ],
19
19
  [NetworkNumber.Opt]: [],
20
20
  [NetworkNumber.Arb]: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/positions-sdk",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -12,7 +12,7 @@ import {
12
12
  Blockish, EthAddress, NetworkNumber, PositionBalances,
13
13
  } from '../types/common';
14
14
  import {
15
- getCbETHApr, getStETHApr, getStETHByWstETHMultiple, getWstETHByStETH,
15
+ getCbETHApr, getREthApr, getStETHApr, getStETHByWstETHMultiple, getWstETHByStETH,
16
16
  } from '../staking';
17
17
  import { wethToEth } from '../services/utils';
18
18
  import { ZERO_ADDRESS } from '../constants';
@@ -66,6 +66,11 @@ export const getCompoundV3MarketsData = async (web3: Web3, network: NetworkNumbe
66
66
  coll.incentiveSupplyApy = await getCbETHApr(defaultWeb3);
67
67
  coll.incentiveSupplyToken = 'cbETH';
68
68
  }
69
+ if (coll.symbol === 'rETH') {
70
+ // eslint-disable-next-line no-await-in-loop
71
+ coll.incentiveSupplyApy = await getREthApr(defaultWeb3);
72
+ coll.incentiveSupplyToken = 'rETH';
73
+ }
69
74
  }
70
75
  }
71
76
  const base = formatBaseData(data[0].baseToken, network, baseAssetPrice);
@@ -17,7 +17,7 @@ export const v3USDCCollAssets = {
17
17
 
18
18
  export const v3ETHCollAssets = {
19
19
  [NetworkNumber.Eth]: [
20
- 'cbETH', 'wstETH',
20
+ 'cbETH', 'wstETH', 'rETH',
21
21
  ],
22
22
  [NetworkNumber.Opt]: [],
23
23
  [NetworkNumber.Arb]: [],