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

Commit

Permalink
fix(banano): Fix farms on Ethereum (#3178)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoulin authored Jan 9, 2024
1 parent efe6f5a commit 9c08233
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export abstract class BananoFarmContractPositionFetcher extends MasterChefTempla
}

async getTotalRewardRate({ contract }: GetMasterChefDataPropsParams<Benis>): Promise<BigNumberish> {
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<Benis>): Promise<BigNumberish> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 9c08233

Please sign in to comment.