@1delta/margin-fetcher 0.0.29 → 0.0.30
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/dist/lending/user-data/aave-v2-type/userCallParse.d.ts.map +1 -1
- package/dist/lending/user-data/aave-v2-type/userCallParse.js +2 -3
- package/dist/lending/user-data/compound-v3/userCallParse.d.ts.map +1 -1
- package/dist/lending/user-data/compound-v3/userCallParse.js +1 -2
- package/package.json +1 -1
- package/src/lending/user-data/aave-v2-type/userCallParse.ts +2 -3
- package/src/lending/user-data/compound-v3/userCallParse.ts +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userCallParse.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/aave-v2-type/userCallParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAE/C,OAAO,EAAgC,yBAAyB,EAAmB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"userCallParse.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/aave-v2-type/userCallParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAE/C,OAAO,EAAgC,yBAAyB,EAAmB,MAAM,UAAU,CAAA;AAOnG,eAAO,MAAM,0BAA0B,GACrC,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,SAAS,MAAM,EACf,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,YAAY;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACvC,YAAY,GAAG,KACd,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,yBAAyB,GAAG,SAAS,EAAE,MAAM,CA0QjE,CAAA"}
|
|
@@ -4,7 +4,6 @@ import { AaveV2TypeGetUserReserveData } from "../types";
|
|
|
4
4
|
import { AURELIUS_REWARD_ASSETS } from "../../aave-v2-type/misc";
|
|
5
5
|
import { getLenderAssets } from "../../../utils";
|
|
6
6
|
import { createBaseTypeUserState } from "../utils";
|
|
7
|
-
import { Asset as SupportedAssets } from "@1delta/asset-registry";
|
|
8
7
|
import { parseRawAmount } from "../../../utils/parsing";
|
|
9
8
|
export const getAaveV2UserDataConverter = (lender, chainId, account, prices, pricesHist, lenderData) => {
|
|
10
9
|
switch (lender) {
|
|
@@ -88,7 +87,7 @@ export const getAaveV2UserDataConverter = (lender, chainId, account, prices, pri
|
|
|
88
87
|
const rewards = {};
|
|
89
88
|
const earnedBalances = data[expectedNumberOfCalls - 1];
|
|
90
89
|
const lendRewards = Number(parseRawAmount(earnedBalances[0].toString(), 18));
|
|
91
|
-
rewards[
|
|
90
|
+
rewards["LEND"] = { totalRewards: lendRewards + totalClaimableLend, claimableRewards: totalClaimableLend };
|
|
92
91
|
const payload = {
|
|
93
92
|
chainId,
|
|
94
93
|
account,
|
|
@@ -139,7 +138,7 @@ export const getAaveV2UserDataConverter = (lender, chainId, account, prices, pri
|
|
|
139
138
|
lendingPositions[asset] = dataForAsset;
|
|
140
139
|
}
|
|
141
140
|
const rewards = {};
|
|
142
|
-
rewards[
|
|
141
|
+
rewards["TAIKO"] = {
|
|
143
142
|
totalRewards,
|
|
144
143
|
claimableRewards: totalClaimableRewards
|
|
145
144
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userCallParse.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/compound-v3/userCallParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"userCallParse.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/compound-v3/userCallParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAWxD,eAAO,MAAM,8BAA8B,GACzC,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,SAAS,MAAM,EACf,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,YAAY;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACvC,YAAY,GAAG,KACd,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,6BAA6B,GAAG,SAAS,EAAE,MAAM,CAmHrE,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getAssetMeta, getCompoundV3Assets, toGenericPriceKey, toOracleKey, } from '../../../assets';
|
|
2
2
|
import { getCompoundV3BaseAsset } from '../../addresses/compoundV3';
|
|
3
3
|
import { parseRawAmount } from '../../../utils/parsing';
|
|
4
|
-
import { Asset as SupportedAssets } from '@1delta/asset-registry';
|
|
5
4
|
import { createBaseTypeUserState } from '../utils';
|
|
6
5
|
export const getCompoundV3UserDataConverter = (lender, chainId, account, prices, pricesHist, lenderData) => {
|
|
7
6
|
const assetAddresses = getCompoundV3Assets(chainId, lender);
|
|
@@ -84,7 +83,7 @@ export const getCompoundV3UserDataConverter = (lender, chainId, account, prices,
|
|
|
84
83
|
chainId,
|
|
85
84
|
baseAsset,
|
|
86
85
|
rewards: {
|
|
87
|
-
[
|
|
86
|
+
['COMP']: {
|
|
88
87
|
totalRewards: compRewards,
|
|
89
88
|
claimableRewards: compRewards,
|
|
90
89
|
},
|
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ import { AaveV2TypeGetUserReserveData, AaveV2UserReserveResponse, UserRewardEntr
|
|
|
4
4
|
import { AURELIUS_REWARD_ASSETS } from "../../aave-v2-type/misc"
|
|
5
5
|
import { getLenderAssets } from "../../../utils"
|
|
6
6
|
import { createBaseTypeUserState } from "../utils"
|
|
7
|
-
import { Asset as SupportedAssets } from "@1delta/asset-registry";
|
|
8
7
|
import { parseRawAmount } from "../../../utils/parsing"
|
|
9
8
|
|
|
10
9
|
|
|
@@ -136,7 +135,7 @@ export const getAaveV2UserDataConverter = (
|
|
|
136
135
|
const earnedBalances = data[expectedNumberOfCalls - 1]
|
|
137
136
|
const lendRewards = Number(parseRawAmount(earnedBalances[0].toString(), 18))
|
|
138
137
|
|
|
139
|
-
rewards[
|
|
138
|
+
rewards["LEND"] = { totalRewards: lendRewards + totalClaimableLend, claimableRewards: totalClaimableLend }
|
|
140
139
|
|
|
141
140
|
const payload = {
|
|
142
141
|
chainId,
|
|
@@ -211,7 +210,7 @@ export const getAaveV2UserDataConverter = (
|
|
|
211
210
|
|
|
212
211
|
const rewards: UserRewardEntry = {}
|
|
213
212
|
|
|
214
|
-
rewards[
|
|
213
|
+
rewards["TAIKO"] = {
|
|
215
214
|
totalRewards,
|
|
216
215
|
claimableRewards: totalClaimableRewards
|
|
217
216
|
}
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
} from '../../../assets'
|
|
9
9
|
import { getCompoundV3BaseAsset } from '../../addresses/compoundV3'
|
|
10
10
|
import { parseRawAmount } from '../../../utils/parsing'
|
|
11
|
-
import { Asset as SupportedAssets } from '@1delta/asset-registry'
|
|
12
11
|
import { createBaseTypeUserState } from '../utils'
|
|
13
12
|
|
|
14
13
|
export const getCompoundV3UserDataConverter = (
|
|
@@ -112,7 +111,7 @@ export const getCompoundV3UserDataConverter = (
|
|
|
112
111
|
chainId,
|
|
113
112
|
baseAsset,
|
|
114
113
|
rewards: {
|
|
115
|
-
[
|
|
114
|
+
['COMP']: {
|
|
116
115
|
totalRewards: compRewards,
|
|
117
116
|
claimableRewards: compRewards,
|
|
118
117
|
},
|