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

Remove isClaiming flag #2586

Merged
merged 1 commit into from
Mar 24, 2022
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
19 changes: 8 additions & 11 deletions src/custom/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import Modal from 'components/Modal'
// import ClaimModal from 'components/claim/ClaimModal'
import UniBalanceContent from 'components/Header/UniBalanceContent'
import CowClaimButton from 'components/CowClaimButton'
import { IS_CLAIMING_ENABLED } from 'pages/Claim/const'

export const NETWORK_LABELS: { [chainId in ChainId]?: string } = {
[ChainId.RINKEBY]: 'Rinkeby',
Expand Down Expand Up @@ -276,16 +275,14 @@ export default function Header() {
<NetworkSelector />
</HeaderElement>
<HeaderElement>
{IS_CLAIMING_ENABLED && (
<VCowWrapper>
<CowClaimButton
isClaimPage={isClaimPage}
account={account}
chainId={chainId}
handleOnClickClaim={handleOnClickClaim}
/>
</VCowWrapper>
)}
<VCowWrapper>
<CowClaimButton
isClaimPage={isClaimPage}
account={account}
chainId={chainId}
handleOnClickClaim={handleOnClickClaim}
/>
</VCowWrapper>

<AccountElement active={!!account} style={{ pointerEvents: 'auto' }}>
{account && userEthBalance && (
Expand Down
15 changes: 6 additions & 9 deletions src/custom/components/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { getExplorerAddressLink } from 'utils/explorer'
import { useHasOrders } from 'api/gnosisProtocol/hooks'
import { useHistory } from 'react-router-dom'
import CowClaimButton, { Wrapper as ClaimButtonWrapper } from 'components/CowClaimButton'
import { IS_CLAIMING_ENABLED } from 'pages/Claim/const'

import twitterImage from 'assets/cow-swap/twitter.svg'
import discordImage from 'assets/cow-swap/discord.svg'
Expand Down Expand Up @@ -291,14 +290,12 @@ export function Menu({ darkMode, toggleDarkMode, isClaimPage }: MenuProps) {
return (
<StyledMenu isClaimPage={isClaimPage}>
<MenuFlyout>
{IS_CLAIMING_ENABLED && (
<CowClaimButton
isClaimPage={isClaimPage}
handleOnClickClaim={handleOnClickClaim}
account={account}
chainId={chainId}
/>
)}
<CowClaimButton
isClaimPage={isClaimPage}
handleOnClickClaim={handleOnClickClaim}
account={account}
chainId={chainId}
/>

<ResponsiveInternalMenuItem to="/" onClick={close}>
<Repeat size={14} /> Swap
Expand Down
3 changes: 1 addition & 2 deletions src/custom/pages/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { version } from '@src/../package.json'
import { environmentName } from 'utils/environments'
import { useFilterEmptyQueryParams } from 'hooks/useFilterEmptyQueryParams'
import RedirectAnySwapAffectedUsers from 'pages/error/AnySwapAffectedUsers/RedirectAnySwapAffectedUsers'
import { IS_CLAIMING_ENABLED } from 'pages/Claim/const'

const SENTRY_DSN = process.env.REACT_APP_SENTRY_DSN
const SENTRY_TRACES_SAMPLE_RATE = process.env.REACT_APP_SENTRY_TRACES_SAMPLE_RATE
Expand Down Expand Up @@ -84,7 +83,7 @@ export default function App() {
<Route exact strict path="/swap" component={Swap} />
<Route exact strict path="/swap/:outputCurrency" component={RedirectToSwap} />
<Route exact strict path="/send" component={RedirectPathToSwapOnly} />
{IS_CLAIMING_ENABLED && <Route exact strict path="/claim" component={Claim} />}
<Route exact strict path="/claim" component={Claim} />
<Route exact strict path="/about" component={About} />
<Route exact strict path="/profile" component={Profile} />
<Route exact strict path="/faq" component={Faq} />
Expand Down
1 change: 0 additions & 1 deletion src/custom/pages/Claim/const.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { isProd, isEns, isBarn } from 'utils/environments'

export const IS_CLAIMING_ENABLED = !isBarn
export const IS_TESTING_ENV = !isProd && !isEns && !isBarn