Skip to content

Commit

Permalink
Release 2.0.2 (pancakeswap#238)
Browse files Browse the repository at this point in the history
* updated package.json version

* 193: Show divider instead of sidebar meny content when pushed off

* rm circle icon

* 161: Refactored and fixed column sorting

* pancakeswap#211: Added react-intersection-observer

* pancakeswap#211: Lazily load vaults element, for increased perf ⬆⬆

* pancakeswap#211: Adapted Row to include OnInView callback

* pancakeswap#211: Fixed InView wrapping issue

* pancakeswap#215: Fixed high APY numbers overflow

* pancakeswap#190: Set the Select DropdownContainer width to 100%

* pancakeswap#190: Added sorting for mobile users

* added placeholders

* added placeholders

* removed test LP tokens addrs

* 129-logo-link-add-text

* Revert "Merge pull request pancakeswap#217 from kogecoin/190-enable-apy-sorting-in-mobile"

This reverts commit f8ad08b, reversing
changes made to daf8733.

* Revert "129-logo-link-add-text"

This reverts commit aa076a6.

* Revert "Revert "Merge pull request pancakeswap#217 from kogecoin/190-enable-apy-sorting-in-mobile""

This reverts commit c3042ef.

* Revert "Revert "129-logo-link-add-text""

This reverts commit f722978.

* Update README.md

* 12 decimals

* cleanup commment

* fix logo text link

* format

* removed unwanted test data

* removed test data

* move iris to inactive

* remove empty inactive vaults

* Add contracts for moonriver

- MultiCall, verified on PolygonScan then deployed on MoonRiver
- farms_mvr.ts: USDC-Dai (Solar)
- Tokens: added addresses for chain 1285 for USDC, Dai, Solar

* update to polygon-rpc

* add some other RPCs to rotation

* get rid of beware labs since it seems to be down too

* add back beware labs spelling error

* pancakeswap#229: Fixed multisearch with platform filter

* Revert "Revert "Revert "129-logo-link-add-text"""

This reverts commit 543431e.

* Reverted changes that introduced bug from pancakeswap#129

* 194: Reduced navbar tooltips size of  by half

* 175: Removed withdrawal cancel button outline

* add back infura

* 107 add youtube link (pancakeswap#230)

* add menu entry

* svg

* pancakeswap#215: Rounding up APYs greater than billions

* pancakeswap#234: Activate staked only when toggle to inactive farms

* fix atricrypto APRs

* update trading fee for curve

* pancakeswap#215: Added million as a rounded number

* Quickfix: redirecting only if on prod

Co-authored-by: Logan Bek <loganbek@gmail.com>
Co-authored-by: Adam Bertram <adbertram@gmail.com>
Co-authored-by: dhzh <88013318+kogecoindev@users.noreply.github.com>
  • Loading branch information
4 people committed Oct 3, 2021
1 parent d654a8c commit b245023
Show file tree
Hide file tree
Showing 22 changed files with 254 additions and 66 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ If you want to contribute, please refer to the [contributing guidelines](./CONTR
`yarn`

`yarn start`

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kogefarm-frontend",
"version": "0.1.0",
"version": "2.0.2",
"private": true,
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
Expand Down Expand Up @@ -69,6 +69,7 @@
"react-dom": "^17.0.1",
"react-feather": "^2.0.8",
"react-helmet-async": "^1.0.9",
"react-intersection-observer": "^8.32.1",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.1",
Expand Down
6 changes: 6 additions & 0 deletions src/components/Menu/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ export const config: MenuEntry[] = [
href: 'https://medium.com/@kogecoin',
group: 'Stay Tuned',
},
{
label: 'YouTube',
icon: 'YouTubeIcon',
href: 'https://www.youtube.com/channel/UCxfG3PjuWkqTCVdiUGVU8Vw',
group: 'Stay Tuned',
},
{
label: "Telegram",
icon: "TelegramIcon",
Expand Down
26 changes: 13 additions & 13 deletions src/components/Pancake/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ const Menu: React.FC<NavProps> = ({
const quoteTokenPriceUsd = prices[farm.quoteToken.coingeico.toLowerCase()]
let tokenPriceVsQuote = farm.rewardToken
? new BigNumber(prices[farm.rewardToken.coingeico.toLowerCase()]).div(
new BigNumber(prices[farm.quoteToken.coingeico.toLowerCase()]),
)
new BigNumber(prices[farm.quoteToken.coingeico.toLowerCase()]),
)
: new BigNumber(farm.tokenPriceVsQuote)
if (!farm.rewardToken && farm.token === farm.quoteToken) {
tokenPriceVsQuote = new BigNumber(1)
Expand All @@ -185,7 +185,7 @@ const Menu: React.FC<NavProps> = ({
let totalLiquidity = new BigNumber(farm.quoteTokenAmount).times(2)
if (farm.token === farm.quoteToken) {
totalLiquidity = new BigNumber(farm.lpTokenBalanceMC)
totalLiquidity = totalLiquidity.times(10 ** (18-decimal))
totalLiquidity = totalLiquidity.times(10 ** (18 - decimal))
}
const jarLPDeposits = new BigNumber(farm.jarLPDeposits)
// const jarRatioNum = new BigNumber(farm.jarRatio)
Expand All @@ -207,12 +207,12 @@ const Menu: React.FC<NavProps> = ({
let { rewardPerBlock, rewardPerBlock1 } = farm
// Special case: pSwamp
const masterChefAddress = getAddress(farm.masterChefAddresses)
if (masterChefAddress==='0x7d39705Cc041111275317f55B3A406ACC83615Bc' || masterChefAddress==='0x0706b1A8A1Eeb12Ce7fb1FFDC9A4b4cA31920Eae' || masterChefAddress==='0x9C515E2489749E2befA0B054EfCb3b34B2c7F432' || masterChefAddress==='0x94BE6A449a5c286734522FC6047484ac763c595C' || masterChefAddress==='0xd032Cb7a0225c62E5e26455dFE4eE8C87df254e3' || masterChefAddress==='0x7B6bA2709A597Bcbf7Ff54116c0E88DE5fe2C381' || masterChefAddress==='0x1c0a0927105140216425c84399E68F8B31E7510E'){
if (masterChefAddress === '0x7d39705Cc041111275317f55B3A406ACC83615Bc' || masterChefAddress === '0x0706b1A8A1Eeb12Ce7fb1FFDC9A4b4cA31920Eae' || masterChefAddress === '0x9C515E2489749E2befA0B054EfCb3b34B2c7F432' || masterChefAddress === '0x94BE6A449a5c286734522FC6047484ac763c595C' || masterChefAddress === '0xd032Cb7a0225c62E5e26455dFE4eE8C87df254e3' || masterChefAddress === '0x7B6bA2709A597Bcbf7Ff54116c0E88DE5fe2C381' || masterChefAddress === '0x1c0a0927105140216425c84399E68F8B31E7510E') {
rewardPerBlock1 *= new BigNumber(farm.lpTokenBalanceMC).toNumber()
}

if (farm.rewardToken1){
rewardPerBlock = (rewardPerBlock1*prices[farm.rewardToken1.coingeico.toLowerCase()] + farm.rewardPerBlock2*prices[farm.rewardToken2.coingeico.toLowerCase()])/prices[farm.quoteToken.coingeico.toLowerCase()]
if (farm.rewardToken1) {
rewardPerBlock = (rewardPerBlock1 * prices[farm.rewardToken1.coingeico.toLowerCase()] + farm.rewardPerBlock2 * prices[farm.rewardToken2.coingeico.toLowerCase()]) / prices[farm.quoteToken.coingeico.toLowerCase()]
tokenPriceVsQuote = new BigNumber(1)
}

Expand Down Expand Up @@ -289,18 +289,18 @@ const Menu: React.FC<NavProps> = ({
isDark={isDark}
href={homeLink?.href ?? "/"}
/>
{ !isMobile ? (
<Box ml="10px">
<Wordmark isDark={isDark} />
</Box> ) : null}
{!isMobile ? (
<Box ml="10px">
<Wordmark isDark={isDark} />
</Box>) : null}
</LogoContainer>

{ !isMobile ? (
{!isMobile ? (
<InfoContainer>
<Stat>
KogeCoin Price
{" "}
<span>${ kogePrice?.toLocaleString(undefined,{maximumFractionDigits:4}) ?? '-'}</span>
<span>${kogePrice?.toLocaleString(undefined, { maximumFractionDigits: 4 }) ?? '-'}</span>
</Stat>
<Stat>
{t('KogeFarm Vault TVL')}
Expand Down Expand Up @@ -331,7 +331,7 @@ const Menu: React.FC<NavProps> = ({
links={links}
/>
<Inner isPushed={isPushed} showMenu={showMenu}>
{ children }
{children}
</Inner>
</BodyWrapper>
</Wrapper>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Pancake/Menu/components/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const Logo: React.FC<Props> = ({ isPushed, togglePush, isDark, href }) => {
{innerLogo}
</StyledLink>
) : (
<StyledLink to={href} aria-label="KogeFarm home page">
<StyledLink as="a" href={href} aria-label="KogeFarm home page">
{innerLogo}
</StyledLink>
)}
Expand Down
18 changes: 13 additions & 5 deletions src/components/Pancake/Menu/components/PanelBody.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from "react";
import styled from "styled-components";
import styled, { useTheme } from "styled-components";
import { groupBy, uniqueId } from 'lodash'
import { useLocation } from "react-router-dom";
import { Tooltip } from "react-tippy";
import { Text } from "components/Pancake";
import Divider from "views/Farms/components/Divider";
import { SvgProps } from "../../Svg";
import * as IconModule from "../icons";
import Accordion from "./Accordion";
import { MenuEntry, LinkLabel, LinkStatus } from "./MenuEntry";
import MenuLink from "./MenuLink";
import { PanelProps, PushedProps } from "../types";
import { Tooltip } from "react-tippy";
import { Text } from "components/Pancake";

interface Props extends PanelProps, PushedProps {
isMobile: boolean;
Expand Down Expand Up @@ -50,6 +51,7 @@ border-radius: 4px;
`

const PanelBody: React.FC<Props> = ({ isPushed, pushNav, isMobile, links, showMenu }) => {
const theme = useTheme()
const location = useLocation();
const groupedLinks = groupBy(links, 'group')

Expand Down Expand Up @@ -79,7 +81,7 @@ const PanelBody: React.FC<Props> = ({ isPushed, pushNav, isMobile, links, showMe
position="right"
offset={-500}
html={(
<Tip>
<Tip style={{ padding: 12 }}>
<Text>{title}</Text>
</Tip>
)}
Expand All @@ -94,7 +96,13 @@ const PanelBody: React.FC<Props> = ({ isPushed, pushNav, isMobile, links, showMe
<Container showMenu={showMenu}>
{Object.entries(groupedLinks).map(([label, items]) => (
<React.Fragment key={uniqueId('frag-')}>
<Title key={uniqueId('title_')}>{label}</Title>
{
isPushed ? (
<Title key={uniqueId('title_')}>{label}</Title>
) : (
<Divider style={{ margin: "5px 0px", backgroundColor: theme.colors.tertiary }} />
)
}
{items.map(entry => {
const Icon = Icons[entry.icon];
const iconElement = <Icon width="24px" mr="8px" />;
Expand Down
7 changes: 7 additions & 0 deletions src/components/Pancake/Menu/icons/Youtube.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";
import Svg from "../../Svg/Svg";
import { SvgProps } from "../../Svg/types";

const Icon: React.FC<SvgProps> = (props) => {
return (
<Svg xmlns="http://www.w3.org/2000/svg" height="18" y="0" x="0" id="Layer_1" version="1.1" viewBox="-57.15 -21.25 495.3 127.5" {...props}><g id="g7433"><path id="path7429" d="M118.9 13.3c-1.4-5.2-5.5-9.3-10.7-10.7C98.7 0 60.7 0 60.7 0s-38 0-47.5 2.5C8.1 3.9 3.9 8.1 2.5 13.3 0 22.8 0 42.5 0 42.5s0 19.8 2.5 29.2C3.9 76.9 8 81 13.2 82.4 22.8 85 60.7 85 60.7 85s38 0 47.5-2.5c5.2-1.4 9.3-5.5 10.7-10.7 2.5-9.5 2.5-29.2 2.5-29.2s.1-19.8-2.5-29.3z" /><path id="polygon7431" fill="#fff" d="M48.6 24.3v36.4l31.6-18.2z" /></g><g id="g7451"><g id="g7449"><path id="path7435" d="M176.3 77.4c-2.4-1.6-4.1-4.1-5.1-7.6-1-3.4-1.5-8-1.5-13.6v-7.7c0-5.7.6-10.3 1.7-13.8 1.2-3.5 3-6 5.4-7.6 2.5-1.6 5.7-2.4 9.7-2.4 3.9 0 7.1.8 9.5 2.4 2.4 1.6 4.1 4.2 5.2 7.6 1.1 3.4 1.7 8 1.7 13.8v7.7c0 5.7-.5 10.2-1.6 13.7-1.1 3.4-2.8 6-5.2 7.6-2.4 1.6-5.7 2.4-9.8 2.4-4.2-.1-7.6-.9-10-2.5zm13.5-8.4c.7-1.7 1-4.6 1-8.5V43.9c0-3.8-.3-6.6-1-8.4-.7-1.8-1.8-2.6-3.5-2.6-1.6 0-2.8.9-3.4 2.6-.7 1.8-1 4.6-1 8.4v16.6c0 3.9.3 6.8 1 8.5.6 1.7 1.8 2.6 3.5 2.6 1.6 0 2.7-.8 3.4-2.6z" /><path id="path7437" d="M360.9 56.3V59c0 3.4.1 6 .3 7.7.2 1.7.6 3 1.3 3.7.6.8 1.6 1.2 3 1.2 1.8 0 3-.7 3.7-2.1.7-1.4 1-3.7 1.1-7l10.3.6c.1.5.1 1.1.1 1.9 0 4.9-1.3 8.6-4 11-2.7 2.4-6.5 3.6-11.4 3.6-5.9 0-10-1.9-12.4-5.6-2.4-3.7-3.6-9.4-3.6-17.2v-9.3c0-8 1.2-13.8 3.7-17.5 2.5-3.7 6.7-5.5 12.6-5.5 4.1 0 7.3.8 9.5 2.3 2.2 1.5 3.7 3.9 4.6 7 .9 3.2 1.3 7.6 1.3 13.2v9.1h-20.1zm1.5-22.4c-.6.8-1 2-1.2 3.7-.2 1.7-.3 4.3-.3 7.8v3.8h8.8v-3.8c0-3.4-.1-6-.3-7.8-.2-1.8-.7-3-1.3-3.7-.6-.7-1.6-1.1-2.8-1.1-1.4-.1-2.3.3-2.9 1.1z" /><path id="path7439" d="M147.1 55.3L133.5 6h11.9l4.8 22.3c1.2 5.5 2.1 10.2 2.7 14.1h.3c.4-2.8 1.3-7.4 2.7-14l5-22.4h11.9L159 55.3v23.6h-11.8V55.3z" /><path id="path7441" d="M241.6 25.7V79h-9.4l-1-6.5h-.3c-2.5 4.9-6.4 7.4-11.5 7.4-3.5 0-6.1-1.2-7.8-3.5-1.7-2.3-2.5-5.9-2.5-10.9V25.7h12v39.1c0 2.4.3 4.1.8 5.1s1.4 1.5 2.6 1.5c1 0 2-.3 3-1 1-.6 1.7-1.4 2.1-2.4V25.7z" /><path id="path7443" d="M303.1 25.7V79h-9.4l-1-6.5h-.3c-2.5 4.9-6.4 7.4-11.5 7.4-3.5 0-6.1-1.2-7.8-3.5-1.7-2.3-2.5-5.9-2.5-10.9V25.7h12v39.1c0 2.4.3 4.1.8 5.1s1.4 1.5 2.6 1.5c1 0 2-.3 3-1 1-.6 1.7-1.4 2.1-2.4V25.7z" /><path id="path7445" d="M274.2 15.7h-11.9v63.2h-11.7V15.7h-11.9V6h35.5z" /><path id="path7447" d="M342.8 34.2c-.7-3.4-1.9-5.8-3.5-7.3s-3.9-2.3-6.7-2.3c-2.2 0-4.3.6-6.2 1.9-1.9 1.2-3.4 2.9-4.4 4.9h-.1V3.3h-11.6v75.6h9.9l1.2-5h.3c.9 1.8 2.3 3.2 4.2 4.3 1.9 1 3.9 1.6 6.2 1.6 4.1 0 7-1.9 8.9-5.6 1.9-3.7 2.9-9.6 2.9-17.5v-8.4c-.1-6.1-.4-10.8-1.1-14.1zm-11 21.7c0 3.9-.2 6.9-.5 9.1-.3 2.2-.9 3.8-1.6 4.7-.8.9-1.8 1.4-3 1.4-1 0-1.9-.2-2.7-.7-.8-.5-1.5-1.2-2-2.1V38.1c.4-1.4 1.1-2.6 2.1-3.6 1-.9 2.1-1.4 3.2-1.4 1.2 0 2.2.5 2.8 1.4.7 1 1.1 2.6 1.4 4.8.3 2.3.4 5.5.4 9.6v7z" /></g></g></Svg>); }; export default Icon;
1 change: 1 addition & 0 deletions src/components/Pancake/Menu/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ export { default as TicketIcon } from "./Ticket";
export { default as TradeIcon } from "./Trade";
export { default as TwitterIcon } from "./Twitter";
export { default as Wordmark } from "./Wordmark";
export { default as YouTubeIcon } from "./Youtube";
1 change: 1 addition & 0 deletions src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const DropDownHeader = styled.div<{ isActive?: boolean }>`

const DropDownListContainer = styled.div`
min-width: 136px;
width: 100%;
height: 0;
position: absolute;
top: 45px;
Expand Down
2 changes: 2 additions & 0 deletions src/components/Tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ const CompoundingPoolTag = (props) => (
<Tag variant="success" outline startIcon={<AutoRenewIcon width="18px" color="success" mr="4px" />} {...props}>
Auto-Compounding
</Tag>

//ROUTERTAGHERE (VAULT_CREATION_AUTOMATOIN_DO_NOT_REMOVE)
)


Expand Down
1 change: 1 addition & 0 deletions src/config/constants/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default {
multiCall: {
137: '0xf9B80986470daAac7aa24fc36788B74E92CfD8c3',
80001: '0x7943e9e54215046d8E96F6f5F4B7A538DB98D8BF',
1285: '0xD266268782c10d2999C56D1f643A3531886769A8',
},
masterChef: {
137: '0x6275518a63e891b1bC54FEEBBb5333776E32fAbD',
Expand Down
2 changes: 1 addition & 1 deletion src/config/constants/farms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7361,7 +7361,7 @@ const farms: FarmConfig[] = [
multiplier: '0X',
platform: 'Iron'
},

//NEXTFARMHERE (VAULT_CREATION_AUTOMATOIN_DO_NOT_REMOVE)

/* {
pid: 2,
Expand Down
34 changes: 34 additions & 0 deletions src/config/constants/farms_mvr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import tokens from './tokens'
import { FarmConfig } from './types'

const farms: FarmConfig[] = [
{
pid: 20,
lpSymbol: 'USDC-Dai',
lpAddresses: {
80001: '',
137: '0xFE1b71BDAEE495dCA331D28F5779E87bd32FbE53',
},
masterChefAddresses: {
80001: '',
137: '0xf03b75831397D4695a6b9dDdEEA0E578faa30907',
},
masterChefPid: 8,
jarAddresses: {
80001: '',
137: '0x2a5d9C979deB9da7F5Bb208b94C704e31B18e423',
},
token: tokens.dai,
quoteToken: tokens.usdc,
rewardToken: tokens.solar,
rewardPerBlock: 3.95,
poolWeightDesignate: 270/11445,
minutesPerCompound: 60,
kogefarmFee: 0.01,
underlyingWebsite: 'https://solarbeam.io/',
platform: 'SolarBeam'
},

]

export default farms
12 changes: 12 additions & 0 deletions src/config/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const tokens = {
address: {
137: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
80001: '',
1285: '0xE3F5a90F9cb311505cd691a46596599aA1A0AD7D',
},
decimals: 6,
projectLink: 'https://www.centre.io/usdc',
Expand Down Expand Up @@ -214,6 +215,7 @@ const tokens = {
address: {
137: '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063',
80001: '',
1285: '0x80A16016cC4A2E6a2CACA8a4a498b1699fF0f844',
},
decimals: 18,
projectLink: '',
Expand Down Expand Up @@ -815,6 +817,16 @@ const tokens = {
},
decimals: 18,
},
solar: {
symbol: 'Solar',
coingeico: 'solar',
address: {
137: '',
80001: '',
1285: '0x6bD193Ee6D2104F14F94E2cA6efefae561A4334B',
},
decimals: 18,
},
}

export default tokens
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import App from './App'
import Providers from './Providers'

// Temporary fix to #94
if(process.env.NODE_ENV !== "development" && isMobile && !/m.kogefarm.io/.test(window.location.href)){
if (isMobile && !/m.kogefarm.io/.test(window.location.href) && /kogefarm.io/.test(window.location.href)) {
location.replace("https://m.kogefarm.io")
}

Expand Down
8 changes: 6 additions & 2 deletions src/state/prices/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export const fetchPrices = createAsyncThunk<PriceApiThunk>('prices/fetch', async
const collarMaticLP = '0xbBe5F4998Cc537A91e7b90C7925D1c7C5bAb7ee0'
const pbrewAddr = '0xb5106A3277718eCaD2F20aB6b86Ce0Fee7A21F09'
const pbrewMaticLP = '0x4f03233c742Ea20e73b46d5E33242b7770274ab8'
//LPTOKENADDRESSHERE (VAULT_CREATION_AUTOMATOIN_DO_NOT_REMOVE)
//HARVESTTOKENADDRESSESHERE (VAULT_CREATION_AUTOMATOIN_DO_NOT_REMOVE)
// Curve
const amDai = '0x27f8d03b3a2196956ed754badc28d73be8830a6e'
const amUSDC = '0x1a13f4ca1d028320a707d99520abfefca3998b7f'
Expand Down Expand Up @@ -132,6 +134,7 @@ export const fetchPrices = createAsyncThunk<PriceApiThunk>('prices/fetch', async
const atricrypto2LP = '0xbece5d20A8a104c54183CC316C8286E3F00ffC71'
const poolATriCrypto3 = '0x92215849c439E1f8612b6646060B4E3E5ef822cC'
const atricrypto3LP = '0xdAD97F7713Ae9437fa9249920eC8507e5FbB23d3'
//LPTOKENADDRESSHERE
// kogeremaining
const kogeFund = '0x6A82FdE3033a969cf1ECe48D76aA942E9Fc567Db'
/* const usdtAddr = '0xc2132D05D31c914a87C6611C10748AEb04B58e8F'
Expand Down Expand Up @@ -732,8 +735,8 @@ export const fetchPrices = createAsyncThunk<PriceApiThunk>('prices/fetch', async
address: maticAddr,
name: 'balanceOf',
params: [pbrewMaticLP],
},
]
},//NEWCALLHERE (VAULT_CREATION_AUTOMATOIN_DO_NOT_REMOVE)
]//CALLARRENDSHERE (VAULT_CREATION_AUTOMATOIN_DO_NOT_REMOVE)
const [maticBalanceUM, usdcBalanceUM, kogeBalanceLP, maticTokenBalanceLP, ethBalance, ethMaticBalance, quickBalance, quickMaticBalance, totalLPSupply, titanBalanceLP, maticBalanceLP, ironBalanceLP, usdcBalanceIron, bootyBalanceLP, maticBalanceBooty, fishBalance,maticFish, wexBalanceLP,usdcWex,miMaticQidaoUSDC,usdcmiMaticQidao, miMaticQidao,qidaoMiMatic, omenBalance, omenUSDCBalance, yeldBalance, yeldUSDCBalance, crystlBalance, crystalMaticBalance, pyqBalance, pyqUSDCBalance, rollBalance, rollMaticBalance, boneBalance, boneMaticBalance, pupBalance, pupMaticBalance, btcBalance, btcUSDCBalance, boneswapBalance, boneswapMaticBalance, pwingsBalance, pwingsMaticBalance, gfiBalance, gfiEthBalance, iceBalance, iceUSDCBalance, crvBalance, crvWETHBalance, vertBalance, vertUSDCBalance, dinoBalance, dinoUSDCBalance, pswampBalance, pswampMaticBalance, lithiumBalance, lithiumMaticBalance, linkBalance, linkEthBalance, sushiBalance, sushiEthBalance, ballBalance, ballMaticBalance, bananaBalance, bananaMaticBalance, myfriendsBalance, myfriendsUSDCBalance, arcadiumBalance, arcadiumUSDCBalance, shieldBalance, shieldMaticBalance, irisBalance, irisMaticBalance, alphaBalance, alphaMaticBalance, spadeBalance, spadeUSDCBalance, elkBalance, maticBalanceElk, collarBalance, collarMaticBalance, pbrewBalance, pbrewMaticBalance] = await multicall(erc20, calls)

const [curve3poolSupply, amDaiCurve, amUSDCCurve, amUSDTCurve, iron3poolSupply, daiIron, usdcIron, usdtIron, iron4poolSupply, i3usdIron4pool, ironIron4pool, btcrenbtcSupply, amWBTCCurve, amRenBTCCurve, atricryptoSupply, amWBTCatricrypto, amWETHatricrypto, am3CRVatricrypto, atricrypto2Supply, amWBTCatricrypto2, amWETHatricrypto2, am3CRVatricrypto2, atricrypto3Supply, amWBTCatricrypto3, amWETHatricrypto3, am3CRVatricrypto3, kogeBal] = await multicall(erc20, curveCalls)
Expand Down Expand Up @@ -785,6 +788,7 @@ export const fetchPrices = createAsyncThunk<PriceApiThunk>('prices/fetch', async
const collarMatic = collarBalance/collarMaticBalance
const pbrewMatic = pbrewBalance/pbrewMaticBalance
const kogeRemaining = kogeBal/10**9;
//MATICUSDCPRICEHERE (VAULT_CREATION_AUTOMATOIN_DO_NOT_REMOVE)

// Get Matic price
const maticUSD = (usdcBalanceUM*10**12)/maticBalanceUM
Expand Down
17 changes: 10 additions & 7 deletions src/views/Farms/Farms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ const Farms: React.FC = () => {
const userDataReady = !account || (!!account && userDataLoaded)

const [stakedOnly, setStakedOnly] = useState(!isActive)
// useEffect(() => {
// setStakedOnly(!isActive)
// }, [isActive])
useEffect(() => {
setStakedOnly(!isActive)
}, [isActive])

useEffect(() => {
// Makes the main scheduled fetching to request archived farms data
Expand Down Expand Up @@ -241,7 +241,7 @@ const Farms: React.FC = () => {
)

const farmsList = useCallback(
(farmsToDisplay: Farm[], filterQuery?:boolean): FarmWithStakedValue[] => {
(farmsToDisplay: Farm[], filterQuery?: boolean): FarmWithStakedValue[] => {
let farmsToDisplayWithAPR: FarmWithStakedValue[] = farmsToDisplay.map((farm) => {
/* DZ Hack
if (!farm.lpTotalInQuoteToken || !prices) {
Expand Down Expand Up @@ -643,7 +643,12 @@ const Farms: React.FC = () => {


const handleItemClick = activeIndex => {
setMultiSearch(activeIndex)
const search = multiSearch
if (search.has('platform')) {
setMultiSearch(new Set<any>(activeIndex).add('platform'))
} else {
setMultiSearch(new Set(activeIndex))
}
setIsSearching(!isSearching)
setSortOption('multi')
}
Expand Down Expand Up @@ -679,8 +684,6 @@ const Farms: React.FC = () => {
<StyledText fontSize="14px" mb="14px">
{t('KogeFarm helps you earn more yield by ')}
{' '}
{isDesktop ? <AutoCompound /> : null}
{' '}
<Tooltip
trigger="mouseenter"
position="bottom"
Expand Down

0 comments on commit b245023

Please sign in to comment.