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

fix(banano): Fix farms on Ethereum #3178

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
Loading