@stake-dao/reader 0.4.76 → 0.4.77
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/esm/lockers/fetch/index.js +3 -1
- package/dist/esm/lockers/fetch/index.js.map +1 -1
- package/dist/esm/strategies/pancakeswap/fetch/index.js +2 -4
- package/dist/esm/strategies/pancakeswap/fetch/index.js.map +1 -1
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/lockers/fetch/index.d.ts.map +1 -1
- package/dist/types/strategies/pancakeswap/fetch/index.d.ts +1 -1
- package/dist/types/strategies/pancakeswap/fetch/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/lockers/fetch/index.ts +3 -1
- package/src/strategies/pancakeswap/fetch/index.ts +2 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lockers/fetch/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAK5C,OAA6B,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAsB5F,UAAU,aAAa;IACrB,QAAQ,EAAE,GAAG,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB;AAED,eAAO,MAAM,YAAY,kCAAyC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lockers/fetch/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAK5C,OAA6B,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAsB5F,UAAU,aAAa;IACrB,QAAQ,EAAE,GAAG,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB;AAED,eAAO,MAAM,YAAY,kCAAyC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgS9E,CAAA"}
|
|
@@ -11,7 +11,7 @@ interface TFetchPancakeswap {
|
|
|
11
11
|
export declare const fetchPancakeswap: ({ provider, rpc, chainId, prices, explorerApiKey, explorer, }: TFetchPancakeswap) => Promise<{
|
|
12
12
|
global: import("../../types.js").PancakeSwapGlobalData;
|
|
13
13
|
deployed: any[];
|
|
14
|
-
notDeployed:
|
|
14
|
+
notDeployed: never[];
|
|
15
15
|
fetched: boolean;
|
|
16
16
|
}>;
|
|
17
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/strategies/pancakeswap/fetch/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/strategies/pancakeswap/fetch/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAKjE,UAAU,iBAAiB;IACzB,QAAQ,EAAE,GAAG,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,aAAa,CAAA;CACxB;AAED,eAAO,MAAM,gBAAgB,kEAO1B,iBAAiB;;;;;EA8BnB,CAAA"}
|
package/package.json
CHANGED
|
@@ -183,7 +183,9 @@ export const fetchLockers = async ({ provider, chainId, prices }: TFetchLockers)
|
|
|
183
183
|
// Rewards APR
|
|
184
184
|
const rewardsData = locker.rewards.map((r) => {
|
|
185
185
|
const rawData = rawLockersRewardsData.shift().result
|
|
186
|
-
const rewardPrice =
|
|
186
|
+
const rewardPrice = equalTlc(r.address, locker.sdToken.address)
|
|
187
|
+
? sdTokenPriceInUsd
|
|
188
|
+
: prices.find((p) => p.address === r.address)?.usdPrice || 0
|
|
187
189
|
|
|
188
190
|
const periodFinish = Number(formatUnits(rawData ? rawData[2] : Zero, 0))
|
|
189
191
|
const streaming = r.distribution === 'streamed' && periodFinish > Math.floor(Date.now() / 1000)
|
|
@@ -6,7 +6,6 @@ import type { Price } from '../../../prices.js'
|
|
|
6
6
|
import type { ValidChainId, ValidExplorer } from '../../types.js'
|
|
7
7
|
import { getPancakeSwapFeesAPR, getPancakeSwapManagerFeesAPR } from './getPancakeApisData.js'
|
|
8
8
|
import { getPancakeErc20Vaults } from './getPancakeErc20Vaults.js'
|
|
9
|
-
import { getPancakeNotDeployed } from './getPancakeNotDeployed.js'
|
|
10
9
|
import { getPancakeV3Vaults } from './getPancakeV3Vaults.js'
|
|
11
10
|
|
|
12
11
|
interface TFetchPancakeswap {
|
|
@@ -48,19 +47,11 @@ export const fetchPancakeswap = async ({
|
|
|
48
47
|
|
|
49
48
|
const v3Vaults = await getPancakeV3Vaults(rpc, chainId, prices, feesApr, stakedTVLS)
|
|
50
49
|
const erc20Vaults = await getPancakeErc20Vaults(rpc, chainId, prices, feesApr, managerFees, events)
|
|
51
|
-
const erc20NotDeployed = await getPancakeNotDeployed(
|
|
52
|
-
rpc,
|
|
53
|
-
chainId,
|
|
54
|
-
prices,
|
|
55
|
-
feesApr,
|
|
56
|
-
managerFees,
|
|
57
|
-
erc20Vaults.map((v) => v.lpToken.address),
|
|
58
|
-
)
|
|
59
50
|
|
|
60
51
|
return {
|
|
61
52
|
global: v3Vaults.global,
|
|
62
|
-
deployed: [...v3Vaults.stratsData, ...erc20Vaults],
|
|
63
|
-
notDeployed:
|
|
53
|
+
deployed: [...v3Vaults.stratsData, ...erc20Vaults].filter((s) => s.tvl > 0),
|
|
54
|
+
notDeployed: [],
|
|
64
55
|
fetched: true,
|
|
65
56
|
}
|
|
66
57
|
}
|