@defisaver/positions-sdk 1.0.2-dev → 1.0.3-dev
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/fluid/index.js +4 -0
- package/cjs/types/fluid.d.ts +2 -0
- package/esm/fluid/index.js +4 -0
- package/esm/types/fluid.d.ts +2 -0
- package/package.json +1 -1
- package/src/fluid/index.ts +5 -0
- package/src/types/fluid.ts +2 -0
package/cjs/fluid/index.js
CHANGED
|
@@ -97,6 +97,10 @@ const parseMarketData = (web3, data, network, mainnetWeb3) => __awaiter(void 0,
|
|
|
97
97
|
supplyRate: '0',
|
|
98
98
|
borrowRate,
|
|
99
99
|
};
|
|
100
|
+
if (staking_1.STAKING_ASSETS.includes(debtAssetData.symbol)) {
|
|
101
|
+
debtAssetData.incentiveBorrowApy = yield (0, staking_1.getStakingApy)(debtAsset.symbol, mainnetWeb3);
|
|
102
|
+
debtAssetData.incentiveBorrowToken = debtAsset.symbol;
|
|
103
|
+
}
|
|
100
104
|
const assetsData = {
|
|
101
105
|
[collAsset.symbol]: collAssetData,
|
|
102
106
|
[debtAsset.symbol]: debtAssetData,
|
package/cjs/types/fluid.d.ts
CHANGED
|
@@ -159,6 +159,8 @@ export interface FluidAssetData {
|
|
|
159
159
|
price: string;
|
|
160
160
|
incentiveSupplyApy?: string;
|
|
161
161
|
incentiveSupplyToken?: string;
|
|
162
|
+
incentiveBorrowApy?: string;
|
|
163
|
+
incentiveBorrowToken?: string;
|
|
162
164
|
totalSupply: string;
|
|
163
165
|
totalBorrow: string;
|
|
164
166
|
canBeSupplied: boolean;
|
package/esm/fluid/index.js
CHANGED
|
@@ -91,6 +91,10 @@ const parseMarketData = (web3, data, network, mainnetWeb3) => __awaiter(void 0,
|
|
|
91
91
|
supplyRate: '0',
|
|
92
92
|
borrowRate,
|
|
93
93
|
};
|
|
94
|
+
if (STAKING_ASSETS.includes(debtAssetData.symbol)) {
|
|
95
|
+
debtAssetData.incentiveBorrowApy = yield getStakingApy(debtAsset.symbol, mainnetWeb3);
|
|
96
|
+
debtAssetData.incentiveBorrowToken = debtAsset.symbol;
|
|
97
|
+
}
|
|
94
98
|
const assetsData = {
|
|
95
99
|
[collAsset.symbol]: collAssetData,
|
|
96
100
|
[debtAsset.symbol]: debtAssetData,
|
package/esm/types/fluid.d.ts
CHANGED
|
@@ -159,6 +159,8 @@ export interface FluidAssetData {
|
|
|
159
159
|
price: string;
|
|
160
160
|
incentiveSupplyApy?: string;
|
|
161
161
|
incentiveSupplyToken?: string;
|
|
162
|
+
incentiveBorrowApy?: string;
|
|
163
|
+
incentiveBorrowToken?: string;
|
|
162
164
|
totalSupply: string;
|
|
163
165
|
totalBorrow: string;
|
|
164
166
|
canBeSupplied: boolean;
|
package/package.json
CHANGED
package/src/fluid/index.ts
CHANGED
|
@@ -103,6 +103,11 @@ const parseMarketData = async (web3: Web3, data: FluidView.VaultDataStructOutput
|
|
|
103
103
|
borrowRate,
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
+
if (STAKING_ASSETS.includes(debtAssetData.symbol)) {
|
|
107
|
+
debtAssetData.incentiveBorrowApy = await getStakingApy(debtAsset.symbol, mainnetWeb3);
|
|
108
|
+
debtAssetData.incentiveBorrowToken = debtAsset.symbol;
|
|
109
|
+
}
|
|
110
|
+
|
|
106
111
|
const assetsData = {
|
|
107
112
|
[collAsset.symbol]: collAssetData,
|
|
108
113
|
[debtAsset.symbol]: debtAssetData,
|
package/src/types/fluid.ts
CHANGED
|
@@ -170,6 +170,8 @@ export interface FluidAssetData {
|
|
|
170
170
|
price: string,
|
|
171
171
|
incentiveSupplyApy?: string,
|
|
172
172
|
incentiveSupplyToken?: string,
|
|
173
|
+
incentiveBorrowApy?: string,
|
|
174
|
+
incentiveBorrowToken?: string,
|
|
173
175
|
totalSupply: string,
|
|
174
176
|
totalBorrow: string,
|
|
175
177
|
canBeSupplied: boolean,
|