{
@@ -400,20 +396,12 @@ export default function Landing() {
- {isAndroidGALaunched ? (
- <>
-
- Download the Uniswap app
- >
- ) : (
- <>
-
- Download the Uniswap app for iOS
- >
- )}
+ <>
+
+ Download the Uniswap app
+ >
diff --git a/src/state/routing/slice.ts b/src/state/routing/slice.ts
index 9d9836d33f..2661674649 100644
--- a/src/state/routing/slice.ts
+++ b/src/state/routing/slice.ts
@@ -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
) {
diff --git a/src/state/routing/types.ts b/src/state/routing/types.ts
index da78c1ad3b..44b84c4e8b 100644
--- a/src/state/routing/types.ts
+++ b/src/state/routing/types.ts
@@ -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
diff --git a/src/state/routing/useRoutingAPITrade.test.ts b/src/state/routing/useRoutingAPITrade.test.ts
index b58f8b9c70..93f027b8f8 100644
--- a/src/state/routing/useRoutingAPITrade.test.ts
+++ b/src/state/routing/useRoutingAPITrade.test.ts
@@ -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,
}
diff --git a/src/utils/openDownloadApp.ts b/src/utils/openDownloadApp.ts
index b1d35b0ad6..a981172d57 100644
--- a/src/utils/openDownloadApp.ts
+++ b/src/utils/openDownloadApp.ts
@@ -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 })
},
}
}
diff --git a/src/utils/userAgent.ts b/src/utils/userAgent.ts
index 86d38cc36a..5d56487417 100644
--- a/src/utils/userAgent.ts
+++ b/src/utils/userAgent.ts
@@ -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')