@defisaver/positions-sdk 0.0.183 → 0.0.185
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/aaveV3/index.js +1 -1
- package/cjs/markets/aave/marketAssets.js +1 -1
- package/esm/aaveV3/index.js +1 -1
- package/esm/markets/aave/marketAssets.js +1 -1
- package/package.json +1 -1
- package/src/aaveV3/index.ts +1 -1
- package/src/markets/aave/marketAssets.ts +1 -1
- package/src/staking/staking.ts +2 -2
package/cjs/aaveV3/index.js
CHANGED
|
@@ -148,7 +148,7 @@ function getAaveV3MarketData(web3, network, market, defaultWeb3) {
|
|
|
148
148
|
const assetsData = yield Promise.all(loanInfo
|
|
149
149
|
.map((tokenMarket, i) => __awaiter(this, void 0, void 0, function* () {
|
|
150
150
|
const symbol = market.assets[i];
|
|
151
|
-
const nativeAsset = symbol === 'GHO' && network === common_1.NetworkNumber.Eth;
|
|
151
|
+
const nativeAsset = symbol === 'GHO' && network === common_1.NetworkNumber.Eth && market.shortLabel === 'v3default';
|
|
152
152
|
// eslint-disable-next-line guard-for-in
|
|
153
153
|
for (const eModeIndex in eModeCategoriesData) {
|
|
154
154
|
if ((0, utils_1.isEnabledOnBitmap)(Number(eModeCategoriesData[eModeIndex].collateralBitmap), Number(tokenMarket.assetId)))
|
|
@@ -25,7 +25,7 @@ exports.aaveV3AssetsDefaultMarket = {
|
|
|
25
25
|
[common_1.NetworkNumber.Arb]: exports.aaveV3AssetsDefaultMarketArb,
|
|
26
26
|
[common_1.NetworkNumber.Base]: exports.aaveV3AssetsDefaultMarketBase,
|
|
27
27
|
};
|
|
28
|
-
exports.aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe'];
|
|
28
|
+
exports.aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe', 'GHO', 'rsETH'];
|
|
29
29
|
exports.aaveV3AssetsLidoMarket = {
|
|
30
30
|
[common_1.NetworkNumber.Eth]: exports.aaveV3AssetsLidoMarketEth,
|
|
31
31
|
[common_1.NetworkNumber.Opt]: [],
|
package/esm/aaveV3/index.js
CHANGED
|
@@ -139,7 +139,7 @@ export function getAaveV3MarketData(web3, network, market, defaultWeb3) {
|
|
|
139
139
|
const assetsData = yield Promise.all(loanInfo
|
|
140
140
|
.map((tokenMarket, i) => __awaiter(this, void 0, void 0, function* () {
|
|
141
141
|
const symbol = market.assets[i];
|
|
142
|
-
const nativeAsset = symbol === 'GHO' && network === NetworkNumber.Eth;
|
|
142
|
+
const nativeAsset = symbol === 'GHO' && network === NetworkNumber.Eth && market.shortLabel === 'v3default';
|
|
143
143
|
// eslint-disable-next-line guard-for-in
|
|
144
144
|
for (const eModeIndex in eModeCategoriesData) {
|
|
145
145
|
if (isEnabledOnBitmap(Number(eModeCategoriesData[eModeIndex].collateralBitmap), Number(tokenMarket.assetId)))
|
|
@@ -22,7 +22,7 @@ export const aaveV3AssetsDefaultMarket = {
|
|
|
22
22
|
[NetworkNumber.Arb]: aaveV3AssetsDefaultMarketArb,
|
|
23
23
|
[NetworkNumber.Base]: aaveV3AssetsDefaultMarketBase,
|
|
24
24
|
};
|
|
25
|
-
export const aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe'];
|
|
25
|
+
export const aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe', 'GHO', 'rsETH'];
|
|
26
26
|
export const aaveV3AssetsLidoMarket = {
|
|
27
27
|
[NetworkNumber.Eth]: aaveV3AssetsLidoMarketEth,
|
|
28
28
|
[NetworkNumber.Opt]: [],
|
package/package.json
CHANGED
package/src/aaveV3/index.ts
CHANGED
|
@@ -187,7 +187,7 @@ export async function getAaveV3MarketData(web3: Web3, network: NetworkNumber, ma
|
|
|
187
187
|
const assetsData: AaveV3AssetData[] = await Promise.all(loanInfo
|
|
188
188
|
.map(async (tokenMarket, i) => {
|
|
189
189
|
const symbol = market.assets[i];
|
|
190
|
-
const nativeAsset = symbol === 'GHO' && network === NetworkNumber.Eth;
|
|
190
|
+
const nativeAsset = symbol === 'GHO' && network === NetworkNumber.Eth && market.shortLabel === 'v3default';
|
|
191
191
|
|
|
192
192
|
// eslint-disable-next-line guard-for-in
|
|
193
193
|
for (const eModeIndex in eModeCategoriesData) {
|
|
@@ -28,7 +28,7 @@ export const aaveV3AssetsDefaultMarket = {
|
|
|
28
28
|
[NetworkNumber.Base]: aaveV3AssetsDefaultMarketBase,
|
|
29
29
|
} as const;
|
|
30
30
|
|
|
31
|
-
export const aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe'];
|
|
31
|
+
export const aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe', 'GHO', 'rsETH'];
|
|
32
32
|
|
|
33
33
|
export const aaveV3AssetsLidoMarket = {
|
|
34
34
|
[NetworkNumber.Eth]: aaveV3AssetsLidoMarketEth,
|
package/src/staking/staking.ts
CHANGED
|
@@ -78,7 +78,7 @@ export const getDsrApy = async (web3: Web3, blockNumber: 'latest' | number = 'la
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
export const getSsrApy = async () => {
|
|
81
|
-
const res = await fetch('https://
|
|
81
|
+
const res = await fetch('https://fe.defisaver.com/api/sky/data');
|
|
82
82
|
const data = await res.json();
|
|
83
83
|
return new Dec(data.data.skyData[0].sky_savings_rate_apy).mul(100).toString();
|
|
84
84
|
};
|
|
@@ -103,7 +103,7 @@ const getSuperOETHApy = async () => {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
const getApyFromDfsApi = async (asset: string) => {
|
|
106
|
-
const res = await fetch(`https://
|
|
106
|
+
const res = await fetch(`https://fe.defisaver.com/api/staking/apy?asset=${asset}`);
|
|
107
107
|
const data = await res.json();
|
|
108
108
|
// if our server returns apr, transform it into apy
|
|
109
109
|
if (['weETH'].includes(asset)) {
|