Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit 9c08233

Browse files
author
William Poulin
authored
fix(banano): Fix farms on Ethereum (#3178)
1 parent efe6f5a commit 9c08233

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/apps/banano/common/banano.farm.contract-position-fetcher.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export abstract class BananoFarmContractPositionFetcher extends MasterChefTempla
4444
}
4545

4646
async getTotalRewardRate({ contract }: GetMasterChefDataPropsParams<Benis>): Promise<BigNumberish> {
47-
return contract.read.wbanPerSecond();
47+
const now = Date.now();
48+
const endTime = (await contract.read.endTime()) * 1_000;
49+
return endTime < now ? 0 : contract.read.wbanPerSecond();
4850
}
4951

5052
async getPoolAllocPoints({ contract, definition }: GetMasterChefDataPropsParams<Benis>): Promise<BigNumberish> {

src/apps/uniswap-v2/ethereum/uniswap-v2.pool.token-fetcher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export class EthereumUniswapV2PoolTokenFetcher extends UniswapV2DefaultPoolSubgr
99
factoryAddress = '0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f';
1010
subgraphUrl = 'https://api.thegraph.com/subgraphs/name/ianlapham/uniswap-v2-dev?source=zapper';
1111
ignoredPools = ['0x3016a43b482d0480460f6625115bd372fe90c6bf'];
12+
requiredPools = ['0x1f249f8b5a42aa78cc8a2b66ee0bb015468a5f43'];
1213
orderBy = 'trackedReserveETH';
1314
first = 1000;
1415
}

0 commit comments

Comments
 (0)