Skip to content

Commit

Permalink
Merge branch 'master' of github.com:QuickSwap/interface-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sameepsi committed Dec 5, 2021
2 parents 582294b + b6deb26 commit a1b18d8
Show file tree
Hide file tree
Showing 8 changed files with 690 additions and 433 deletions.
6 changes: 0 additions & 6 deletions src/assets/images/blindeye.svg

This file was deleted.

68 changes: 67 additions & 1 deletion src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,72 @@ export const DERC = new Token(
'DERC',
'DeRace Token',
);

export const KIRO = new Token(
ChainId.MATIC,
'0xB382C1cfA622795a534e5bd56Fac93d59BAc8B0D',
18,
'KIRO',
'Kirobo',
);
export const RNDR = new Token(
ChainId.MATIC,
'0x61299774020dA444Af134c82fa83E3810b309991',
18,
'RNDR',
'Render Token',
);

export const WCRO = new Token(
ChainId.MATIC,
'0xf2D8124b8F9267DaD61351c7aD252362880C6638',
18,
'WCRO',
'Wrapped CRO',
);
export const PECO = new Token(
ChainId.MATIC,
'0xA9536B9c75A9E0faE3B56a96AC8EdF76AbC91978',
18,
'PECO',
'Polygon Ecosystem Index',
);
export const WELT = new Token(
ChainId.MATIC,
'0x23E8B6A3f6891254988B84Da3738D2bfe5E703b9',
18,
'WELT',
'FABWELT',
);
export const MASQ = new Token(
ChainId.MATIC,
'0xEe9A352F6aAc4aF1A5B9f467F6a93E0ffBe9Dd35',
18,
'MASQ',
'MASQ',
);
export const ELIXIR = new Token(
ChainId.MATIC,
'0xED0bb69f9F96E8C5FffdF16c468eceC385134eA5',
18,
'ELIXIR',
'Starchi Liquid Luck',
);
export const ZIG = new Token(
ChainId.MATIC,
'0x7BeBd226154E865954A87650FAefA8F485d36081',
18,
'ZIG',
'ZigCoin',
);
export const MANA = new Token(
ChainId.MATIC,
'0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4',
18,
'MANA',
'Decentraland MANA',
);

export const MATIC = WETH[ChainId.MATIC];
// TODO this is only approximate, it's actually based on blocks
export const PROPOSAL_LENGTH_IN_DAYS = 7;
Expand Down Expand Up @@ -1676,4 +1742,4 @@ export const BETTER_TRADE_LINK_THRESHOLD = new Percent(

// the Uniswap Default token list lives here
export const DEFAULT_TOKEN_LIST_URL =
'https://unpkg.com/[email protected].4/build/quickswap-default.tokenlist.json';
'https://unpkg.com/[email protected].9/build/quickswap-default.tokenlist.json';
2 changes: 1 addition & 1 deletion src/constants/lists.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// the Quickswap Default token list lives here
export const DEFAULT_TOKEN_LIST_URL =
'https://unpkg.com/[email protected].3/build/quickswap-default.tokenlist.json';
'https://unpkg.com/[email protected].9/build/quickswap-default.tokenlist.json';

export const DEFAULT_LIST_OF_LISTS: string[] = [DEFAULT_TOKEN_LIST_URL];
80 changes: 59 additions & 21 deletions src/pages/FarmPage/FarmPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useMemo, useState } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { Box, Typography, Grid, Divider } from '@material-ui/core';
import { VisibilityOff, Visibility } from '@material-ui/icons';
import { TokenAmount, JSBI } from '@uniswap/sdk';
import { useStakingInfo } from 'state/stake/hooks';
import { FarmCard, ToggleSwitch } from 'components';
Expand All @@ -10,7 +11,6 @@ import { unwrappedToken } from 'utils/wrappedCurrency';
import { EMPTY } from 'constants/index';
import { ReactComponent as HelpIcon } from 'assets/images/HelpIcon1.svg';
import { ReactComponent as SearchIcon } from 'assets/images/SearchIcon.svg';
import BlindEyeIcon from 'assets/images/blindeye.svg';
import ArrowUpIcon from 'assets/images/arrowup.svg';
import { useTotalSupplys } from 'data/TotalSupply';

