Skip to content

Commit

Permalink
chore: remove layer3
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Oct 26, 2023
1 parent b1960dc commit f965cf4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useAtom, useAtomValue, useSetAtom } from 'jotai'
import React, { useMemo } from 'react'

import { OrderKind } from '@cowprotocol/cow-sdk'
import { Layer3Banner } from '@cowprotocol/ui'

import { Field } from 'legacy/state/types'

Expand All @@ -16,7 +15,6 @@ import { BulletListItem, UnlockWidgetScreen } from 'modules/trade/pure/UnlockWid
import { TradeFormValidation, useGetTradeFormValidation } from 'modules/tradeFormValidation'
import { useSetTradeQuoteParams, useTradeQuote } from 'modules/tradeQuote'

import { FeatureGuard } from 'common/containers/FeatureGuard'
import { useRateInfoParams } from 'common/hooks/useRateInfoParams'
import { CurrencyInfo } from 'common/pure/CurrencyInputPanel/types'

Expand Down Expand Up @@ -258,9 +256,6 @@ const LimitOrders = React.memo((props: LimitOrdersProps) => {
inputCurrencyInfo={inputCurrencyInfo}
outputCurrencyInfo={outputCurrencyInfo}
/>
<FeatureGuard featureFlag="layer3BannerEnabled">
<Layer3Banner />
</FeatureGuard>
{tradeContext && (
<LimitOrdersConfirmModal
tradeContext={tradeContext}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useMemo, useState } from 'react'

import { isFractionFalsy } from '@cowprotocol/common-utils'
import { Layer3Banner } from '@cowprotocol/ui'
import { useIsSafeViaWc, useWalletDetails, useWalletInfo } from '@cowprotocol/wallet'

import { NetworkAlert } from 'legacy/components/NetworkAlert/NetworkAlert'
Expand Down Expand Up @@ -37,7 +36,6 @@ import { useTradeRouteContext } from 'modules/trade/hooks/useTradeRouteContext'
import { useWrappedToken } from 'modules/trade/hooks/useWrappedToken'
import { useTradeUsdAmounts } from 'modules/usdAmount'

import { FeatureGuard } from 'common/containers/FeatureGuard'
import { useRateInfoParams } from 'common/hooks/useRateInfoParams'
import { useShouldZeroApprove } from 'common/hooks/useShouldZeroApprove'
import { CurrencyInfo } from 'common/pure/CurrencyInputPanel/types'
Expand Down Expand Up @@ -274,10 +272,6 @@ export function SwapWidget() {
inputCurrencyInfo={inputCurrencyInfo}
outputCurrencyInfo={outputCurrencyInfo}
/>
<FeatureGuard featureFlag="layer3BannerEnabled">
<Layer3Banner addMargin={true} />
</FeatureGuard>

<NetworkAlert />
</TradeWidgetContainer>
</>
Expand Down
3 changes: 2 additions & 1 deletion libs/ui/src/pure/Layer3Banner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const Wrapper = styled.div<Layer3BannerProps>`
`

export interface Layer3BannerProps {
questId: string
addMargin?: boolean
}

Expand All @@ -15,7 +16,7 @@ export function Layer3Banner(props: Layer3BannerProps) {
<Helmet>
<script src="https://layer3.xyz/embed.js" defer></script>
</Helmet>
<div className="layer3-quest layer3-card" data-quest-id="halloween-cowswap"></div>
<div className="layer3-quest layer3-card" data-quest-id={props.questId}></div>
</Wrapper>
)
}

0 comments on commit f965cf4

Please sign in to comment.