{token.symbol}{' '}
- {token.tokens.map(item => {
- if (item.chain === 'ethereum')
- return
- if (item.chain === 'bsc')
- return
- if (item.chain === 'avalanche')
- return
- if (item.chain === 'polygon')
- return
- if (item.chain === 'arbitrum')
- return
- if (item.chain === 'fantom')
- return
- if (item.chain === 'optimism')
- return
- return <>>
- })}
+
@@ -884,7 +870,24 @@ export default function TokenAnalysisList() {
-
+
+ {isFetching && (
+
+ )}
@@ -1057,7 +1060,7 @@ export default function TokenAnalysisList() {
listData.map((token: ITokenList, index: number) => (
price: number
percent_change_24h: number
From 4919c362b7a7b948818115d21ac01a0763fa402d Mon Sep 17 00:00:00 2001
From: Nguyen Van Viet
Date: Mon, 14 Aug 2023 17:37:17 +0700
Subject: [PATCH 5/7] fix: reward is wrapped token (#2167)
---
src/state/farms/elasticv2/updater.tsx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/state/farms/elasticv2/updater.tsx b/src/state/farms/elasticv2/updater.tsx
index 87c6a14ef7..8eab30a27d 100644
--- a/src/state/farms/elasticv2/updater.tsx
+++ b/src/state/farms/elasticv2/updater.tsx
@@ -170,9 +170,9 @@ export default function ElasticFarmV2Updater({ interval = true }: { interval?: b
const prices = await fetchPrices(tokens)
const formattedData: ElasticFarmV2[] = data.farmV2S.map((farm: SubgraphFarmV2) => {
- const getToken = (t: SubgraphToken) => {
+ const getToken = (t: SubgraphToken, keepWrapped = false) => {
const address = isAddressString(chainId, t.id)
- return address === WETH[chainId].address || address === ZERO_ADDRESS
+ return (keepWrapped ? false : address === WETH[chainId].address) || address === ZERO_ADDRESS
? NativeCurrencies[chainId]
: new Token(
chainId,
@@ -211,7 +211,9 @@ export default function ElasticFarmV2Updater({ interval = true }: { interval?: b
Number(tvlToken0.toExact() || '0') * (prices[farm.pool.token0.id] || 0) +
Number(tvlToken1.toExact() || '0') * (prices[farm.pool.token1.id] || 0)
- const totalRewards = farm.rewards.map(item => CurrencyAmount.fromRawAmount(getToken(item.token), item.amount))
+ const totalRewards = farm.rewards.map(item =>
+ CurrencyAmount.fromRawAmount(getToken(item.token, true), item.amount),
+ )
return {
id: farm.id,
From e2dbb831365dcc5899e98cc7b1e06f3f0fe84021 Mon Sep 17 00:00:00 2001
From: Nguyen Van Viet
Date: Mon, 14 Aug 2023 18:33:15 +0700
Subject: [PATCH 6/7] update new contract (#2168)
---
src/constants/networks/arbitrum.ts | 6 +++++-
src/constants/networks/avax.ts | 6 +++++-
src/constants/networks/optimism.ts | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/constants/networks/arbitrum.ts b/src/constants/networks/arbitrum.ts
index ea98d4b3cd..cca6c6a575 100644
--- a/src/constants/networks/arbitrum.ts
+++ b/src/constants/networks/arbitrum.ts
@@ -64,7 +64,11 @@ const arbitrumInfo: EVMNetworkInfo = {
routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4',
farms: ['0x7D5ba536ab244aAA1EA42aB88428847F25E3E676'],
farmv2Quoter: '0x6AFeb9EDd6Cf44fA8E89b1eee28284e6dD7705C8',
- farmV2S: ['0xE44ec65521B85612fa7BC45d842645Fb4B690E4b', '0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43'],
+ farmV2S: [
+ '0xE44ec65521B85612fa7BC45d842645Fb4B690E4b',
+ '0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43',
+ '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd',
+ ],
},
limitOrder: {
production: '0x227B0c196eA8db17A665EA6824D972A64202E936',
diff --git a/src/constants/networks/avax.ts b/src/constants/networks/avax.ts
index 43803b97f6..995c07a098 100644
--- a/src/constants/networks/avax.ts
+++ b/src/constants/networks/avax.ts
@@ -73,7 +73,11 @@ const avaxInfo: EVMNetworkInfo = {
routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4',
farms: ['0x7D5ba536ab244aAA1EA42aB88428847F25E3E676'],
farmv2Quoter: '0x6AFeb9EDd6Cf44fA8E89b1eee28284e6dD7705C8',
- farmV2S: ['0xA70a1Ad0F91c52c79e177c5A18a7C9E1C4360e0e', '0x3d6afe2fb73ffed2e3dd00c501a174554e147a43'],
+ farmV2S: [
+ '0xA70a1Ad0F91c52c79e177c5A18a7C9E1C4360e0e',
+ '0x3d6afe2fb73ffed2e3dd00c501a174554e147a43',
+ '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd',
+ ],
},
limitOrder: {
development: '0x1877Ec0770901cc6886FDA7E7525a78c2Ed4e975',
diff --git a/src/constants/networks/optimism.ts b/src/constants/networks/optimism.ts
index 8f3a1e941e..958bd399cc 100644
--- a/src/constants/networks/optimism.ts
+++ b/src/constants/networks/optimism.ts
@@ -59,7 +59,11 @@ const optimismInfo: EVMNetworkInfo = {
routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4',
farms: ['0x7D5ba536ab244aAA1EA42aB88428847F25E3E676'],
farmv2Quoter: '0x6AFeb9EDd6Cf44fA8E89b1eee28284e6dD7705C8',
- farmV2S: ['0xA70a1Ad0F91c52c79e177c5A18a7C9E1C4360e0e', '0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43'],
+ farmV2S: [
+ '0xA70a1Ad0F91c52c79e177c5A18a7C9E1C4360e0e',
+ '0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43',
+ '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd',
+ ],
},
limitOrder: {
development: '0xAF800D3EB207BAFBadE540554DF8bDCe561166f8',
From 814c39e6146e331b30c16c8c28c49c051f6bbeb4 Mon Sep 17 00:00:00 2001
From: Nguyen Van Viet
Date: Mon, 14 Aug 2023 22:45:39 +0700
Subject: [PATCH 7/7] fix(farm-v2): user info does not show (#2169)
---
src/state/farms/elasticv2/updater.tsx | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/state/farms/elasticv2/updater.tsx b/src/state/farms/elasticv2/updater.tsx
index 8eab30a27d..b6aaa41b27 100644
--- a/src/state/farms/elasticv2/updater.tsx
+++ b/src/state/farms/elasticv2/updater.tsx
@@ -352,9 +352,11 @@ export default function ElasticFarmV2Updater({ interval = true }: { interval?: b
const infos = res.reduce((acc: UserFarmV2Info[], item) => {
const farm = formattedData.find(
farm =>
+ farm.farmAddress === farmAddresses[index] &&
farm.poolAddress.toLowerCase() === nftInfos[item.nftId.toString()].poolAddress.toLowerCase() &&
+farm.fId === +item.fId.toString(),
)
+
if (!farm) return acc
const position = new Position({
|