Expand Down Expand Up @@ -109,6 +109,8 @@ const FarmPage: React.FC = () => {
const stakingInfos = useStakingInfo();
const [stakedOnly, setStakeOnly] = useState(false);
const [farmSearch, setFarmSearch] = useState('');
const [hideDeposit, setHideDeposit] = useState(false);
const [hideRewards, setHideRewards] = useState(false);
const baseCurrencies = stakingInfos.map((stakingInfo) => {
const token0 = stakingInfo.tokens[0];
const baseTokenCurrency = unwrappedToken(stakingInfo.baseToken);
Expand Down Expand Up @@ -271,9 +273,11 @@ const FarmPage: React.FC = () => {
alignItems='flex-start'
justifyContent='space-between'
>
<Typography variant='caption' color='secondary'>
Reward Rate:
</Typography>
<Box height={16} display='flex' alignItems='center'>
<Typography variant='caption' color='secondary'>
Reward Rate:
</Typography>
</Box>
<Box mt={1} display='flex' flexDirection='row' alignItems='flex-end'>
<Typography variant='body1'>
{rewardRate.toLocaleString()} dQUICK
Expand All @@ -289,10 +293,12 @@ const FarmPage: React.FC = () => {
alignItems='flex-start'
justifyContent='space-between'
>
<Typography variant='caption' color='secondary'>
Total Rewards:
</Typography>
<Box mt={1} display='flex' flexDirection='row' alignItems='flex-end'>
<Box height={16} display='flex' alignItems='center'>
<Typography variant='caption' color='secondary'>
Total Rewards:
</Typography>
</Box>
<Box mt={1} display='flex' alignItems='flex-end'>
<Typography variant='body1'>
${totalRewardsUSD.toLocaleString()}
</Typography>
Expand All @@ -304,10 +310,12 @@ const FarmPage: React.FC = () => {
alignItems='flex-start'
justifyContent='space-between'
>
<Typography variant='caption' color='secondary'>
24h Fees:
</Typography>
<Box mt={1} display='flex' flexDirection='row' alignItems='flex-end'>
<Box height={16} display='flex' alignItems='center'>
<Typography variant='caption' color='secondary'>
24h Fees:
</Typography>
</Box>
<Box mt={1} display='flex' alignItems='flex-end'>
<Typography variant='body1'>
${totalFee.toLocaleString()}
</Typography>
Expand All @@ -319,16 +327,31 @@ const FarmPage: React.FC = () => {
alignItems='flex-start'
justifyContent='space-between'
>
<Box display='flex' flexDirection='row' alignItems='center'>
<Box display='flex' height={16} alignItems='center'>
<Typography variant='caption' color='secondary'>
My deposits:
</Typography>
<Box ml={1} style={{ height: '15px' }}>
<img src={BlindEyeIcon} alt={'blind eye deposits'} />
<Box
ml={0.5}
display='flex'
color='#696c80'
onClick={() => {
setHideDeposit(!hideDeposit);
}}
>
{hideDeposit ? (
<VisibilityOff style={{ width: 16, height: 16 }} />
) : (
<Visibility style={{ width: 16, height: 16 }} />
)}
</Box>
</Box>
<Box mt={1} display='flex' flexDirection='row' alignItems='flex-end'>
<Typography variant='body1'>${myDeposits}</Typography>
<Box mt={1} display='flex' alignItems='flex-end'>
{hideDeposit ? (
<Box width={70} height={24} bgcolor='#1b1e29' />
) : (
<Typography variant='body1'>${myDeposits}</Typography>
)}
</Box>
</Box>
<Box
Expand All @@ -337,16 +360,31 @@ const FarmPage: React.FC = () => {
alignItems='flex-start'
justifyContent='space-between'
>
<Box display='flex' flexDirection='row' alignItems='center'>
<Box display='flex' height={16} alignItems='center'>
<Typography variant='caption' color='secondary'>
Unclaimed rewards:
</Typography>
<Box ml={1} style={{ height: '15px' }}>
<img src={BlindEyeIcon} alt={'blind eye deposits'} />
<Box
ml={0.5}
display='flex'
color='#696c80'
onClick={() => {
setHideRewards(!hideRewards);
}}
>
{hideRewards ? (
<VisibilityOff style={{ width: 16, height: 16 }} />
) : (
<Visibility style={{ width: 16, height: 16 }} />
)}
</Box>
</Box>
<Box mt={1} display='flex' flexDirection='row' alignItems='flex-end'>
<Typography variant='body1'>{unclaimedRewards} dQUICK</Typography>
{hideRewards ? (
<Box width={75} height={24} bgcolor='#1b1e29' />
) : (
<Typography variant='body1'>{unclaimedRewards} dQUICK</Typography>
)}
</Box>
<Box mt={0.5}>
<Typography className={classes.thirdColor} variant='body2'>
Expand Down
18 changes: 10 additions & 8 deletions src/pages/LandingPage/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,17 +467,17 @@ const LandingPage: React.FC = () => {
title: 'Reddit',
},
{
link: '',
link: 'https://discord.com/invite/XJTM7FV88Y',
icon: <DiscordIcon />,
title: 'Discord',
},
{
link: '',
link: 'https://twitter.com/QuickswapDEX',
icon: <TwitterIcon />,
title: 'Twitter',
},
{
link: '',
link: 'https://quickswap-layer2.medium.com/',
icon: <MediumIcon />,
title: 'Medium',
},
Expand All @@ -487,12 +487,12 @@ const LandingPage: React.FC = () => {
title: 'Youtube',
},
{
link: '',
link: 'https://t.me/QuickSwapDEX',
icon: <TelegramIcon />,
title: 'Telegram',
},
{
link: '',
link: 'https://www.coingecko.com/en/exchanges/quickswap',
icon: <CoingeckoIcon />,
title: 'CoinGecko',
},
Expand Down Expand Up @@ -707,9 +707,11 @@ const LandingPage: React.FC = () => {
</Box>
<Box className={classes.smallCommunityContainer}>
{socialicons.map((val, ind) => (
<Box display='flex' mx={1.5} key={ind}>
{val.icon}
</Box>
<a href={val.link} target='_blank' key={ind} rel='noreferrer'>
<Box display='flex' mx={1.5}>
{val.icon}
</Box>
</a>
))}
</Box>
<Box mt={2}>
Expand Down
2 changes: 1 addition & 1 deletion src/state/lists/reducer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ describe('list reducer', () => {
expect(store.getState()).toEqual({
byUrl: {},
selectedListUrl:
'https://unpkg.com/[email protected].3/build/quickswap-default.tokenlist.json',
'https://unpkg.com/[email protected].9/build/quickswap-default.tokenlist.json',
});
});
});
Expand Down
Loading

0 comments on commit a1b18d8

Please sign in to comment.