@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.
- package/cjs/compoundV3/index.js +5 -0
- package/cjs/markets/compound/marketsAssets.d.ts +1 -1
- package/cjs/markets/compound/marketsAssets.js +1 -1
- package/esm/compoundV3/index.js +6 -1
- package/esm/markets/compound/marketsAssets.d.ts +1 -1
- package/esm/markets/compound/marketsAssets.js +1 -1
- package/package.json +1 -1
- package/src/compoundV3/index.ts +6 -1
- package/src/markets/compound/marketsAssets.ts +1 -1
package/cjs/compoundV3/index.js
CHANGED
|
@@ -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"];
|
package/esm/compoundV3/index.js
CHANGED
|
@@ -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"];
|
package/package.json
CHANGED
package/src/compoundV3/index.ts
CHANGED
|
@@ -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);
|