From c5cf9f6e36a917cea87cd0b218afd1de9031018b Mon Sep 17 00:00:00 2001 From: greedythib Date: Mon, 16 Oct 2023 15:43:34 +0200 Subject: [PATCH] wip --- src/types/merkl.ts | 63 +++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/src/types/merkl.ts b/src/types/merkl.ts index 1660164..c234d6f 100644 --- a/src/types/merkl.ts +++ b/src/types/merkl.ts @@ -1,5 +1,3 @@ -import { keys } from 'lodash'; - import { ChainId } from '.'; const MerklSupportedChainIds = [ @@ -196,7 +194,7 @@ type UserDataType = Partial<{ userTotalBalance0: number; userTotalBalance1: number; userTotalLiquidity: number; - userDetails: {[key: string]: { origin: WrapperType | -1; balance0: number; balance1: number; tvl: number }}; + userDetails: { [key: string]: { origin: WrapperType | -1; balance0: number; balance1: number; tvl: number } }; // Rewards earned by the user breakdown per token // token => {total unclaimed, total accumulated since inception, token symbol, breakdown per wrapper type} rewardsPerToken: { @@ -212,36 +210,39 @@ type UserDataType = Partial<{ }; }>; -export type PoolDataType = Partial< - { - amm: AMMType; - chainId: ChainId; - endOfDisputePeriod: number; - disputeLive: boolean; - decimalToken0: number; - decimalToken1: number; - distributionData: DistributionDataType[]; - liquidity: number; // liquidity in the pool - pool: string; // AMM pool address - poolAMMAlgo: keyof typeof AMMAlgorithmType; - poolFee: number; // Fee of the AMM pool - token0: string; - token0InPool: number; // Total amount of token0 in the pool - token1: string; - token1InPool: number; // Total amount of token1 in the pool - tokenSymbol0: string; - tokenSymbol1: string; - almDetails: { - [key: string]: { - origin: WrapperType; almBalance0: number; almBalance1: number; almTVL: number; - almAddress: string; - almInRangeLiquidity: number; // Total in range liquidity - almLiquidity: number; // Total Liquidity - label: string; +export type PoolDataType = Partial<{ + amm: AMMType; + chainId: ChainId; + endOfDisputePeriod: number; + disputeLive: boolean; + decimalToken0: number; + decimalToken1: number; + distributionData: DistributionDataType[]; + liquidity: number; // liquidity in the pool + pool: string; // AMM pool address + poolAMMAlgo: keyof typeof AMMAlgorithmType; + poolFee: number; // Fee of the AMM pool + token0: string; + token0InPool: number; // Total amount of token0 in the pool + token1: string; + token1InPool: number; // Total amount of token1 in the pool + tokenSymbol0: string; + tokenSymbol1: string; + almDetails: { + [key: string]: { + origin: WrapperType; + almAddress: string; + almBalance0: number; + almBalance1: number; + almInRangeLiquidity: number; // Total in range liquidity + almLiquidity: number; // Total Liquidity + almTVL: number; + apr: number; + label: string; }; } & PriceDataType & - UserDataType ->; + UserDataType; +}>; /** * Global data object returned by the api, that can be used to build front-ends