From 9c08233501d15f8d4f06f9ee87b712844c1b5a87 Mon Sep 17 00:00:00 2001 From: William Poulin Date: Tue, 9 Jan 2024 15:46:11 -0500 Subject: [PATCH] fix(banano): Fix farms on Ethereum (#3178) --- .../banano/common/banano.farm.contract-position-fetcher.ts | 4 +++- src/apps/uniswap-v2/ethereum/uniswap-v2.pool.token-fetcher.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/apps/banano/common/banano.farm.contract-position-fetcher.ts b/src/apps/banano/common/banano.farm.contract-position-fetcher.ts index 809ed7f6e..5713de9d2 100644 --- a/src/apps/banano/common/banano.farm.contract-position-fetcher.ts +++ b/src/apps/banano/common/banano.farm.contract-position-fetcher.ts @@ -44,7 +44,9 @@ export abstract class BananoFarmContractPositionFetcher extends MasterChefTempla } async getTotalRewardRate({ contract }: GetMasterChefDataPropsParams): Promise { - return contract.read.wbanPerSecond(); + const now = Date.now(); + const endTime = (await contract.read.endTime()) * 1_000; + return endTime < now ? 0 : contract.read.wbanPerSecond(); } async getPoolAllocPoints({ contract, definition }: GetMasterChefDataPropsParams): Promise { diff --git a/src/apps/uniswap-v2/ethereum/uniswap-v2.pool.token-fetcher.ts b/src/apps/uniswap-v2/ethereum/uniswap-v2.pool.token-fetcher.ts index 18f80b469..789ab567c 100644 --- a/src/apps/uniswap-v2/ethereum/uniswap-v2.pool.token-fetcher.ts +++ b/src/apps/uniswap-v2/ethereum/uniswap-v2.pool.token-fetcher.ts @@ -9,6 +9,7 @@ export class EthereumUniswapV2PoolTokenFetcher extends UniswapV2DefaultPoolSubgr factoryAddress = '0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f'; subgraphUrl = 'https://api.thegraph.com/subgraphs/name/ianlapham/uniswap-v2-dev?source=zapper'; ignoredPools = ['0x3016a43b482d0480460f6625115bd372fe90c6bf']; + requiredPools = ['0x1f249f8b5a42aa78cc8a2b66ee0bb015468a5f43']; orderBy = 'trackedReserveETH'; first = 1000; }