fix: remove 3 launched feature flags (#7589)
* fix: remove 3 launched feature flags * fix: remove unused componnent * fix: remove another apple logo
This commit is contained in:
parent
0aa5727cdd
commit
2e618fb2aa
@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 22.773 22.773" style="enable-background:new 0 0 22.773 22.773;" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M15.769,0c0.053,0,0.106,0,0.162,0c0.13,1.606-0.483,2.806-1.228,3.675c-0.731,0.863-1.732,1.7-3.351,1.573
|
||||
c-0.108-1.583,0.506-2.694,1.25-3.561C13.292,0.879,14.557,0.16,15.769,0z"/>
|
||||
<path d="M20.67,16.716c0,0.016,0,0.03,0,0.045c-0.455,1.378-1.104,2.559-1.896,3.655c-0.723,0.995-1.609,2.334-3.191,2.334
|
||||
c-1.367,0-2.275-0.879-3.676-0.903c-1.482-0.024-2.297,0.735-3.652,0.926c-0.155,0-0.31,0-0.462,0
|
||||
c-0.995-0.144-1.798-0.932-2.383-1.642c-1.725-2.098-3.058-4.808-3.306-8.276c0-0.34,0-0.679,0-1.019
|
||||
c0.105-2.482,1.311-4.5,2.914-5.478c0.846-0.52,2.009-0.963,3.304-0.765c0.555,0.086,1.122,0.276,1.619,0.464
|
||||
c0.471,0.181,1.06,0.502,1.618,0.485c0.378-0.011,0.754-0.208,1.135-0.347c1.116-0.403,2.21-0.865,3.652-0.648
|
||||
c1.733,0.262,2.963,1.032,3.723,2.22c-1.466,0.933-2.625,2.339-2.427,4.74C17.818,14.688,19.086,15.964,20.67,16.716z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.5 KiB |
@ -1,5 +1,4 @@
|
||||
import { InterfaceElementName } from '@uniswap/analytics-events'
|
||||
import { useAndroidGALaunchFlagEnabled } from 'featureFlags/flags/androidGALaunch'
|
||||
import { PropsWithChildren, useCallback } from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { ClickableStyle } from 'theme/components'
|
||||
@ -42,12 +41,11 @@ export function DownloadButton({
|
||||
text?: string
|
||||
element: InterfaceElementName
|
||||
}) {
|
||||
const isAndroidGALaunched = useAndroidGALaunchFlagEnabled()
|
||||
const onButtonClick = useCallback(() => {
|
||||
// handles any actions required by the parent, i.e. cancelling wallet connection attempt or dismissing an ad
|
||||
onClick?.()
|
||||
openDownloadApp({ element, isAndroidGALaunched })
|
||||
}, [element, isAndroidGALaunched, onClick])
|
||||
openDownloadApp({ element })
|
||||
}, [element, onClick])
|
||||
|
||||
return (
|
||||
<BaseButton branded onClick={onButtonClick}>
|
||||
|
@ -9,7 +9,6 @@ import { uniwalletWCV2ConnectConnection } from 'connection'
|
||||
import { ActivationStatus, useActivationState } from 'connection/activate'
|
||||
import { ConnectionType } from 'connection/types'
|
||||
import { UniwalletConnect as UniwalletConnectV2 } from 'connection/WalletConnectV2'
|
||||
import { useAndroidGALaunchFlagEnabled } from 'featureFlags/flags/androidGALaunch'
|
||||
import { QRCodeSVG } from 'qrcode.react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import styled, { useTheme } from 'styled-components'
|
||||
@ -43,9 +42,8 @@ export default function UniwalletModal() {
|
||||
const { activationState, cancelActivation } = useActivationState()
|
||||
const [uri, setUri] = useState<string>()
|
||||
|
||||
const isAndroidGALaunched = useAndroidGALaunchFlagEnabled()
|
||||
// Displays the modal if not on iOS/Android, a Uniswap Wallet Connection is pending, & qrcode URI is available
|
||||
const onLaunchedMobilePlatform = isIOS || (isAndroidGALaunched && isAndroid)
|
||||
const onLaunchedMobilePlatform = isIOS || isAndroid
|
||||
const open =
|
||||
!onLaunchedMobilePlatform &&
|
||||
activationState.status === ActivationStatus.PENDING &&
|
||||
@ -105,8 +103,6 @@ const InfoSectionWrapper = styled(RowBetween)`
|
||||
`
|
||||
|
||||
function InfoSection() {
|
||||
const isAndroidGALaunched = useAndroidGALaunchFlagEnabled()
|
||||
|
||||
return (
|
||||
<InfoSectionWrapper>
|
||||
<AutoColumn gap="4px">
|
||||
@ -114,13 +110,7 @@ function InfoSection() {
|
||||
<Trans>Don't have a Uniswap wallet?</Trans>
|
||||
</ThemedText.SubHeaderSmall>
|
||||
<ThemedText.BodySmall color="neutral2">
|
||||
{isAndroidGALaunched ? (
|
||||
<Trans>Safely store and swap tokens with the Uniswap app. Available on iOS and Android.</Trans>
|
||||
) : (
|
||||
<Trans>
|
||||
Download in the App Store to safely store your tokens and NFTs, swap tokens, and connect to crypto apps.
|
||||
</Trans>
|
||||
)}
|
||||
</ThemedText.BodySmall>
|
||||
</AutoColumn>
|
||||
<Column>
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import { InterfaceElementName } from '@uniswap/analytics-events'
|
||||
import { useAndroidGALaunchFlagEnabled } from 'featureFlags/flags/androidGALaunch'
|
||||
import { useScreenSize } from 'hooks/useScreenSize'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { useHideAndroidAnnouncementBanner } from 'state/user/hooks'
|
||||
@ -31,14 +30,12 @@ export default function AndroidAnnouncementBanner() {
|
||||
const shouldDisplay = Boolean(!hideAndroidAnnouncementBanner && !isLandingScreen)
|
||||
const isDarkMode = useIsDarkMode()
|
||||
|
||||
const isAndroidGALaunched = useAndroidGALaunchFlagEnabled()
|
||||
const onClick = () =>
|
||||
openDownloadApp({
|
||||
element: InterfaceElementName.UNISWAP_WALLET_BANNER_DOWNLOAD_BUTTON,
|
||||
isAndroidGALaunched,
|
||||
})
|
||||
|
||||
if (!isAndroidGALaunched || isMobileSafari) return null
|
||||
if (isMobileSafari) return null
|
||||
|
||||
return (
|
||||
<PopupContainer show={shouldDisplay}>
|
||||
|
@ -3,7 +3,6 @@ import Column from 'components/Column'
|
||||
import { BaseVariant, FeatureFlag, featureFlagSettings, useUpdateConfig, useUpdateFlag } from 'featureFlags'
|
||||
import { DynamicConfigName } from 'featureFlags/dynamicConfig'
|
||||
import { useQuickRouteChains } from 'featureFlags/dynamicConfig/quickRouteChains'
|
||||
import { useAndroidGALaunchFlag } from 'featureFlags/flags/androidGALaunch'
|
||||
import { useCurrencyConversionFlag } from 'featureFlags/flags/currencyConversion'
|
||||
import { useFallbackProviderEnabledFlag } from 'featureFlags/flags/fallbackProvider'
|
||||
import { useInfoExploreFlag } from 'featureFlags/flags/infoExplore'
|
||||
@ -16,8 +15,6 @@ import { useProgressIndicatorV2Flag } from 'featureFlags/flags/progressIndicator
|
||||
import { useQuickRouteMainnetFlag } from 'featureFlags/flags/quickRouteMainnet'
|
||||
import { TraceJsonRpcVariant, useTraceJsonRpcFlag } from 'featureFlags/flags/traceJsonRpc'
|
||||
import { useUniswapXDefaultEnabledFlag } from 'featureFlags/flags/uniswapXDefault'
|
||||
import { useUniswapXEthOutputFlag } from 'featureFlags/flags/uniswapXEthOutput'
|
||||
import { useUniswapXExactOutputFlag } from 'featureFlags/flags/uniswapXExactOutput'
|
||||
import { useUniswapXSyntheticQuoteFlag } from 'featureFlags/flags/uniswapXUseSyntheticQuote'
|
||||
import { useFeesEnabledFlag } from 'featureFlags/flags/useFees'
|
||||
import { useUpdateAtom } from 'jotai/utils'
|
||||
@ -305,12 +302,6 @@ export default function FeatureFlagModal() {
|
||||
featureFlag={FeatureFlag.progressIndicatorV2}
|
||||
label="Refreshed swap progress indicator"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={BaseVariant}
|
||||
value={useAndroidGALaunchFlag()}
|
||||
featureFlag={FeatureFlag.androidGALaunch}
|
||||
label="Android Nov 14th GA launch"
|
||||
/>
|
||||
<FeatureFlagGroup name="Quick routes">
|
||||
<FeatureFlagOption
|
||||
variant={BaseVariant}
|
||||
@ -333,18 +324,6 @@ export default function FeatureFlagModal() {
|
||||
featureFlag={FeatureFlag.uniswapXSyntheticQuote}
|
||||
label="Force synthetic quotes for UniswapX"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={BaseVariant}
|
||||
value={useUniswapXEthOutputFlag()}
|
||||
featureFlag={FeatureFlag.uniswapXEthOutputEnabled}
|
||||
label="Enable eth output for UniswapX orders"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={BaseVariant}
|
||||
value={useUniswapXExactOutputFlag()}
|
||||
featureFlag={FeatureFlag.uniswapXExactOutputEnabled}
|
||||
label="Enable exact output for UniswapX orders"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={BaseVariant}
|
||||
value={useUniswapXDefaultEnabledFlag()}
|
||||
|
@ -1,8 +0,0 @@
|
||||
export const AppleLogo = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
<svg viewBox="0 0 814 1000" {...props}>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"
|
||||
/>
|
||||
</svg>
|
||||
)
|
@ -1,9 +1,7 @@
|
||||
import { t, Trans } from '@lingui/macro'
|
||||
import { InterfaceElementName } from '@uniswap/analytics-events'
|
||||
import { ReactComponent as AppleLogo } from 'assets/svg/apple_logo.svg'
|
||||
import FeatureFlagModal from 'components/FeatureFlagModal/FeatureFlagModal'
|
||||
import { PrivacyPolicyModal } from 'components/PrivacyPolicy'
|
||||
import { useAndroidGALaunchFlagEnabled } from 'featureFlags/flags/androidGALaunch'
|
||||
import { useOnClickOutside } from 'hooks/useOnClickOutside'
|
||||
import { Box } from 'nft/components/Box'
|
||||
import { Column, Row } from 'nft/components/Flex'
|
||||
@ -132,8 +130,6 @@ export const MenuDropdown = () => {
|
||||
const ref = useRef<HTMLDivElement>(null)
|
||||
useOnClickOutside(ref, isOpen ? toggleOpen : undefined)
|
||||
|
||||
const isAndroidGALaunched = useAndroidGALaunchFlagEnabled()
|
||||
|
||||
return (
|
||||
<>
|
||||
<Box position="relative" ref={ref} marginRight="4">
|
||||
@ -175,12 +171,10 @@ export const MenuDropdown = () => {
|
||||
onClick={() =>
|
||||
openDownloadApp({
|
||||
element: InterfaceElementName.UNISWAP_WALLET_NAVBAR_MENU_DOWNLOAD_BUTTON,
|
||||
isAndroidGALaunched,
|
||||
})
|
||||
}
|
||||
>
|
||||
<PrimaryMenuRow close={toggleOpen}>
|
||||
{isAndroidGALaunched ? (
|
||||
<>
|
||||
<Icon>
|
||||
<UniswapAppLogo width="24px" height="24px" />
|
||||
@ -194,16 +188,6 @@ export const MenuDropdown = () => {
|
||||
</ThemedText.LabelSmall>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Icon>
|
||||
<AppleLogo width="24px" height="24px" fill={theme.neutral1} />
|
||||
</Icon>
|
||||
<PrimaryMenuRow.Text>
|
||||
<Trans>Download Uniswap app</Trans>
|
||||
</PrimaryMenuRow.Text>
|
||||
</>
|
||||
)}
|
||||
</PrimaryMenuRow>
|
||||
</Box>
|
||||
</Column>
|
||||
|
@ -6,7 +6,6 @@ import { AutoRow } from 'components/Row'
|
||||
import { connections, deprecatedNetworkConnection, networkConnection } from 'connection'
|
||||
import { ActivationStatus, useActivationState } from 'connection/activate'
|
||||
import { isSupportedChain } from 'constants/chains'
|
||||
import { useAndroidGALaunchFlagEnabled } from 'featureFlags/flags/androidGALaunch'
|
||||
import { useFallbackProviderEnabled } from 'featureFlags/flags/fallbackProvider'
|
||||
import { useEffect } from 'react'
|
||||
import styled from 'styled-components'
|
||||
@ -41,7 +40,6 @@ const PrivacyPolicyWrapper = styled.div`
|
||||
|
||||
export default function WalletModal({ openSettings }: { openSettings: () => void }) {
|
||||
const { connector, chainId } = useWeb3React()
|
||||
const isAndroidGALaunched = useAndroidGALaunchFlagEnabled()
|
||||
|
||||
const { activationState } = useActivationState()
|
||||
const fallbackProviderEnabled = useFallbackProviderEnabled()
|
||||
@ -68,7 +66,7 @@ export default function WalletModal({ openSettings }: { openSettings: () => void
|
||||
<AutoColumn gap="16px">
|
||||
<OptionGrid data-testid="option-grid">
|
||||
{connections
|
||||
.filter((connection) => connection.shouldDisplay(isAndroidGALaunched))
|
||||
.filter((connection) => connection.shouldDisplay())
|
||||
.map((connection) => (
|
||||
<Option key={connection.getName()} connection={connection} />
|
||||
))}
|
||||
|
@ -11,7 +11,7 @@ import COINBASE_ICON from 'assets/wallets/coinbase-icon.svg'
|
||||
import UNIWALLET_ICON from 'assets/wallets/uniswap-wallet-icon.png'
|
||||
import WALLET_CONNECT_ICON from 'assets/wallets/walletconnect-icon.svg'
|
||||
import { useSyncExternalStore } from 'react'
|
||||
import { isMobile, isNonIOSPhone, isNonSupportedPhone } from 'utils/userAgent'
|
||||
import { isMobile, isNonSupportedPhone } from 'utils/userAgent'
|
||||
|
||||
import { RPC_URLS } from '../constants/networks'
|
||||
import { DEPRECATED_RPC_PROVIDERS, RPC_PROVIDERS } from '../constants/providers'
|
||||
@ -149,8 +149,7 @@ export const uniwalletWCV2ConnectConnection: Connection = {
|
||||
hooks: web3WCV2UniwalletConnectHooks,
|
||||
type: ConnectionType.UNISWAP_WALLET_V2,
|
||||
getIcon: () => UNIWALLET_ICON,
|
||||
shouldDisplay: (isAndroidGALaunched) =>
|
||||
Boolean(!getIsInjectedMobileBrowser() && (isAndroidGALaunched ? !isNonSupportedPhone : !isNonIOSPhone)),
|
||||
shouldDisplay: () => Boolean(!getIsInjectedMobileBrowser() && !isNonSupportedPhone),
|
||||
}
|
||||
|
||||
const [web3CoinbaseWallet, web3CoinbaseWalletHooks] = initializeConnector<CoinbaseWallet>(
|
||||
|
@ -26,6 +26,6 @@ export interface Connection {
|
||||
hooks: Web3ReactHooks
|
||||
type: ConnectionType
|
||||
getIcon?(isDarkMode: boolean): string
|
||||
shouldDisplay(isAndroidGALaunched?: boolean): boolean
|
||||
shouldDisplay(): boolean
|
||||
overrideActivate?: (chainId?: ChainId) => boolean
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
import { BaseVariant, FeatureFlag, useBaseFlag } from '../index'
|
||||
|
||||
export function useAndroidGALaunchFlag(): BaseVariant {
|
||||
return useBaseFlag(FeatureFlag.androidGALaunch)
|
||||
}
|
||||
|
||||
// todo(kristiehuang): add statsig flag after staging goes out
|
||||
export function useAndroidGALaunchFlagEnabled(): boolean {
|
||||
return useAndroidGALaunchFlag() === BaseVariant.Enabled
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
import { BaseVariant, FeatureFlag, useBaseFlag } from '../index'
|
||||
|
||||
export function useUniswapXEthOutputFlag(): BaseVariant {
|
||||
return useBaseFlag(FeatureFlag.uniswapXEthOutputEnabled)
|
||||
}
|
||||
|
||||
export function useUniswapXEthOutputEnabled(): boolean {
|
||||
return useUniswapXEthOutputFlag() === BaseVariant.Enabled
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
import { BaseVariant, FeatureFlag, useBaseFlag } from '../index'
|
||||
|
||||
export function useUniswapXExactOutputFlag(): BaseVariant {
|
||||
return useBaseFlag(FeatureFlag.uniswapXExactOutputEnabled)
|
||||
}
|
||||
|
||||
export function useUniswapXExactOutputEnabled(): boolean {
|
||||
return useUniswapXExactOutputFlag() === BaseVariant.Enabled
|
||||
}
|
@ -10,8 +10,6 @@ export enum FeatureFlag {
|
||||
debounceSwapQuote = 'debounce_swap_quote',
|
||||
fallbackProvider = 'fallback_provider',
|
||||
uniswapXSyntheticQuote = 'uniswapx_synthetic_quote',
|
||||
uniswapXEthOutputEnabled = 'uniswapx_eth_output_enabled',
|
||||
uniswapXExactOutputEnabled = 'uniswapx_exact_output_enabled',
|
||||
multichainUX = 'multichain_ux',
|
||||
currencyConversion = 'currency_conversion',
|
||||
infoExplore = 'info_explore',
|
||||
@ -22,7 +20,6 @@ export enum FeatureFlag {
|
||||
quickRouteMainnet = 'enable_quick_route_mainnet',
|
||||
progressIndicatorV2 = 'progress_indicator_v2',
|
||||
feesEnabled = 'fees_enabled',
|
||||
androidGALaunch = 'android_ga_launch',
|
||||
limitsEnabled = 'limits_enabled',
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { SkipToken, skipToken } from '@reduxjs/toolkit/query/react'
|
||||
import { Currency, CurrencyAmount, TradeType } from '@uniswap/sdk-core'
|
||||
import { useUniswapXDefaultEnabled } from 'featureFlags/flags/uniswapXDefault'
|
||||
import { useUniswapXEthOutputEnabled } from 'featureFlags/flags/uniswapXEthOutput'
|
||||
import { useUniswapXExactOutputEnabled } from 'featureFlags/flags/uniswapXExactOutput'
|
||||
import { useUniswapXSyntheticQuoteEnabled } from 'featureFlags/flags/uniswapXUseSyntheticQuote'
|
||||
import { useFeesEnabled } from 'featureFlags/flags/useFees'
|
||||
import { useMemo } from 'react'
|
||||
@ -33,8 +31,6 @@ export function useRoutingAPIArguments({
|
||||
const uniswapXForceSyntheticQuotes = useUniswapXSyntheticQuoteEnabled()
|
||||
const userDisabledUniswapX = useUserDisabledUniswapX()
|
||||
const userOptedOutOfUniswapX = useUserOptedOutOfUniswapX()
|
||||
const uniswapXEthOutputEnabled = useUniswapXEthOutputEnabled()
|
||||
const uniswapXExactOutputEnabled = useUniswapXExactOutputEnabled()
|
||||
const isUniswapXDefaultEnabled = useUniswapXDefaultEnabled()
|
||||
|
||||
const feesEnabled = useFeesEnabled()
|
||||
@ -62,8 +58,6 @@ export function useRoutingAPIArguments({
|
||||
uniswapXForceSyntheticQuotes,
|
||||
userDisabledUniswapX,
|
||||
userOptedOutOfUniswapX,
|
||||
uniswapXEthOutputEnabled,
|
||||
uniswapXExactOutputEnabled,
|
||||
isUniswapXDefaultEnabled,
|
||||
sendPortionEnabled,
|
||||
},
|
||||
@ -74,11 +68,9 @@ export function useRoutingAPIArguments({
|
||||
tokenIn,
|
||||
tokenOut,
|
||||
tradeType,
|
||||
uniswapXExactOutputEnabled,
|
||||
uniswapXForceSyntheticQuotes,
|
||||
userDisabledUniswapX,
|
||||
userOptedOutOfUniswapX,
|
||||
uniswapXEthOutputEnabled,
|
||||
isUniswapXDefaultEnabled,
|
||||
sendPortionEnabled,
|
||||
]
|
||||
|
@ -2165,15 +2165,11 @@ exports[`disable nft on landing page does not render nft information and card 1`
|
||||
>
|
||||
<svg
|
||||
height="20"
|
||||
viewBox="0 0 814 1000"
|
||||
width="20"
|
||||
>
|
||||
<path
|
||||
d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
uniswap_app_logo.svg
|
||||
</svg>
|
||||
Download the Uniswap app for iOS
|
||||
Download the Uniswap app
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
@ -4825,15 +4821,11 @@ exports[`disable nft on landing page renders nft information and card 1`] = `
|
||||
>
|
||||
<svg
|
||||
height="20"
|
||||
viewBox="0 0 814 1000"
|
||||
width="20"
|
||||
>
|
||||
<path
|
||||
d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
uniswap_app_logo.svg
|
||||
</svg>
|
||||
Download the Uniswap app for iOS
|
||||
Download the Uniswap app
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
|
@ -8,8 +8,6 @@ import { MAIN_CARDS, MORE_CARDS } from 'components/About/constants'
|
||||
import ProtocolBanner from 'components/About/ProtocolBanner'
|
||||
import { useAccountDrawer } from 'components/AccountDrawer'
|
||||
import { BaseButton } from 'components/Button'
|
||||
import { AppleLogo } from 'components/Logo/AppleLogo'
|
||||
import { useAndroidGALaunchFlagEnabled } from 'featureFlags/flags/androidGALaunch'
|
||||
import { useDisableNFTRoutes } from 'hooks/useDisableNFTRoutes'
|
||||
import Swap from 'pages/Swap'
|
||||
import { parse } from 'qs'
|
||||
@ -322,8 +320,6 @@ export default function Landing() {
|
||||
[shouldDisableNFTRoutes]
|
||||
)
|
||||
|
||||
const isAndroidGALaunched = useAndroidGALaunchFlagEnabled()
|
||||
|
||||
const [accountDrawerOpen] = useAccountDrawer()
|
||||
const navigate = useNavigate()
|
||||
useEffect(() => {
|
||||
@ -400,20 +396,12 @@ export default function Landing() {
|
||||
<DownloadWalletLink
|
||||
{...getDownloadAppLinkProps({
|
||||
element: InterfaceElementName.UNISWAP_WALLET_LANDING_PAGE_DOWNLOAD_BUTTON,
|
||||
isAndroidGALaunched,
|
||||
})}
|
||||
>
|
||||
{isAndroidGALaunched ? (
|
||||
<>
|
||||
<UniswapAppLogo width="20" height="20" />
|
||||
Download the Uniswap app
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<AppleLogo width="20" height="20" />
|
||||
Download the Uniswap app for iOS
|
||||
</>
|
||||
)}
|
||||
</DownloadWalletLink>
|
||||
</ContentContainer>
|
||||
<AboutContentContainer isDarkMode={isDarkMode}>
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { createApi, fetchBaseQuery, FetchBaseQueryError } from '@reduxjs/toolkit/query/react'
|
||||
import { Protocol } from '@uniswap/router-sdk'
|
||||
import { TradeType } from '@uniswap/sdk-core'
|
||||
import { sendAnalyticsEvent } from 'analytics'
|
||||
import { isUniswapXSupportedChain } from 'constants/chains'
|
||||
import ms from 'ms'
|
||||
@ -14,7 +13,6 @@ import {
|
||||
QuoteState,
|
||||
RouterPreference,
|
||||
RoutingConfig,
|
||||
SwapRouterNativeAssets,
|
||||
TradeResult,
|
||||
URAQuoteResponse,
|
||||
URAQuoteType,
|
||||
@ -45,16 +43,7 @@ function getQuoteLatencyMeasure(mark: PerformanceMark): PerformanceMeasure {
|
||||
}
|
||||
|
||||
function getRoutingAPIConfig(args: GetQuoteArgs): RoutingConfig {
|
||||
const {
|
||||
account,
|
||||
tradeType,
|
||||
tokenOutAddress,
|
||||
tokenInChainId,
|
||||
uniswapXForceSyntheticQuotes,
|
||||
uniswapXEthOutputEnabled,
|
||||
uniswapXExactOutputEnabled,
|
||||
routerPreference,
|
||||
} = args
|
||||
const { account, tokenInChainId, uniswapXForceSyntheticQuotes, routerPreference } = args
|
||||
|
||||
const uniswapx = {
|
||||
useSyntheticQuotes: uniswapXForceSyntheticQuotes,
|
||||
@ -72,15 +61,9 @@ function getRoutingAPIConfig(args: GetQuoteArgs): RoutingConfig {
|
||||
enableFeeOnTransferFeeFetching: true,
|
||||
}
|
||||
|
||||
const tokenOutIsNative = Object.values(SwapRouterNativeAssets).includes(tokenOutAddress as SwapRouterNativeAssets)
|
||||
|
||||
// UniswapX doesn't support native out, exact-out, or non-mainnet trades (yet),
|
||||
// so even if the user has selected UniswapX as their router preference, force them to receive a Classic quote.
|
||||
if (
|
||||
// If the user has opted out of UniswapX during the opt-out transition period, we should respect that preference and only request classic quotes.
|
||||
(args.userOptedOutOfUniswapX && routerPreference !== RouterPreference.X) ||
|
||||
(tokenOutIsNative && !uniswapXEthOutputEnabled) ||
|
||||
(!uniswapXExactOutputEnabled && tradeType === TradeType.EXACT_OUTPUT) ||
|
||||
!isUniswapXSupportedChain(tokenInChainId) ||
|
||||
routerPreference === INTERNAL_ROUTER_PREFERENCE_PRICE
|
||||
) {
|
||||
|
@ -43,8 +43,6 @@ export interface GetQuoteArgs {
|
||||
tradeType: TradeType
|
||||
needsWrapIfUniswapX: boolean
|
||||
uniswapXForceSyntheticQuotes: boolean
|
||||
uniswapXEthOutputEnabled: boolean
|
||||
uniswapXExactOutputEnabled: boolean
|
||||
// legacy field indicating the user disabled UniswapX during the opt-in period, or dismissed the UniswapX opt-in modal.
|
||||
userDisabledUniswapX: boolean
|
||||
// temporary field indicating the user disabled UniswapX during the transition to the opt-out model
|
||||
|
@ -4,8 +4,6 @@ import { CurrencyAmount, TradeType } from '@uniswap/sdk-core'
|
||||
import { AVERAGE_L1_BLOCK_TIME } from 'constants/chainInfo'
|
||||
import { USDC_MAINNET } from 'constants/tokens'
|
||||
import { useUniswapXDefaultEnabled } from 'featureFlags/flags/uniswapXDefault'
|
||||
import { useUniswapXEthOutputEnabled } from 'featureFlags/flags/uniswapXEthOutput'
|
||||
import { useUniswapXExactOutputEnabled } from 'featureFlags/flags/uniswapXExactOutput'
|
||||
import { useUniswapXSyntheticQuoteEnabled } from 'featureFlags/flags/uniswapXUseSyntheticQuote'
|
||||
import { useFeesEnabled } from 'featureFlags/flags/useFees'
|
||||
import useIsWindowVisible from 'hooks/useIsWindowVisible'
|
||||
@ -31,8 +29,6 @@ jest.mock('./slice', () => {
|
||||
})
|
||||
jest.mock('state/user/hooks')
|
||||
jest.mock('featureFlags/flags/uniswapXUseSyntheticQuote')
|
||||
jest.mock('featureFlags/flags/uniswapXEthOutput')
|
||||
jest.mock('featureFlags/flags/uniswapXExactOutput')
|
||||
jest.mock('featureFlags/flags/uniswapXDefault')
|
||||
jest.mock('featureFlags/flags/useFees')
|
||||
|
||||
@ -42,8 +38,6 @@ beforeEach(() => {
|
||||
mocked(useUniswapXSyntheticQuoteEnabled).mockReturnValue(false)
|
||||
mocked(useUserDisabledUniswapX).mockReturnValue(false)
|
||||
mocked(useUserOptedOutOfUniswapX).mockReturnValue(false)
|
||||
mocked(useUniswapXEthOutputEnabled).mockReturnValue(false)
|
||||
mocked(useUniswapXExactOutputEnabled).mockReturnValue(false)
|
||||
mocked(useUniswapXDefaultEnabled).mockReturnValue(false)
|
||||
mocked(useFeesEnabled).mockReturnValue(true)
|
||||
// @ts-ignore we dont use the response from this hook in useRoutingAPITrade so fine to mock as undefined
|
||||
@ -74,8 +68,6 @@ const MOCK_ARGS: GetQuoteArgs = {
|
||||
uniswapXForceSyntheticQuotes: false,
|
||||
userDisabledUniswapX: false,
|
||||
userOptedOutOfUniswapX: false,
|
||||
uniswapXEthOutputEnabled: false,
|
||||
uniswapXExactOutputEnabled: false,
|
||||
isUniswapXDefaultEnabled: false,
|
||||
sendPortionEnabled: true,
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ export const MICROSITE_LINK = 'https://wallet.uniswap.org/'
|
||||
|
||||
type OpenDownloadAppOptions = {
|
||||
element: InterfaceElementName
|
||||
isAndroidGALaunched: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
@ -28,10 +27,10 @@ type OpenDownloadAppOptions = {
|
||||
*
|
||||
* I've added a helper `getDownloadAppLinkProps` that unifies this behavior into one thing.
|
||||
*/
|
||||
export function openDownloadApp({ element, isAndroidGALaunched }: OpenDownloadAppOptions) {
|
||||
export function openDownloadApp({ element }: OpenDownloadAppOptions) {
|
||||
if (isIOS) {
|
||||
openDownloadStore({ element, appPlatform: AppDownloadPlatform.IOS, linkTarget: 'uniswap_wallet_appstore' })
|
||||
} else if (isAndroidGALaunched && isAndroid) {
|
||||
} else if (isAndroid) {
|
||||
openDownloadStore({ element, appPlatform: AppDownloadPlatform.ANDROID, linkTarget: 'uniswap_wallet_playstore' })
|
||||
} else {
|
||||
sendAnalyticsEvent(InterfaceEventName.UNISWAP_WALLET_MICROSITE_OPENED, { element })
|
||||
@ -39,12 +38,12 @@ export function openDownloadApp({ element, isAndroidGALaunched }: OpenDownloadAp
|
||||
}
|
||||
}
|
||||
|
||||
export const getDownloadAppLinkProps = ({ element, isAndroidGALaunched }: OpenDownloadAppOptions) => {
|
||||
export const getDownloadAppLinkProps = ({ element }: OpenDownloadAppOptions) => {
|
||||
return {
|
||||
href: APP_DOWNLOAD_LINKS[element],
|
||||
onClick(e: { preventDefault: () => void }) {
|
||||
e.preventDefault()
|
||||
openDownloadApp({ element, isAndroidGALaunched })
|
||||
openDownloadApp({ element })
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ export const isMobile = type === 'mobile' || type === 'tablet'
|
||||
const platform = parser.getOS().name
|
||||
export const isIOS = platform === 'iOS'
|
||||
export const isAndroid = platform === 'Android'
|
||||
export const isNonIOSPhone = !isIOS && type === 'mobile'
|
||||
export const isNonSupportedPhone = !isIOS && !isAndroid && type === 'mobile'
|
||||
|
||||
export const isMobileSafari = isMobile && isIOS && name?.toLowerCase().includes('safari')
|
||||
|
Loading…
Reference in New Issue
Block a user