ci(release): publish latest release

parent 6f70e0b1
IPFS hash of the deployment: IPFS hash of the deployment:
- CIDv0: `QmTpccVs1zJ53DxsUVGfYDtekJLEkYkcz7ytv7ztQLAQoK` - CIDv0: `QmSR8nYexuW3tYLMY62XR3PCG7tcT9QWpeVkHNX6wnZn3p`
- CIDv1: `bafybeicrorjzrhlzqcfsojgjsfofublb2gz6s3nl7v2r2vefkxe5ws7w6i` - CIDv1: `bafybeib4stith4o7l5dyd5uejt25qoxfndl57qj2gfc5sgpsmpe6lcb3y4`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org). The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
...@@ -10,15 +10,54 @@ You can also access the Uniswap Interface from an IPFS gateway. ...@@ -10,15 +10,54 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs. Your Uniswap settings are never remembered across different URLs.
IPFS gateways: IPFS gateways:
- https://bafybeicrorjzrhlzqcfsojgjsfofublb2gz6s3nl7v2r2vefkxe5ws7w6i.ipfs.dweb.link/ - https://bafybeib4stith4o7l5dyd5uejt25qoxfndl57qj2gfc5sgpsmpe6lcb3y4.ipfs.dweb.link/
- https://bafybeicrorjzrhlzqcfsojgjsfofublb2gz6s3nl7v2r2vefkxe5ws7w6i.ipfs.cf-ipfs.com/ - https://bafybeib4stith4o7l5dyd5uejt25qoxfndl57qj2gfc5sgpsmpe6lcb3y4.ipfs.cf-ipfs.com/
- [ipfs://QmTpccVs1zJ53DxsUVGfYDtekJLEkYkcz7ytv7ztQLAQoK/](ipfs://QmTpccVs1zJ53DxsUVGfYDtekJLEkYkcz7ytv7ztQLAQoK/) - [ipfs://QmSR8nYexuW3tYLMY62XR3PCG7tcT9QWpeVkHNX6wnZn3p/](ipfs://QmSR8nYexuW3tYLMY62XR3PCG7tcT9QWpeVkHNX6wnZn3p/)
### 5.28.1 (2024-05-22) ## 5.29.0 (2024-05-22)
### Features
* **web:** [multichain] show limits page in disabled state (#8164) df50ab0
* **web:** add PDP rich link previews (#8003) 564b6e1
* **web:** avoid fetching redundant on-chain receipts (#7508) 0cc8511
* **web:** unicon v2 education label (#8339) 1487fbd
* **web:** update wallet connect modal's color mode with app theme (#7993) 38a9308
### Bug Fixes ### Bug Fixes
* **web:** lowercase unicon flag 626ec60 * **web:** add null check to OSCollectionsFetcher (#8188) e5077c0
* **web:** Allow viewing pool mgmt pages when disconnected (#8239) 0ac09da
* **web:** change gap on landing page (#8175) f98a7e8
* **web:** change You pay and You receive to Buy and Sell (#8198) 601d1d9
* **web:** chart dot grid size (#8085) cf94701
* **web:** check client chain for undefined (#8215) 03697e7
* **web:** check for supported network on pools page (#8224) 5c7d58d
* **web:** filtering out spam on send (#8386) (#8405) 2775043
* **web:** fix limits price parsing bug in different locales (#8199) b9613d9
* **web:** fix SEO metatags (#8286) c294e33
* **web:** hotfixing mouseover bug (#8402) 8c5cf28
* **web:** lowercase unicon flag 02dcbf7
* **web:** prevent connection from hanging when iframed - staging (#8394) 80ed62c
* **web:** set initial user state in cypress tests using localStorage (#8189) 941d8fe
* **web:** Show unsupported network in navbar (#8181) 7746ac4
* **web:** support multichain input params (#8250) 110976e
* **web:** window.ethereum fallback on mobile [prod] (#8261) 8b791cc
### Tests
* **web:** remove explicit blocknumbers (#8162) 4a83a6f
### Code Refactoring
* **web:** refactor NFT sell flow to use wagmi (#7636) 2ebaf2c
* **web:** screen size hooks (#8100) 9593763
* **web:** Use wagmi for add/remove liquidity and collecting fees (#7641) 6448ae2
* **web:** use wagmi for NFT Buys (#7633) f472ce0
* **web:** Use wagmi for Swap and Limit Order flow (#7779) 832d7ff
web/5.28.1 web/5.29.0
\ No newline at end of file \ No newline at end of file
...@@ -29,7 +29,11 @@ class RNEthersRSModule(reactContext: ReactApplicationContext) : ReactContextBase ...@@ -29,7 +29,11 @@ class RNEthersRSModule(reactContext: ReactApplicationContext) : ReactContextBase
override fun getName() = "RNEthersRS" override fun getName() = "RNEthersRS"
@ReactMethod fun getMnemonicIds(promise: Promise) { @ReactMethod fun getMnemonicIds(promise: Promise) {
promise.resolve(ethersRs.mnemonicIds) val array = WritableNativeArray()
ethersRs.mnemonicIds.forEach {
array.pushString(it)
}
promise.resolve(array)
} }
@ReactMethod fun importMnemonic(mnemonic: String, promise: Promise) { @ReactMethod fun importMnemonic(mnemonic: String, promise: Promise) {
......
...@@ -28,10 +28,10 @@ class RnEthersRs(applicationContext: Context) { ...@@ -28,10 +28,10 @@ class RnEthersRs(applicationContext: Context) {
) )
} }
val mnemonicIds: Array<String> val mnemonicIds: List<String>
get() = keychain.all.keys.map { get() = keychain.all.keys.map {
key -> key.replace(ENTIRE_MNEMONIC_PREFIX, "") key -> key.replace(ENTIRE_MNEMONIC_PREFIX, "")
}.toTypedArray() }
/** /**
* Imports a mnemonic and returns the associated address. * Imports a mnemonic and returns the associated address.
......
import { by, element, expect } from 'detox' import { by, element, expect } from 'detox'
import { TestWallet } from 'e2e/utils/fixtures' import { TestWallet } from 'e2e/utils/fixtures'
import { ElementName } from 'wallet/src/telemetry/constants' import { ElementName } from 'uniswap/src/features/telemetry/constants'
export function CreateNewWallet(): void { export function CreateNewWallet(): void {
it('creates a new wallet', async () => { it('creates a new wallet', async () => {
......
import { by, element, expect } from 'detox' import { by, element, expect } from 'detox'
import { TestWallet } from 'e2e/utils/fixtures' import { TestWallet } from 'e2e/utils/fixtures'
import { ElementName } from 'wallet/src/telemetry/constants' import { ElementName } from 'uniswap/src/features/telemetry/constants'
export async function CreateNewWallet(): Promise<void> { export async function CreateNewWallet(): Promise<void> {
// Selects "Create a new wallet" option on the landing screen // Selects "Create a new wallet" option on the landing screen
......
import { by, element, expect } from 'detox' import { by, element, expect } from 'detox'
import { TestWallet } from 'e2e/utils/fixtures' import { TestWallet } from 'e2e/utils/fixtures'
import { ElementName } from 'wallet/src/telemetry/constants' import { ElementName } from 'uniswap/src/features/telemetry/constants'
export async function ImportWallet(): Promise<void> { export async function ImportWallet(): Promise<void> {
// Selects "Add an existing wallet" option on the landing screen // Selects "Add an existing wallet" option on the landing screen
......
import { by, element, expect } from 'detox' import { by, element, expect } from 'detox'
import { TestWatchedWallet } from 'e2e/utils/fixtures' import { TestWatchedWallet } from 'e2e/utils/fixtures'
import { ElementName } from 'wallet/src/telemetry/constants' import { ElementName } from 'uniswap/src/features/telemetry/constants'
export async function WatchWallet(): Promise<void> { export async function WatchWallet(): Promise<void> {
// Selects "Add an existing wallet" option on the landing screen // Selects "Add an existing wallet" option on the landing screen
......
import { by, element, expect } from 'detox' import { by, element, expect } from 'detox'
import { TestWatchedWallet } from 'e2e/utils/fixtures' import { TestWatchedWallet } from 'e2e/utils/fixtures'
import { ElementName } from 'wallet/src/telemetry/constants' import { ElementName } from 'uniswap/src/features/telemetry/constants'
export async function SwapBasicInteractions(): Promise<void> { export async function SwapBasicInteractions(): Promise<void> {
// Navigate to swap screen // Navigate to swap screen
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
"link:assets": "react-native-asset", "link:assets": "react-native-asset",
"graphql:generate:swift": "cd ios && ./Pods/Apollo/apollo-ios-cli generate", "graphql:generate:swift": "cd ios && ./Pods/Apollo/apollo-ios-cli generate",
"hardhat": "hardhat node", "hardhat": "hardhat node",
"check:circular": "../../scripts/check-circular-imports.sh ./src/app/App.tsx 8", "check:circular": "../../scripts/check-circular-imports.sh ./src/app/App.tsx 7",
"ios": "yarn ios:prebuild && SKIP_BUNDLING=1 react-native run-ios", "ios": "yarn ios:prebuild && SKIP_BUNDLING=1 react-native run-ios",
"ios:prebuild": "yarn graphql:generate:swift && cd ios/WidgetsCore/MobileSchema && rm -rf !(README.md) && cd ../../.. && yarn graphql:generate:swift && yarn env:local:copy:swift", "ios:prebuild": "yarn graphql:generate:swift && cd ios/WidgetsCore/MobileSchema && rm -rf !(README.md) && cd ../../.. && yarn graphql:generate:swift && yarn env:local:copy:swift",
"ios:smol": "SKIP_BUNDLING=1 react-native run-ios --simulator=\"iPhone SE (3rd generation)\"", "ios:smol": "SKIP_BUNDLING=1 react-native run-ios --simulator=\"iPhone SE (3rd generation)\"",
...@@ -131,7 +131,6 @@ ...@@ -131,7 +131,6 @@
"react-native-pager-view": "6.0.1", "react-native-pager-view": "6.0.1",
"react-native-permissions": "3.6.0", "react-native-permissions": "3.6.0",
"react-native-reanimated": "3.8.1", "react-native-reanimated": "3.8.1",
"react-native-restart": "0.0.27",
"react-native-safe-area-context": "4.9.0", "react-native-safe-area-context": "4.9.0",
"react-native-screens": "3.30.1", "react-native-screens": "3.30.1",
"react-native-splash-screen": "3.3.0", "react-native-splash-screen": "3.3.0",
...@@ -184,12 +183,10 @@ ...@@ -184,12 +183,10 @@
"postinstall-postinstall": "2.1.0", "postinstall-postinstall": "2.1.0",
"react-devtools": "4.28.0", "react-devtools": "4.28.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-native-apollo-devtools-client": "1.0.4",
"react-native-asset": "2.1.1", "react-native-asset": "2.1.1",
"react-native-clean-project": "4.0.1", "react-native-clean-project": "4.0.1",
"react-native-dotenv": "3.2.0", "react-native-dotenv": "3.2.0",
"react-native-flipper": "0.212.0", "react-native-flipper": "0.212.0",
"react-native-mmkv-flipper-plugin": "1.0.0",
"react-native-monorepo-tools": "1.2.1", "react-native-monorepo-tools": "1.2.1",
"react-native-svg-transformer": "1.3.0", "react-native-svg-transformer": "1.3.0",
"react-test-renderer": "18.2.0", "react-test-renderer": "18.2.0",
......
...@@ -2,16 +2,17 @@ import { ApolloProvider } from '@apollo/client' ...@@ -2,16 +2,17 @@ import { ApolloProvider } from '@apollo/client'
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet' import { BottomSheetModalProvider } from '@gorhom/bottom-sheet'
import * as Sentry from '@sentry/react-native' import * as Sentry from '@sentry/react-native'
import { PerformanceProfiler, RenderPassReport } from '@shopify/react-native-performance' import { PerformanceProfiler, RenderPassReport } from '@shopify/react-native-performance'
import { MMKVWrapper } from 'apollo3-cache-persist'
import { PropsWithChildren, default as React, StrictMode, useCallback, useEffect } from 'react' import { PropsWithChildren, default as React, StrictMode, useCallback, useEffect } from 'react'
import { I18nextProvider } from 'react-i18next' import { I18nextProvider } from 'react-i18next'
import { LogBox, NativeModules, StatusBar } from 'react-native' import { LogBox, NativeModules, StatusBar } from 'react-native'
import appsFlyer from 'react-native-appsflyer' import appsFlyer from 'react-native-appsflyer'
import { getUniqueId } from 'react-native-device-info' import { getUniqueId } from 'react-native-device-info'
import { GestureHandlerRootView } from 'react-native-gesture-handler' import { GestureHandlerRootView } from 'react-native-gesture-handler'
import { MMKV } from 'react-native-mmkv'
import { SafeAreaProvider } from 'react-native-safe-area-context' import { SafeAreaProvider } from 'react-native-safe-area-context'
import { enableFreeze } from 'react-native-screens' import { enableFreeze } from 'react-native-screens'
import { PersistGate } from 'redux-persist/integration/react' import { PersistGate } from 'redux-persist/integration/react'
import { ErrorBoundary } from 'src/app/ErrorBoundary'
import { MobileWalletNavigationProvider } from 'src/app/MobileWalletNavigationProvider' import { MobileWalletNavigationProvider } from 'src/app/MobileWalletNavigationProvider'
import { useAppDispatch, useAppSelector } from 'src/app/hooks' import { useAppDispatch, useAppSelector } from 'src/app/hooks'
import { AppModals } from 'src/app/modals/AppModals' import { AppModals } from 'src/app/modals/AppModals'
...@@ -19,20 +20,16 @@ import { NavigationContainer } from 'src/app/navigation/NavigationContainer' ...@@ -19,20 +20,16 @@ import { NavigationContainer } from 'src/app/navigation/NavigationContainer'
import { useIsPartOfNavigationTree } from 'src/app/navigation/hooks' import { useIsPartOfNavigationTree } from 'src/app/navigation/hooks'
import { AppStackNavigator } from 'src/app/navigation/navigation' import { AppStackNavigator } from 'src/app/navigation/navigation'
import { persistor, store } from 'src/app/store' import { persistor, store } from 'src/app/store'
import Trace from 'src/components/Trace/Trace'
import { TraceUserProperties } from 'src/components/Trace/TraceUserProperties' import { TraceUserProperties } from 'src/components/Trace/TraceUserProperties'
import { OfflineBanner } from 'src/components/banners/OfflineBanner' import { OfflineBanner } from 'src/components/banners/OfflineBanner'
// eslint-disable-next-line no-restricted-imports
import { usePersistedApolloClient } from 'src/data/usePersistedApolloClient'
import { initAppsFlyer } from 'src/features/analytics/appsflyer' import { initAppsFlyer } from 'src/features/analytics/appsflyer'
import { LockScreenContextProvider } from 'src/features/authentication/lockScreenContext' import { LockScreenContextProvider } from 'src/features/authentication/lockScreenContext'
import { BiometricContextProvider } from 'src/features/biometrics/context' import { BiometricContextProvider } from 'src/features/biometrics/context'
import { NotificationToastWrapper } from 'src/features/notifications/NotificationToastWrapper' import { NotificationToastWrapper } from 'src/features/notifications/NotificationToastWrapper'
import { initOneSignal } from 'src/features/notifications/Onesignal' import { initOneSignal } from 'src/features/notifications/Onesignal'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { MobileEventName } from 'src/features/telemetry/constants'
import { shouldLogScreen } from 'src/features/telemetry/directLogScreens' import { shouldLogScreen } from 'src/features/telemetry/directLogScreens'
import { selectAllowAnalytics } from 'src/features/telemetry/selectors' import { selectAllowAnalytics } from 'src/features/telemetry/selectors'
import { selectCustomEndpoint } from 'src/features/tweaks/selectors'
import { import {
processWidgetEvents, processWidgetEvents,
setAccountAddressesUserDefaults, setAccountAddressesUserDefaults,
...@@ -53,6 +50,9 @@ import { WALLET_EXPERIMENTS } from 'uniswap/src/features/gating/experiments' ...@@ -53,6 +50,9 @@ import { WALLET_EXPERIMENTS } from 'uniswap/src/features/gating/experiments'
import { WALLET_FEATURE_FLAG_NAMES } from 'uniswap/src/features/gating/flags' import { WALLET_FEATURE_FLAG_NAMES } from 'uniswap/src/features/gating/flags'
import { loadStatsigOverrides } from 'uniswap/src/features/gating/overrides/customPersistedOverrides' import { loadStatsigOverrides } from 'uniswap/src/features/gating/overrides/customPersistedOverrides'
import { Statsig, StatsigProvider } from 'uniswap/src/features/gating/sdk/statsig' import { Statsig, StatsigProvider } from 'uniswap/src/features/gating/sdk/statsig'
import Trace from 'uniswap/src/features/telemetry/Trace'
import { MobileEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { UnitagUpdaterContextProvider } from 'uniswap/src/features/unitags/context' import { UnitagUpdaterContextProvider } from 'uniswap/src/features/unitags/context'
import i18n from 'uniswap/src/i18n/i18n' import i18n from 'uniswap/src/i18n/i18n'
import { CurrencyId } from 'uniswap/src/types/currency' import { CurrencyId } from 'uniswap/src/types/currency'
...@@ -61,6 +61,9 @@ import { registerConsoleOverrides } from 'utilities/src/logger/console' ...@@ -61,6 +61,9 @@ import { registerConsoleOverrides } from 'utilities/src/logger/console'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { useAsyncData } from 'utilities/src/react/hooks' import { useAsyncData } from 'utilities/src/react/hooks'
import { AnalyticsNavigationContextProvider } from 'utilities/src/telemetry/trace/AnalyticsNavigationContext' import { AnalyticsNavigationContextProvider } from 'utilities/src/telemetry/trace/AnalyticsNavigationContext'
import { ErrorBoundary } from 'wallet/src/components/ErrorBoundary/ErrorBoundary'
// eslint-disable-next-line no-restricted-imports
import { usePersistedApolloClient } from 'wallet/src/data/apollo/usePersistedApolloClient'
import { initFirebaseAppCheck } from 'wallet/src/features/appCheck' import { initFirebaseAppCheck } from 'wallet/src/features/appCheck'
import { useCurrentAppearanceSetting } from 'wallet/src/features/appearance/hooks' import { useCurrentAppearanceSetting } from 'wallet/src/features/appearance/hooks'
import { selectFavoriteTokens } from 'wallet/src/features/favorites/selectors' import { selectFavoriteTokens } from 'wallet/src/features/favorites/selectors'
...@@ -185,12 +188,19 @@ function SentryTags({ children }: PropsWithChildren): JSX.Element { ...@@ -185,12 +188,19 @@ function SentryTags({ children }: PropsWithChildren): JSX.Element {
return <>{children}</> return <>{children}</>
} }
const MAX_CACHE_SIZE_IN_BYTES = 1024 * 1024 * 25 // 25 MB
// Ensures redux state is available inside usePersistedApolloClient for the custom endpoint // Ensures redux state is available inside usePersistedApolloClient for the custom endpoint
function AppOuter(): JSX.Element | null { function AppOuter(): JSX.Element | null {
const client = usePersistedApolloClient() const customEndpoint = useAppSelector(selectCustomEndpoint)
const client = usePersistedApolloClient({
storageWrapper: new MMKVWrapper(new MMKV()),
maxCacheSizeInBytes: MAX_CACHE_SIZE_IN_BYTES,
customEndpoint,
})
const onReportPrepared = useCallback((report: RenderPassReport) => { const onReportPrepared = useCallback((report: RenderPassReport) => {
sendMobileAnalyticsEvent(MobileEventName.PerformanceReport, report) sendAnalyticsEvent(MobileEventName.PerformanceReport, report)
}, []) }, [])
if (!client) { if (!client) {
......
...@@ -5,9 +5,12 @@ import { exploreNavigationRef } from 'src/app/navigation/navigation' ...@@ -5,9 +5,12 @@ import { exploreNavigationRef } from 'src/app/navigation/navigation'
import { useAppStackNavigation } from 'src/app/navigation/types' import { useAppStackNavigation } from 'src/app/navigation/types'
import { closeModal, openModal } from 'src/features/modals/modalSlice' import { closeModal, openModal } from 'src/features/modals/modalSlice'
import { HomeScreenTabIndex } from 'src/screens/HomeScreenTabIndex' import { HomeScreenTabIndex } from 'src/screens/HomeScreenTabIndex'
import { Screens } from 'src/screens/Screens'
import { FeatureFlags } from 'uniswap/src/features/gating/flags' import { FeatureFlags } from 'uniswap/src/features/gating/flags'
import { useFeatureFlag } from 'uniswap/src/features/gating/hooks' import { useFeatureFlag } from 'uniswap/src/features/gating/hooks'
import { ModalName, WalletEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { ShareableEntity } from 'uniswap/src/types/sharing'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
import { import {
...@@ -21,8 +24,6 @@ import { ...@@ -21,8 +24,6 @@ import {
getNavigateToSwapFlowArgsInitialState, getNavigateToSwapFlowArgsInitialState,
} from 'wallet/src/contexts/WalletNavigationContext' } from 'wallet/src/contexts/WalletNavigationContext'
import { useFiatOnRampIpAddressQuery } from 'wallet/src/features/fiatOnRamp/api' import { useFiatOnRampIpAddressQuery } from 'wallet/src/features/fiatOnRamp/api'
import { sendWalletAnalyticsEvent } from 'wallet/src/telemetry'
import { ModalName, ShareableEntity, WalletEventName } from 'wallet/src/telemetry/constants'
import { getNftUrl, getTokenUrl } from 'wallet/src/utils/linking' import { getNftUrl, getTokenUrl } from 'wallet/src/utils/linking'
export function MobileWalletNavigationProvider({ children }: PropsWithChildren): JSX.Element { export function MobileWalletNavigationProvider({ children }: PropsWithChildren): JSX.Element {
...@@ -61,7 +62,7 @@ function useHandleShareNft(): (args: ShareNftArgs) => Promise<void> { ...@@ -61,7 +62,7 @@ function useHandleShareNft(): (args: ShareNftArgs) => Promise<void> {
await Share.share({ message: url }) await Share.share({ message: url })
sendWalletAnalyticsEvent(WalletEventName.ShareButtonClicked, { sendAnalyticsEvent(WalletEventName.ShareButtonClicked, {
entity: ShareableEntity.NftItem, entity: ShareableEntity.NftItem,
url, url,
}) })
...@@ -88,7 +89,7 @@ function useHandleShareToken(): (args: ShareTokenArgs) => Promise<void> { ...@@ -88,7 +89,7 @@ function useHandleShareToken(): (args: ShareTokenArgs) => Promise<void> {
try { try {
await Share.share({ message: url }) await Share.share({ message: url })
sendWalletAnalyticsEvent(WalletEventName.ShareButtonClicked, { sendAnalyticsEvent(WalletEventName.ShareButtonClicked, {
entity: ShareableEntity.Token, entity: ShareableEntity.Token,
url, url,
}) })
...@@ -104,7 +105,7 @@ function useNavigateToHomepageTab(tab: HomeScreenTabIndex): () => void { ...@@ -104,7 +105,7 @@ function useNavigateToHomepageTab(tab: HomeScreenTabIndex): () => void {
const { navigate } = useAppStackNavigation() const { navigate } = useAppStackNavigation()
return useCallback((): void => { return useCallback((): void => {
navigate(Screens.Home, { tab }) navigate(MobileScreens.Home, { tab })
}, [navigate, tab]) }, [navigate, tab])
} }
...@@ -149,9 +150,9 @@ function useNavigateToTokenDetails(): (currencyId: string) => void { ...@@ -149,9 +150,9 @@ function useNavigateToTokenDetails(): (currencyId: string) => void {
return useCallback( return useCallback(
(currencyId: string): void => { (currencyId: string): void => {
if (exploreNavigationRef.isFocused()) { if (exploreNavigationRef.isFocused()) {
exploreNavigationRef.navigate(Screens.TokenDetails, { currencyId }) exploreNavigationRef.navigate(MobileScreens.TokenDetails, { currencyId })
} else { } else {
appNavigation.navigate(Screens.TokenDetails, { currencyId }) appNavigation.navigate(MobileScreens.TokenDetails, { currencyId })
} }
}, },
[appNavigation] [appNavigation]
...@@ -163,7 +164,7 @@ function useNavigateToNftDetails(): (args: NavigateToNftItemArgs) => void { ...@@ -163,7 +164,7 @@ function useNavigateToNftDetails(): (args: NavigateToNftItemArgs) => void {
return useCallback( return useCallback(
({ owner, address, tokenId, isSpam, fallbackData }: NavigateToNftItemArgs): void => { ({ owner, address, tokenId, isSpam, fallbackData }: NavigateToNftItemArgs): void => {
navigation.navigate(Screens.NFTItem, { navigation.navigate(MobileScreens.NFTItem, {
owner, owner,
address, address,
tokenId, tokenId,
......
...@@ -76,6 +76,7 @@ import { initialModalsState } from 'src/features/modals/modalSlice' ...@@ -76,6 +76,7 @@ import { initialModalsState } from 'src/features/modals/modalSlice'
import { initialTelemetryState } from 'src/features/telemetry/slice' import { initialTelemetryState } from 'src/features/telemetry/slice'
import { initialTweaksState } from 'src/features/tweaks/slice' import { initialTweaksState } from 'src/features/tweaks/slice'
import { initialWalletConnectState } from 'src/features/walletConnect/walletConnectSlice' import { initialWalletConnectState } from 'src/features/walletConnect/walletConnectSlice'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
import { import {
...@@ -103,7 +104,6 @@ import { ...@@ -103,7 +104,6 @@ import {
SignerMnemonicAccount, SignerMnemonicAccount,
} from 'wallet/src/features/wallet/accounts/types' } from 'wallet/src/features/wallet/accounts/types'
import { initialWalletState, SwapProtectionSetting } from 'wallet/src/features/wallet/slice' import { initialWalletState, SwapProtectionSetting } from 'wallet/src/features/wallet/slice'
import { ModalName } from 'wallet/src/telemetry/constants'
import { import {
fiatPurchaseTransactionInfo, fiatPurchaseTransactionInfo,
signerMnemonicAccount, signerMnemonicAccount,
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
/* eslint-disable max-lines */ /* eslint-disable max-lines */
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { ExtensionOnboardingState } from 'wallet/src/features/behaviorHistory/slice' import { ExtensionOnboardingState } from 'wallet/src/features/behaviorHistory/slice'
import { toSupportedChainId } from 'wallet/src/features/chains/utils' import { toSupportedChainId } from 'wallet/src/features/chains/utils'
...@@ -18,7 +19,6 @@ import { ...@@ -18,7 +19,6 @@ import {
} from 'wallet/src/features/transactions/types' } from 'wallet/src/features/transactions/types'
import { Account, AccountType } from 'wallet/src/features/wallet/accounts/types' import { Account, AccountType } from 'wallet/src/features/wallet/accounts/types'
import { SwapProtectionSetting } from 'wallet/src/features/wallet/slice' import { SwapProtectionSetting } from 'wallet/src/features/wallet/slice'
import { ModalName } from 'wallet/src/telemetry/constants'
export const OLD_DEMO_ACCOUNT_ADDRESS = '0xdd0E380579dF30E38524F9477808d9eE37E2dEa6' export const OLD_DEMO_ACCOUNT_ADDRESS = '0xdd0E380579dF30E38524F9477808d9eE37E2dEa6'
......
...@@ -2,7 +2,7 @@ import React from 'react' ...@@ -2,7 +2,7 @@ import React from 'react'
import { AccountSwitcher } from 'src/app/modals/AccountSwitcherModal' import { AccountSwitcher } from 'src/app/modals/AccountSwitcherModal'
import { preloadedMobileState, preloadedModalsState } from 'src/test/fixtures' import { preloadedMobileState, preloadedModalsState } from 'src/test/fixtures'
import { cleanup, render } from 'src/test/test-utils' import { cleanup, render } from 'src/test/test-utils'
import { ModalName } from 'wallet/src/telemetry/constants' import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { ACCOUNT } from 'wallet/src/test/fixtures' import { ACCOUNT } from 'wallet/src/test/fixtures'
import { noOpFunction } from 'wallet/src/test/mocks' import { noOpFunction } from 'wallet/src/test/mocks'
......
...@@ -9,7 +9,6 @@ import { isCloudStorageAvailable } from 'src/features/CloudBackup/RNCloudStorage ...@@ -9,7 +9,6 @@ import { isCloudStorageAvailable } from 'src/features/CloudBackup/RNCloudStorage
import { closeModal, openModal } from 'src/features/modals/modalSlice' import { closeModal, openModal } from 'src/features/modals/modalSlice'
import { selectModalState } from 'src/features/modals/selectModalState' import { selectModalState } from 'src/features/modals/selectModalState'
import { useCompleteOnboardingCallback } from 'src/features/onboarding/hooks' import { useCompleteOnboardingCallback } from 'src/features/onboarding/hooks'
import { OnboardingScreens, Screens } from 'src/screens/Screens'
import { useSagaStatus } from 'src/utils/useSagaStatus' import { useSagaStatus } from 'src/utils/useSagaStatus'
import { import {
Button, Button,
...@@ -22,7 +21,9 @@ import { ...@@ -22,7 +21,9 @@ import {
} from 'ui/src' } from 'ui/src'
import { Plus } from 'ui/src/components/icons' import { Plus } from 'ui/src/components/icons'
import { spacing } from 'ui/src/theme' import { spacing } from 'ui/src/theme'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding' import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding'
import { MobileScreens, OnboardingScreens } from 'uniswap/src/types/screens/mobile'
import { isAndroid } from 'uniswap/src/utils/platform' import { isAndroid } from 'uniswap/src/utils/platform'
import { AddressDisplay } from 'wallet/src/components/accounts/AddressDisplay' import { AddressDisplay } from 'wallet/src/components/accounts/AddressDisplay'
import { ActionSheetModal, MenuItemProp } from 'wallet/src/components/modals/ActionSheetModal' import { ActionSheetModal, MenuItemProp } from 'wallet/src/components/modals/ActionSheetModal'
...@@ -39,7 +40,6 @@ import { ...@@ -39,7 +40,6 @@ import {
import { useActiveAccountAddress, useNativeAccountExists } from 'wallet/src/features/wallet/hooks' import { useActiveAccountAddress, useNativeAccountExists } from 'wallet/src/features/wallet/hooks'
import { selectAllAccountsSorted } from 'wallet/src/features/wallet/selectors' import { selectAllAccountsSorted } from 'wallet/src/features/wallet/selectors'
import { setAccountAsActive } from 'wallet/src/features/wallet/slice' import { setAccountAsActive } from 'wallet/src/features/wallet/slice'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
import { openSettings } from 'wallet/src/utils/linking' import { openSettings } from 'wallet/src/utils/linking'
export function AccountSwitcherModal(): JSX.Element { export function AccountSwitcherModal(): JSX.Element {
...@@ -109,8 +109,8 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme ...@@ -109,8 +109,8 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme
} }
dispatch(closeModal({ name: ModalName.AccountSwitcher })) dispatch(closeModal({ name: ModalName.AccountSwitcher }))
navigate(Screens.SettingsStack, { navigate(MobileScreens.SettingsStack, {
screen: Screens.SettingsWallet, screen: MobileScreens.SettingsWallet,
params: { address: activeAccountAddress }, params: { address: activeAccountAddress },
}) })
} }
...@@ -133,7 +133,7 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme ...@@ -133,7 +133,7 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme
setCreatedAdditionalAccount(true) setCreatedAdditionalAccount(true)
} else { } else {
// create pending account and place into welcome flow // create pending account and place into welcome flow
navigate(Screens.OnboardingStack, { navigate(MobileScreens.OnboardingStack, {
screen: OnboardingScreens.WelcomeWallet, screen: OnboardingScreens.WelcomeWallet,
params: { params: {
importType: ImportType.CreateNew, importType: ImportType.CreateNew,
...@@ -147,7 +147,7 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme ...@@ -147,7 +147,7 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme
} }
const onPressAddViewOnlyWallet = (): void => { const onPressAddViewOnlyWallet = (): void => {
navigate(Screens.OnboardingStack, { navigate(MobileScreens.OnboardingStack, {
screen: OnboardingScreens.WatchWallet, screen: OnboardingScreens.WatchWallet,
params: { params: {
importType: ImportType.Watch, importType: ImportType.Watch,
...@@ -162,7 +162,7 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme ...@@ -162,7 +162,7 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme
if (hasImportedSeedPhrase && activeAccountAddress) { if (hasImportedSeedPhrase && activeAccountAddress) {
dispatch(openModal({ name: ModalName.RemoveWallet })) dispatch(openModal({ name: ModalName.RemoveWallet }))
} else { } else {
navigate(Screens.OnboardingStack, { navigate(MobileScreens.OnboardingStack, {
screen: OnboardingScreens.SeedPhraseInput, screen: OnboardingScreens.SeedPhraseInput,
params: { importType: ImportType.SeedPhrase, entryPoint: OnboardingEntryPoint.Sidebar }, params: { importType: ImportType.SeedPhrase, entryPoint: OnboardingEntryPoint.Sidebar },
}) })
...@@ -195,7 +195,7 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme ...@@ -195,7 +195,7 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme
return return
} }
navigate(Screens.OnboardingStack, { navigate(MobileScreens.OnboardingStack, {
screen: OnboardingScreens.RestoreCloudBackupLoading, screen: OnboardingScreens.RestoreCloudBackupLoading,
params: { importType: ImportType.Restore, entryPoint: OnboardingEntryPoint.Sidebar }, params: { importType: ImportType.Restore, entryPoint: OnboardingEntryPoint.Sidebar },
}) })
......
...@@ -20,7 +20,7 @@ import { ScantasticModal } from 'src/features/scantastic/ScantasticModal' ...@@ -20,7 +20,7 @@ import { ScantasticModal } from 'src/features/scantastic/ScantasticModal'
import { ReceiveCryptoModal } from 'src/screens/ReceiveCryptoModal' import { ReceiveCryptoModal } from 'src/screens/ReceiveCryptoModal'
import { SettingsFiatCurrencyModal } from 'src/screens/SettingsFiatCurrencyModal' import { SettingsFiatCurrencyModal } from 'src/screens/SettingsFiatCurrencyModal'
import { SettingsLanguageModal } from 'src/screens/SettingsLanguageModal' import { SettingsLanguageModal } from 'src/screens/SettingsLanguageModal'
import { ModalName } from 'wallet/src/telemetry/constants' import { ModalName } from 'uniswap/src/features/telemetry/constants'
export function AppModals(): JSX.Element { export function AppModals(): JSX.Element {
return ( return (
......
...@@ -8,10 +8,10 @@ import { selectCustomEndpoint } from 'src/features/tweaks/selectors' ...@@ -8,10 +8,10 @@ import { selectCustomEndpoint } from 'src/features/tweaks/selectors'
import { setCustomEndpoint } from 'src/features/tweaks/slice' import { setCustomEndpoint } from 'src/features/tweaks/slice'
import { Accordion, Button, Flex, Text, useDeviceInsets } from 'ui/src' import { Accordion, Button, Flex, Text, useDeviceInsets } from 'ui/src'
import { spacing } from 'ui/src/theme' import { spacing } from 'ui/src/theme'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { AccordionHeader, GatingOverrides } from 'wallet/src/components/gating/GatingOverrides' import { AccordionHeader, GatingOverrides } from 'wallet/src/components/gating/GatingOverrides'
import { TextInput } from 'wallet/src/components/input/TextInput' import { TextInput } from 'wallet/src/components/input/TextInput'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { ModalName } from 'wallet/src/telemetry/constants'
export function ExperimentsModal(): JSX.Element { export function ExperimentsModal(): JSX.Element {
const insets = useDeviceInsets() const insets = useDeviceInsets()
......
...@@ -3,8 +3,8 @@ import { useAppDispatch } from 'src/app/hooks' ...@@ -3,8 +3,8 @@ import { useAppDispatch } from 'src/app/hooks'
import { ExploreStackNavigator } from 'src/app/navigation/navigation' import { ExploreStackNavigator } from 'src/app/navigation/navigation'
import { closeModal } from 'src/features/modals/modalSlice' import { closeModal } from 'src/features/modals/modalSlice'
import { useSporeColors } from 'ui/src' import { useSporeColors } from 'ui/src'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { ModalName } from 'wallet/src/telemetry/constants'
export function ExploreModal(): JSX.Element { export function ExploreModal(): JSX.Element {
const colors = useSporeColors() const colors = useSporeColors()
......
import { ExploreStackParamList } from 'src/app/navigation/types' import { ExploreStackParamList } from 'src/app/navigation/types'
import { Screens } from 'src/screens/Screens' import { MobileScreens } from 'uniswap/src/types/screens/mobile'
type InnerExploreStackParamList = Omit<ExploreStackParamList, Screens.Explore> type InnerExploreStackParamList = Omit<ExploreStackParamList, MobileScreens.Explore>
// The ExploreModalState allows a Screen and its Params to be defined, except for the initial Explore screen. // The ExploreModalState allows a Screen and its Params to be defined, except for the initial Explore screen.
// This workaround facilitates navigation to any screen within the ExploreStack from outside. // This workaround facilitates navigation to any screen within the ExploreStack from outside.
......
...@@ -4,8 +4,8 @@ import { StyleSheet } from 'react-native' ...@@ -4,8 +4,8 @@ import { StyleSheet } from 'react-native'
import 'react-native-reanimated' import 'react-native-reanimated'
import { Button, Flex, Image, Text, useIsDarkMode } from 'ui/src' import { Button, Flex, Image, Text, useIsDarkMode } from 'ui/src'
import { EXTENSION_PROMO_MODAL_DARK, EXTENSION_PROMO_MODAL_LIGHT } from 'ui/src/assets' import { EXTENSION_PROMO_MODAL_DARK, EXTENSION_PROMO_MODAL_LIGHT } from 'ui/src/assets'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { ModalName } from 'wallet/src/telemetry/constants'
export function ExtensionPromoModal({ onClose }: { onClose: () => void }): JSX.Element { export function ExtensionPromoModal({ onClose }: { onClose: () => void }): JSX.Element {
const { t } = useTranslation() const { t } = useTranslation()
......
...@@ -9,10 +9,10 @@ import { ...@@ -9,10 +9,10 @@ import {
import { closeModal } from 'src/features/modals/modalSlice' import { closeModal } from 'src/features/modals/modalSlice'
import { selectModalState } from 'src/features/modals/selectModalState' import { selectModalState } from 'src/features/modals/selectModalState'
import { useWalletRestore } from 'src/features/wallet/hooks' import { useWalletRestore } from 'src/features/wallet/hooks'
import { useSwapPrefilledState } from 'wallet/src/features/transactions/swap/hooks/useSwapPrefilledState' import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { updateSwapStartTimestamp } from 'wallet/src/features/timing/slice'
import { SwapFlow } from 'wallet/src/features/transactions/swap/SwapFlow' import { SwapFlow } from 'wallet/src/features/transactions/swap/SwapFlow'
import { ModalName } from 'wallet/src/telemetry/constants' import { useSwapPrefilledState } from 'wallet/src/features/transactions/swap/hooks/useSwapPrefilledState'
import { updateSwapStartTimestamp } from 'wallet/src/telemetry/timing/slice'
export function SwapModal(): JSX.Element { export function SwapModal(): JSX.Element {
const appDispatch = useAppDispatch() const appDispatch = useAppDispatch()
......
...@@ -7,8 +7,8 @@ import { TransferFlow as TransferFlowRewrite } from 'src/features/transactions/t ...@@ -7,8 +7,8 @@ import { TransferFlow as TransferFlowRewrite } from 'src/features/transactions/t
import { useSporeColors } from 'ui/src' import { useSporeColors } from 'ui/src'
import { FeatureFlags } from 'uniswap/src/features/gating/flags' import { FeatureFlags } from 'uniswap/src/features/gating/flags'
import { useFeatureFlag } from 'uniswap/src/features/gating/hooks' import { useFeatureFlag } from 'uniswap/src/features/gating/hooks'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { ModalName } from 'wallet/src/telemetry/constants'
export function TransferTokenModal(): JSX.Element { export function TransferTokenModal(): JSX.Element {
const colors = useSporeColors() const colors = useSporeColors()
......
...@@ -14,10 +14,10 @@ import { ...@@ -14,10 +14,10 @@ import {
} from 'ui/src' } from 'ui/src'
import { RightArrow } from 'ui/src/components/icons' import { RightArrow } from 'ui/src/components/icons'
import { spacing } from 'ui/src/theme' import { spacing } from 'ui/src/theme'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { UniconGradient } from 'wallet/src/components/accounts/AccountIcon' import { UniconGradient } from 'wallet/src/components/accounts/AccountIcon'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { setHasViewedUniconV2IntroModal } from 'wallet/src/features/behaviorHistory/slice' import { setHasViewedUniconV2IntroModal } from 'wallet/src/features/behaviorHistory/slice'
import { ModalName } from 'wallet/src/telemetry/constants'
interface UniconsV2ModalProps { interface UniconsV2ModalProps {
address: string address: string
......
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { navigate } from 'src/app/navigation/rootNavigation' import { navigate } from 'src/app/navigation/rootNavigation'
import { closeModal, openModal } from 'src/features/modals/modalSlice' import { closeModal, openModal } from 'src/features/modals/modalSlice'
import { OnboardingScreens, Screens } from 'src/screens/Screens'
import { Button, Flex, Text, useIsDarkMode } from 'ui/src' import { Button, Flex, Text, useIsDarkMode } from 'ui/src'
import ViewOnlyWalletDark from 'ui/src/assets/graphics/view-only-wallet-dark.svg' import ViewOnlyWalletDark from 'ui/src/assets/graphics/view-only-wallet-dark.svg'
import ViewOnlyWalletLight from 'ui/src/assets/graphics/view-only-wallet-light.svg' import ViewOnlyWalletLight from 'ui/src/assets/graphics/view-only-wallet-light.svg'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding' import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding'
import { MobileScreens, OnboardingScreens } from 'uniswap/src/types/screens/mobile'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { useActiveAccountAddress, useNativeAccountExists } from 'wallet/src/features/wallet/hooks' import { useActiveAccountAddress, useNativeAccountExists } from 'wallet/src/features/wallet/hooks'
import { useAppDispatch } from 'wallet/src/state' import { useAppDispatch } from 'wallet/src/state'
import { ModalName } from 'wallet/src/telemetry/constants'
const WALLET_IMAGE_ASPECT_RATIO = 327 / 215 const WALLET_IMAGE_ASPECT_RATIO = 327 / 215
...@@ -28,7 +28,7 @@ export function ViewOnlyExplainerModal(): JSX.Element { ...@@ -28,7 +28,7 @@ export function ViewOnlyExplainerModal(): JSX.Element {
if (hasImportedSeedPhrase && activeAccountAddress) { if (hasImportedSeedPhrase && activeAccountAddress) {
dispatch(openModal({ name: ModalName.RemoveWallet })) dispatch(openModal({ name: ModalName.RemoveWallet }))
} else { } else {
navigate(Screens.OnboardingStack, { navigate(MobileScreens.OnboardingStack, {
screen: OnboardingScreens.SeedPhraseInput, screen: OnboardingScreens.SeedPhraseInput,
params: { importType: ImportType.SeedPhrase, entryPoint: OnboardingEntryPoint.Sidebar }, params: { importType: ImportType.SeedPhrase, entryPoint: OnboardingEntryPoint.Sidebar },
}) })
......
...@@ -3,7 +3,7 @@ import { Text } from 'react-native' ...@@ -3,7 +3,7 @@ import { Text } from 'react-native'
import { LazyModalRenderer } from 'src/app/modals/utils' import { LazyModalRenderer } from 'src/app/modals/utils'
import { preloadedMobileState, preloadedModalsState } from 'src/test/fixtures' import { preloadedMobileState, preloadedModalsState } from 'src/test/fixtures'
import { renderWithProviders } from 'src/test/render' import { renderWithProviders } from 'src/test/render'
import { ModalName } from 'wallet/src/telemetry/constants' import { ModalName } from 'uniswap/src/features/telemetry/constants'
describe(LazyModalRenderer, () => { describe(LazyModalRenderer, () => {
it('renders null when modal is not open', () => { it('renders null when modal is not open', () => {
......
...@@ -14,8 +14,6 @@ import { ...@@ -14,8 +14,6 @@ import {
import { useAppDispatch } from 'src/app/hooks' import { useAppDispatch } from 'src/app/hooks'
import { pulseAnimation } from 'src/components/buttons/utils' import { pulseAnimation } from 'src/components/buttons/utils'
import { openModal } from 'src/features/modals/modalSlice' import { openModal } from 'src/features/modals/modalSlice'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { Screens } from 'src/screens/Screens'
import { import {
AnimatedFlex, AnimatedFlex,
Flex, Flex,
...@@ -30,11 +28,13 @@ import { ...@@ -30,11 +28,13 @@ import {
} from 'ui/src' } from 'ui/src'
import { Search } from 'ui/src/components/icons' import { Search } from 'ui/src/components/icons'
import { borderRadii, fonts } from 'ui/src/theme' import { borderRadii, fonts } from 'ui/src/theme'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { isAndroid, isIOS } from 'uniswap/src/utils/platform' import { isAndroid, isIOS } from 'uniswap/src/utils/platform'
import { useHighestBalanceNativeCurrencyId } from 'wallet/src/features/dataApi/balances' import { useHighestBalanceNativeCurrencyId } from 'wallet/src/features/dataApi/balances'
import { prepareSwapFormState } from 'wallet/src/features/transactions/swap/utils' import { prepareSwapFormState } from 'wallet/src/features/transactions/swap/utils'
import { useActiveAccountAddressWithThrow } from 'wallet/src/features/wallet/hooks' import { useActiveAccountAddressWithThrow } from 'wallet/src/features/wallet/hooks'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
import { opacify } from 'wallet/src/utils/colors' import { opacify } from 'wallet/src/utils/colors'
export const NAV_BAR_HEIGHT_XS = 52 export const NAV_BAR_HEIGHT_XS = 52
...@@ -44,8 +44,8 @@ export const SWAP_BUTTON_HEIGHT = 56 ...@@ -44,8 +44,8 @@ export const SWAP_BUTTON_HEIGHT = 56
const SWAP_BUTTON_SHADOW_OFFSET = { width: 0, height: 4 } const SWAP_BUTTON_SHADOW_OFFSET = { width: 0, height: 4 }
function sendSwapPressAnalyticsEvent(): void { function sendSwapPressAnalyticsEvent(): void {
sendMobileAnalyticsEvent(SharedEventName.ELEMENT_CLICKED, { sendAnalyticsEvent(SharedEventName.ELEMENT_CLICKED, {
screen: Screens.Home, screen: MobileScreens.Home,
element: ElementName.Swap, element: ElementName.Swap,
}) })
} }
......
...@@ -9,14 +9,14 @@ import React, { FC, PropsWithChildren, useCallback, useState } from 'react' ...@@ -9,14 +9,14 @@ import React, { FC, PropsWithChildren, useCallback, useState } from 'react'
import { Linking } from 'react-native' import { Linking } from 'react-native'
import { useAppDispatch } from 'src/app/hooks' import { useAppDispatch } from 'src/app/hooks'
import { RootParamList } from 'src/app/navigation/types' import { RootParamList } from 'src/app/navigation/types'
import Trace from 'src/components/Trace/Trace'
import { openDeepLink } from 'src/features/deepLinking/handleDeepLinkSaga' import { openDeepLink } from 'src/features/deepLinking/handleDeepLinkSaga'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { getEventParams } from 'src/features/telemetry/constants'
import { DIRECT_LOG_ONLY_SCREENS } from 'src/features/telemetry/directLogScreens' import { DIRECT_LOG_ONLY_SCREENS } from 'src/features/telemetry/directLogScreens'
import { getEventParams } from 'src/features/telemetry/utils'
import { processWidgetEvents } from 'src/features/widgets/widgets' import { processWidgetEvents } from 'src/features/widgets/widgets'
import { AppScreen } from 'src/screens/Screens'
import { useSporeColors } from 'ui/src' import { useSporeColors } from 'ui/src'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import Trace from 'uniswap/src/features/telemetry/Trace'
import { MobileAppScreen } from 'uniswap/src/types/screens/mobile'
import { useAsyncData } from 'utilities/src/react/hooks' import { useAsyncData } from 'utilities/src/react/hooks'
import { sleep } from 'utilities/src/time/timing' import { sleep } from 'utilities/src/time/timing'
...@@ -32,7 +32,7 @@ export const NavigationContainer: FC<PropsWithChildren<Props>> = ({ ...@@ -32,7 +32,7 @@ export const NavigationContainer: FC<PropsWithChildren<Props>> = ({
onReady, onReady,
}: PropsWithChildren<Props>) => { }: PropsWithChildren<Props>) => {
const colors = useSporeColors() const colors = useSporeColors()
const [routeName, setRouteName] = useState<AppScreen>() const [routeName, setRouteName] = useState<MobileAppScreen>()
const [routeParams, setRouteParams] = useState<Record<string, unknown> | undefined>() const [routeParams, setRouteParams] = useState<Record<string, unknown> | undefined>()
const [logImpression, setLogImpression] = useState<boolean>(false) const [logImpression, setLogImpression] = useState<boolean>(false)
...@@ -48,17 +48,18 @@ export const NavigationContainer: FC<PropsWithChildren<Props>> = ({ ...@@ -48,17 +48,18 @@ export const NavigationContainer: FC<PropsWithChildren<Props>> = ({
}} }}
onReady={(): void => { onReady={(): void => {
onReady(navigationRef) onReady(navigationRef)
sendMobileAnalyticsEvent(SharedEventName.APP_LOADED) sendAnalyticsEvent(SharedEventName.APP_LOADED)
// Process widget events on app load // Process widget events on app load
processWidgetEvents().catch(() => undefined) processWidgetEvents().catch(() => undefined)
// setting initial route name for telemetry // setting initial route name for telemetry
const initialRoute = navigationRef.getCurrentRoute()?.name as AppScreen const initialRoute = navigationRef.getCurrentRoute()?.name as MobileAppScreen
setRouteName(initialRoute) setRouteName(initialRoute)
}} }}
onStateChange={(): void => { onStateChange={(): void => {
const previousRouteName = routeName const previousRouteName = routeName
const currentRouteName: AppScreen = navigationRef.getCurrentRoute()?.name as AppScreen const currentRouteName: MobileAppScreen = navigationRef.getCurrentRoute()
?.name as MobileAppScreen
if ( if (
currentRouteName && currentRouteName &&
...@@ -67,7 +68,7 @@ export const NavigationContainer: FC<PropsWithChildren<Props>> = ({ ...@@ -67,7 +68,7 @@ export const NavigationContainer: FC<PropsWithChildren<Props>> = ({
) { ) {
const currentRouteParams = getEventParams( const currentRouteParams = getEventParams(
currentRouteName, currentRouteName,
navigationRef.getCurrentRoute()?.params as RootParamList[AppScreen] navigationRef.getCurrentRoute()?.params as RootParamList[MobileAppScreen]
) )
setLogImpression(true) setLogImpression(true)
setRouteName(currentRouteName) setRouteName(currentRouteName)
......
...@@ -3,8 +3,8 @@ import { useCallback, useContext } from 'react' ...@@ -3,8 +3,8 @@ import { useCallback, useContext } from 'react'
import { navigate as rootNavigate } from 'src/app/navigation/rootNavigation' import { navigate as rootNavigate } from 'src/app/navigation/rootNavigation'
import { useAppStackNavigation, useExploreStackNavigation } from 'src/app/navigation/types' import { useAppStackNavigation, useExploreStackNavigation } from 'src/app/navigation/types'
import { HomeScreenTabIndex } from 'src/screens/HomeScreenTabIndex' import { HomeScreenTabIndex } from 'src/screens/HomeScreenTabIndex'
import { Screens } from 'src/screens/Screens'
import { useTransactionListLazyQuery } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks' import { useTransactionListLazyQuery } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
/** /**
* Utility hook to simplify navigating to Activity screen. * Utility hook to simplify navigating to Activity screen.
...@@ -29,7 +29,7 @@ export function useEagerActivityNavigation(): { ...@@ -29,7 +29,7 @@ export function useEagerActivityNavigation(): {
) )
const navigate = useCallback( const navigate = useCallback(
() => navigation.navigate(Screens.Home, { tab: HomeScreenTabIndex.Activity }), () => navigation.navigate(MobileScreens.Home, { tab: HomeScreenTabIndex.Activity }),
[navigation] [navigation]
) )
...@@ -57,7 +57,7 @@ export function useEagerExternalProfileNavigation(): { ...@@ -57,7 +57,7 @@ export function useEagerExternalProfileNavigation(): {
const navigate = useCallback( const navigate = useCallback(
(address: string) => { (address: string) => {
navigation.navigate(Screens.ExternalProfile, { address }) navigation.navigate(MobileScreens.ExternalProfile, { address })
}, },
[navigation] [navigation]
) )
...@@ -83,7 +83,7 @@ export function useEagerExternalProfileRootNavigation(): { ...@@ -83,7 +83,7 @@ export function useEagerExternalProfileRootNavigation(): {
) )
const navigate = useCallback(async (address: string, callback?: () => void) => { const navigate = useCallback(async (address: string, callback?: () => void) => {
await rootNavigate(Screens.ExternalProfile, { address }) await rootNavigate(MobileScreens.ExternalProfile, { address })
callback?.() callback?.()
}, []) }, [])
......
...@@ -46,7 +46,6 @@ import { ManualBackupScreen } from 'src/screens/Onboarding/ManualBackupScreen' ...@@ -46,7 +46,6 @@ import { ManualBackupScreen } from 'src/screens/Onboarding/ManualBackupScreen'
import { NotificationsSetupScreen } from 'src/screens/Onboarding/NotificationsSetupScreen' import { NotificationsSetupScreen } from 'src/screens/Onboarding/NotificationsSetupScreen'
import { SecuritySetupScreen } from 'src/screens/Onboarding/SecuritySetupScreen' import { SecuritySetupScreen } from 'src/screens/Onboarding/SecuritySetupScreen'
import { WelcomeWalletScreen } from 'src/screens/Onboarding/WelcomeWalletScreen' import { WelcomeWalletScreen } from 'src/screens/Onboarding/WelcomeWalletScreen'
import { FiatOnRampScreens, OnboardingScreens, Screens, UnitagScreens } from 'src/screens/Screens'
import { SettingsAppearanceScreen } from 'src/screens/SettingsAppearanceScreen' import { SettingsAppearanceScreen } from 'src/screens/SettingsAppearanceScreen'
import { SettingsBiometricAuthScreen } from 'src/screens/SettingsBiometricAuthScreen' import { SettingsBiometricAuthScreen } from 'src/screens/SettingsBiometricAuthScreen'
import { SettingsCloudBackupPasswordConfirmScreen } from 'src/screens/SettingsCloudBackupPasswordConfirmScreen' import { SettingsCloudBackupPasswordConfirmScreen } from 'src/screens/SettingsCloudBackupPasswordConfirmScreen'
...@@ -67,6 +66,12 @@ import { spacing } from 'ui/src/theme' ...@@ -67,6 +66,12 @@ import { spacing } from 'ui/src/theme'
import { FeatureFlags } from 'uniswap/src/features/gating/flags' import { FeatureFlags } from 'uniswap/src/features/gating/flags'
import { useFeatureFlag } from 'uniswap/src/features/gating/hooks' import { useFeatureFlag } from 'uniswap/src/features/gating/hooks'
import { OnboardingEntryPoint } from 'uniswap/src/types/onboarding' import { OnboardingEntryPoint } from 'uniswap/src/types/onboarding'
import {
FiatOnRampScreens,
MobileScreens,
OnboardingScreens,
UnitagScreens,
} from 'uniswap/src/types/screens/mobile'
import { useActiveAccountWithThrow } from 'wallet/src/features/wallet/hooks' import { useActiveAccountWithThrow } from 'wallet/src/features/wallet/hooks'
import { selectFinishedOnboarding } from 'wallet/src/features/wallet/selectors' import { selectFinishedOnboarding } from 'wallet/src/features/wallet/selectors'
...@@ -85,49 +90,55 @@ function SettingsStackGroup(): JSX.Element { ...@@ -85,49 +90,55 @@ function SettingsStackGroup(): JSX.Element {
fullScreenGestureEnabled: true, fullScreenGestureEnabled: true,
animation: 'slide_from_right', animation: 'slide_from_right',
}}> }}>
<SettingsStack.Screen component={SettingsScreen} name={Screens.Settings} /> <SettingsStack.Screen component={SettingsScreen} name={MobileScreens.Settings} />
<SettingsStack.Screen component={SettingsWallet} name={Screens.SettingsWallet} /> <SettingsStack.Screen component={SettingsWallet} name={MobileScreens.SettingsWallet} />
<SettingsStack.Screen component={SettingsWalletEdit} name={Screens.SettingsWalletEdit} /> <SettingsStack.Screen
component={SettingsWalletEdit}
name={MobileScreens.SettingsWalletEdit}
/>
<SettingsStack.Screen <SettingsStack.Screen
component={SettingsWalletManageConnection} component={SettingsWalletManageConnection}
name={Screens.SettingsWalletManageConnection} name={MobileScreens.SettingsWalletManageConnection}
/> />
<SettingsStack.Screen component={WebViewScreen} name={Screens.WebView} /> <SettingsStack.Screen component={WebViewScreen} name={MobileScreens.WebView} />
<SettingsStack.Screen component={DevScreen} name={Screens.Dev} /> <SettingsStack.Screen component={DevScreen} name={MobileScreens.Dev} />
<SettingsStack.Screen <SettingsStack.Screen
component={SettingsBiometricAuthScreen} component={SettingsBiometricAuthScreen}
name={Screens.SettingsBiometricAuth} name={MobileScreens.SettingsBiometricAuth}
/> />
<SettingsStack.Screen <SettingsStack.Screen
component={SettingsViewSeedPhraseScreen} component={SettingsViewSeedPhraseScreen}
name={Screens.SettingsViewSeedPhrase} name={MobileScreens.SettingsViewSeedPhrase}
/> />
<SettingsStack.Screen <SettingsStack.Screen
component={SettingsCloudBackupPasswordCreateScreen} component={SettingsCloudBackupPasswordCreateScreen}
name={Screens.SettingsCloudBackupPasswordCreate} name={MobileScreens.SettingsCloudBackupPasswordCreate}
/> />
<SettingsStack.Screen <SettingsStack.Screen
component={SettingsCloudBackupPasswordConfirmScreen} component={SettingsCloudBackupPasswordConfirmScreen}
name={Screens.SettingsCloudBackupPasswordConfirm} name={MobileScreens.SettingsCloudBackupPasswordConfirm}
/> />
<SettingsStack.Screen <SettingsStack.Screen
component={SettingsCloudBackupProcessingScreen} component={SettingsCloudBackupProcessingScreen}
name={Screens.SettingsCloudBackupProcessing} name={MobileScreens.SettingsCloudBackupProcessing}
/> />
<SettingsStack.Screen <SettingsStack.Screen
component={SettingsCloudBackupStatus} component={SettingsCloudBackupStatus}
name={Screens.SettingsCloudBackupStatus} name={MobileScreens.SettingsCloudBackupStatus}
/> />
<SettingsStack.Screen <SettingsStack.Screen
component={SettingsAppearanceScreen} component={SettingsAppearanceScreen}
name={Screens.SettingsAppearance} name={MobileScreens.SettingsAppearance}
/>
<SettingsStack.Screen
component={SettingsPrivacyScreen}
name={MobileScreens.SettingsPrivacy}
/> />
<SettingsStack.Screen component={SettingsPrivacyScreen} name={Screens.SettingsPrivacy} />
</SettingsStack.Navigator> </SettingsStack.Navigator>
) )
} }
export function WrappedHomeScreen(props: AppStackScreenProp<Screens.Home>): JSX.Element { export function WrappedHomeScreen(props: AppStackScreenProp<MobileScreens.Home>): JSX.Element {
const activeAccount = useActiveAccountWithThrow() const activeAccount = useActiveAccountWithThrow()
// Adding `key` forces a full re-render and re-mount when switching accounts // Adding `key` forces a full re-render and re-mount when switching accounts
// to avoid issues with wrong cached data being shown in some memoized components that are already mounted. // to avoid issues with wrong cached data being shown in some memoized components that are already mounted.
...@@ -156,24 +167,24 @@ export function ExploreStackNavigator(): JSX.Element { ...@@ -156,24 +167,24 @@ export function ExploreStackNavigator(): JSX.Element {
}}> }}>
<HorizontalEdgeGestureTarget /> <HorizontalEdgeGestureTarget />
<ExploreStack.Navigator <ExploreStack.Navigator
initialRouteName={Screens.Explore} initialRouteName={MobileScreens.Explore}
screenOptions={{ screenOptions={{
...navOptions.noHeader, ...navOptions.noHeader,
fullScreenGestureEnabled: true, fullScreenGestureEnabled: true,
gestureEnabled: true, gestureEnabled: true,
animation: 'slide_from_right', animation: 'slide_from_right',
}}> }}>
<ExploreStack.Screen component={ExploreScreen} name={Screens.Explore} /> <ExploreStack.Screen component={ExploreScreen} name={MobileScreens.Explore} />
<ExploreStack.Group <ExploreStack.Group
screenOptions={{ contentStyle: { backgroundColor: colors.surface1.val } }}> screenOptions={{ contentStyle: { backgroundColor: colors.surface1.val } }}>
<ExploreStack.Screen name={Screens.ExternalProfile}> <ExploreStack.Screen name={MobileScreens.ExternalProfile}>
{(props): JSX.Element => <ExternalProfileScreen {...props} renderedInModal />} {(props): JSX.Element => <ExternalProfileScreen {...props} renderedInModal />}
</ExploreStack.Screen> </ExploreStack.Screen>
<ExploreStack.Screen name={Screens.NFTCollection}> <ExploreStack.Screen name={MobileScreens.NFTCollection}>
{(props): JSX.Element => <NFTCollectionScreen {...props} renderedInModal />} {(props): JSX.Element => <NFTCollectionScreen {...props} renderedInModal />}
</ExploreStack.Screen> </ExploreStack.Screen>
<ExploreStack.Screen component={NFTItemScreen} name={Screens.NFTItem} /> <ExploreStack.Screen component={NFTItemScreen} name={MobileScreens.NFTItem} />
<ExploreStack.Screen component={TokenDetailsScreen} name={Screens.TokenDetails} /> <ExploreStack.Screen component={TokenDetailsScreen} name={MobileScreens.TokenDetails} />
</ExploreStack.Group> </ExploreStack.Group>
</ExploreStack.Navigator> </ExploreStack.Navigator>
</NavigationContainer> </NavigationContainer>
...@@ -360,25 +371,27 @@ export function AppStackNavigator(): JSX.Element { ...@@ -360,25 +371,27 @@ export function AppStackNavigator(): JSX.Element {
gestureEnabled: true, gestureEnabled: true,
animation: 'slide_from_right', animation: 'slide_from_right',
}}> }}>
{finishedOnboarding && <AppStack.Screen component={WrappedHomeScreen} name={Screens.Home} />} {finishedOnboarding && (
<AppStack.Screen component={WrappedHomeScreen} name={MobileScreens.Home} />
)}
<AppStack.Screen <AppStack.Screen
component={OnboardingStackNavigator} component={OnboardingStackNavigator}
name={Screens.OnboardingStack} name={MobileScreens.OnboardingStack}
navigationKey={ navigationKey={
finishedOnboarding finishedOnboarding
? OnboardingEntryPoint.Sidebar.valueOf() ? OnboardingEntryPoint.Sidebar.valueOf()
: OnboardingEntryPoint.FreshInstallOrReplace.valueOf() : OnboardingEntryPoint.FreshInstallOrReplace.valueOf()
} }
/> />
<AppStack.Screen component={UnitagStackNavigator} name={Screens.UnitagStack} /> <AppStack.Screen component={UnitagStackNavigator} name={MobileScreens.UnitagStack} />
<AppStack.Screen component={ExternalProfileScreen} name={Screens.ExternalProfile} /> <AppStack.Screen component={ExternalProfileScreen} name={MobileScreens.ExternalProfile} />
<AppStack.Screen component={TokenDetailsScreen} name={Screens.TokenDetails} /> <AppStack.Screen component={TokenDetailsScreen} name={MobileScreens.TokenDetails} />
<AppStack.Screen component={NFTItemScreen} name={Screens.NFTItem} /> <AppStack.Screen component={NFTItemScreen} name={MobileScreens.NFTItem} />
<AppStack.Screen component={NFTCollectionScreen} name={Screens.NFTCollection} /> <AppStack.Screen component={NFTCollectionScreen} name={MobileScreens.NFTCollection} />
<AppStack.Screen component={WebViewScreen} name={Screens.WebView} /> <AppStack.Screen component={WebViewScreen} name={MobileScreens.WebView} />
<AppStack.Screen component={SettingsStackGroup} name={Screens.SettingsStack} /> <AppStack.Screen component={SettingsStackGroup} name={MobileScreens.SettingsStack} />
<AppStack.Group screenOptions={navOptions.presentationModal}> <AppStack.Group screenOptions={navOptions.presentationModal}>
<AppStack.Screen component={EducationScreen} name={Screens.Education} /> <AppStack.Screen component={EducationScreen} name={MobileScreens.Education} />
</AppStack.Group> </AppStack.Group>
</AppStack.Navigator> </AppStack.Navigator>
) )
......
...@@ -7,9 +7,14 @@ import { ...@@ -7,9 +7,14 @@ import {
import { NativeStackNavigationProp, NativeStackScreenProps } from '@react-navigation/native-stack' import { NativeStackNavigationProp, NativeStackScreenProps } from '@react-navigation/native-stack'
import { EducationContentType } from 'src/components/education' import { EducationContentType } from 'src/components/education'
import { HomeScreenTabIndex } from 'src/screens/HomeScreenTabIndex' import { HomeScreenTabIndex } from 'src/screens/HomeScreenTabIndex'
import { FiatOnRampScreens, OnboardingScreens, Screens, UnitagScreens } from 'src/screens/Screens'
import { UnitagClaim } from 'uniswap/src/features/unitags/types' import { UnitagClaim } from 'uniswap/src/features/unitags/types'
import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding' import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding'
import {
FiatOnRampScreens,
MobileScreens,
OnboardingScreens,
UnitagScreens,
} from 'uniswap/src/types/screens/mobile'
import { NFTItem } from 'wallet/src/features/nfts/types' import { NFTItem } from 'wallet/src/features/nfts/types'
type NFTItemScreenParams = { type NFTItemScreenParams = {
...@@ -26,13 +31,13 @@ export type CloudBackupFormParams = { ...@@ -26,13 +31,13 @@ export type CloudBackupFormParams = {
} }
export type ExploreStackParamList = { export type ExploreStackParamList = {
[Screens.Explore]: undefined [MobileScreens.Explore]: undefined
[Screens.ExternalProfile]: { [MobileScreens.ExternalProfile]: {
address: string address: string
} }
[Screens.NFTItem]: NFTItemScreenParams [MobileScreens.NFTItem]: NFTItemScreenParams
[Screens.NFTCollection]: { collectionAddress: string } [MobileScreens.NFTCollection]: { collectionAddress: string }
[Screens.TokenDetails]: { [MobileScreens.TokenDetails]: {
currencyId: string currencyId: string
} }
} }
...@@ -44,22 +49,22 @@ export type FiatOnRampStackParamList = { ...@@ -44,22 +49,22 @@ export type FiatOnRampStackParamList = {
} }
export type SettingsStackParamList = { export type SettingsStackParamList = {
[Screens.Dev]: undefined [MobileScreens.Dev]: undefined
[Screens.Settings]: undefined [MobileScreens.Settings]: undefined
[Screens.SettingsAppearance]: undefined [MobileScreens.SettingsAppearance]: undefined
[Screens.SettingsBiometricAuth]: undefined [MobileScreens.SettingsBiometricAuth]: undefined
[Screens.SettingsCloudBackupPasswordConfirm]: CloudBackupFormParams [MobileScreens.SettingsCloudBackupPasswordConfirm]: CloudBackupFormParams
[Screens.SettingsCloudBackupPasswordCreate]: { address: Address } [MobileScreens.SettingsCloudBackupPasswordCreate]: { address: Address }
[Screens.SettingsCloudBackupProcessing]: CloudBackupFormParams [MobileScreens.SettingsCloudBackupProcessing]: CloudBackupFormParams
[Screens.SettingsCloudBackupStatus]: { address: Address } [MobileScreens.SettingsCloudBackupStatus]: { address: Address }
[Screens.SettingsHelpCenter]: undefined [MobileScreens.SettingsHelpCenter]: undefined
[Screens.SettingsLanguage]: undefined [MobileScreens.SettingsLanguage]: undefined
[Screens.SettingsPrivacy]: undefined [MobileScreens.SettingsPrivacy]: undefined
[Screens.SettingsViewSeedPhrase]: { address: Address; walletNeedsRestore?: boolean } [MobileScreens.SettingsViewSeedPhrase]: { address: Address; walletNeedsRestore?: boolean }
[Screens.SettingsWallet]: { address: Address } [MobileScreens.SettingsWallet]: { address: Address }
[Screens.SettingsWalletEdit]: { address: Address } [MobileScreens.SettingsWalletEdit]: { address: Address }
[Screens.SettingsWalletManageConnection]: { address: Address } [MobileScreens.SettingsWalletManageConnection]: { address: Address }
[Screens.WebView]: { headerTitle: string; uriLink: string } [MobileScreens.WebView]: { headerTitle: string; uriLink: string }
} }
export type OnboardingStackBaseParams = { export type OnboardingStackBaseParams = {
...@@ -68,7 +73,10 @@ export type OnboardingStackBaseParams = { ...@@ -68,7 +73,10 @@ export type OnboardingStackBaseParams = {
unitagClaim?: UnitagClaim unitagClaim?: UnitagClaim
} }
export type UnitagEntryPoint = OnboardingScreens.Landing | Screens.Home | Screens.Settings export type UnitagEntryPoint =
| OnboardingScreens.Landing
| MobileScreens.Home
| MobileScreens.Settings
export type SharedUnitagScreenParams = { export type SharedUnitagScreenParams = {
[UnitagScreens.ClaimUnitag]: { [UnitagScreens.ClaimUnitag]: {
...@@ -117,27 +125,27 @@ export type UnitagStackParamList = SharedUnitagScreenParams & { ...@@ -117,27 +125,27 @@ export type UnitagStackParamList = SharedUnitagScreenParams & {
[UnitagScreens.EditProfile]: { [UnitagScreens.EditProfile]: {
address: Address address: Address
unitag: string unitag: string
entryPoint: UnitagScreens.UnitagConfirmation | Screens.SettingsWallet entryPoint: UnitagScreens.UnitagConfirmation | MobileScreens.SettingsWallet
} }
} }
export type AppStackParamList = { export type AppStackParamList = {
[Screens.Education]: { [MobileScreens.Education]: {
type: EducationContentType type: EducationContentType
} & OnboardingStackBaseParams } & OnboardingStackBaseParams
[Screens.Home]?: { tab?: HomeScreenTabIndex } [MobileScreens.Home]?: { tab?: HomeScreenTabIndex }
[Screens.OnboardingStack]: NavigatorScreenParams<OnboardingStackParamList> [MobileScreens.OnboardingStack]: NavigatorScreenParams<OnboardingStackParamList>
[Screens.SettingsStack]: NavigatorScreenParams<SettingsStackParamList> [MobileScreens.SettingsStack]: NavigatorScreenParams<SettingsStackParamList>
[Screens.UnitagStack]: NavigatorScreenParams<UnitagStackParamList> [MobileScreens.UnitagStack]: NavigatorScreenParams<UnitagStackParamList>
[Screens.TokenDetails]: { [MobileScreens.TokenDetails]: {
currencyId: string currencyId: string
} }
[Screens.NFTItem]: NFTItemScreenParams [MobileScreens.NFTItem]: NFTItemScreenParams
[Screens.NFTCollection]: { collectionAddress: string } [MobileScreens.NFTCollection]: { collectionAddress: string }
[Screens.ExternalProfile]: { [MobileScreens.ExternalProfile]: {
address: string address: string
} }
[Screens.WebView]: { headerTitle: string; uriLink: string } [MobileScreens.WebView]: { headerTitle: string; uriLink: string }
} }
export type AppStackNavigationProp = NativeStackNavigationProp<AppStackParamList> export type AppStackNavigationProp = NativeStackNavigationProp<AppStackParamList>
......
import { PersistState } from 'redux-persist' import { PersistState } from 'redux-persist'
import { apolloClientRef } from 'src/data/usePersistedApolloClient'
import { appRatingWatcherSaga } from 'src/features/appRating/saga'
import { cloudBackupsManagerSaga } from 'src/features/CloudBackup/saga' import { cloudBackupsManagerSaga } from 'src/features/CloudBackup/saga'
import { appRatingWatcherSaga } from 'src/features/appRating/saga'
import { deepLinkWatcher } from 'src/features/deepLinking/handleDeepLinkSaga' import { deepLinkWatcher } from 'src/features/deepLinking/handleDeepLinkSaga'
import { firebaseDataWatcher } from 'src/features/firebase/firebaseDataSaga' import { firebaseDataWatcher } from 'src/features/firebase/firebaseDataSaga'
import { modalWatcher } from 'src/features/modals/saga' import { modalWatcher } from 'src/features/modals/saga'
...@@ -10,6 +9,7 @@ import { restoreMnemonicCompleteWatcher } from 'src/features/wallet/saga' ...@@ -10,6 +9,7 @@ import { restoreMnemonicCompleteWatcher } from 'src/features/wallet/saga'
import { walletConnectSaga } from 'src/features/walletConnect/saga' import { walletConnectSaga } from 'src/features/walletConnect/saga'
import { signWcRequestSaga } from 'src/features/walletConnect/signWcRequestSaga' import { signWcRequestSaga } from 'src/features/walletConnect/signWcRequestSaga'
import { call, delay, select, spawn } from 'typed-redux-saga' import { call, delay, select, spawn } from 'typed-redux-saga'
import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient'
import { appLanguageWatcherSaga } from 'wallet/src/features/language/saga' import { appLanguageWatcherSaga } from 'wallet/src/features/language/saga'
import { import {
swapActions, swapActions,
...@@ -43,7 +43,7 @@ import { ...@@ -43,7 +43,7 @@ import {
importAccountSaga, importAccountSaga,
importAccountSagaName, importAccountSagaName,
} from 'wallet/src/features/wallet/import/importAccountSaga' } from 'wallet/src/features/wallet/import/importAccountSaga'
import { getMonitoredSagaReducers, MonitoredSaga } from 'wallet/src/state/saga' import { MonitoredSaga, getMonitoredSagaReducers } from 'wallet/src/state/saga'
const REHYDRATION_STATUS_POLLING_INTERVAL = 50 const REHYDRATION_STATUS_POLLING_INTERVAL = 50
......
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { ExtensionOnboardingState } from 'wallet/src/features/behaviorHistory/slice' import { ExtensionOnboardingState } from 'wallet/src/features/behaviorHistory/slice'
import { initialFiatCurrencyState } from 'wallet/src/features/fiatCurrency/slice' import { initialFiatCurrencyState } from 'wallet/src/features/fiatCurrency/slice'
import { initialLanguageState } from 'wallet/src/features/language/slice' import { initialLanguageState } from 'wallet/src/features/language/slice'
import { SwapProtectionSetting } from 'wallet/src/features/wallet/slice' import { SwapProtectionSetting } from 'wallet/src/features/wallet/slice'
import { ModalName } from 'wallet/src/telemetry/constants'
// only add fields that are persisted // only add fields that are persisted
export const initialSchema = { export const initialSchema = {
......
...@@ -8,9 +8,9 @@ import { ...@@ -8,9 +8,9 @@ import {
} from 'react-native-reanimated' } from 'react-native-reanimated'
import { TIME_RANGES } from 'src/components/PriceExplorer/constants' import { TIME_RANGES } from 'src/components/PriceExplorer/constants'
import { useChartDimensions } from 'src/components/PriceExplorer/useChartDimensions' import { useChartDimensions } from 'src/components/PriceExplorer/useChartDimensions'
import Trace from 'src/components/Trace/Trace'
import { AnimatedFlex, AnimatedText, Flex, TouchableArea, useSporeColors } from 'ui/src' import { AnimatedFlex, AnimatedText, Flex, TouchableArea, useSporeColors } from 'ui/src'
import { HistoryDuration } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks' import { HistoryDuration } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import Trace from 'uniswap/src/features/telemetry/Trace'
interface Props { interface Props {
label: string label: string
......
import { HistoryDuration } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks' import { HistoryDuration } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { ElementName } from 'uniswap/src/features/telemetry/constants'
import i18n from 'uniswap/src/i18n/i18n' import i18n from 'uniswap/src/i18n/i18n'
import { ElementName } from 'wallet/src/telemetry/constants'
export const NUM_GRAPHS = 5 export const NUM_GRAPHS = 5
......
...@@ -9,11 +9,11 @@ import { Flex, HapticFeedback, Text, TouchableArea, useIsDarkMode, useSporeColor ...@@ -9,11 +9,11 @@ import { Flex, HapticFeedback, Text, TouchableArea, useIsDarkMode, useSporeColor
import Scan from 'ui/src/assets/icons/receive.svg' import Scan from 'ui/src/assets/icons/receive.svg'
import ScanQRIcon from 'ui/src/assets/icons/scan.svg' import ScanQRIcon from 'ui/src/assets/icons/scan.svg'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
import { WalletQRCode } from 'wallet/src/components/QRCodeScanner/WalletQRCode' import { WalletQRCode } from 'wallet/src/components/QRCodeScanner/WalletQRCode'
import { selectActiveAccountAddress } from 'wallet/src/features/wallet/selectors' import { selectActiveAccountAddress } from 'wallet/src/features/wallet/selectors'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
type Props = { type Props = {
onClose: () => void onClose: () => void
......
...@@ -6,13 +6,13 @@ import { RecipientScanModal } from 'src/components/RecipientSelect/RecipientScan ...@@ -6,13 +6,13 @@ import { RecipientScanModal } from 'src/components/RecipientSelect/RecipientScan
import { AnimatedFlex, Flex, Text, TouchableArea, useSporeColors } from 'ui/src' import { AnimatedFlex, Flex, Text, TouchableArea, useSporeColors } from 'ui/src'
import ScanQRIcon from 'ui/src/assets/icons/scan.svg' import ScanQRIcon from 'ui/src/assets/icons/scan.svg'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { useBottomSheetContext } from 'wallet/src/components/modals/BottomSheetContext' import { ElementName } from 'uniswap/src/features/telemetry/constants'
import { RecipientList } from 'wallet/src/components/RecipientSearch/RecipientList'
import { filterRecipientByNameAndAddress } from 'wallet/src/components/RecipientSearch/filter' import { filterRecipientByNameAndAddress } from 'wallet/src/components/RecipientSearch/filter'
import { useRecipients } from 'wallet/src/components/RecipientSearch/hooks' import { useRecipients } from 'wallet/src/components/RecipientSearch/hooks'
import { RecipientList } from 'wallet/src/components/RecipientSearch/RecipientList'
import { filterSections } from 'wallet/src/components/RecipientSearch/utils' import { filterSections } from 'wallet/src/components/RecipientSearch/utils'
import { useBottomSheetContext } from 'wallet/src/components/modals/BottomSheetContext'
import { SearchBar } from 'wallet/src/features/search/SearchBar' import { SearchBar } from 'wallet/src/features/search/SearchBar'
import { ElementName } from 'wallet/src/telemetry/constants'
interface RecipientSelectProps { interface RecipientSelectProps {
onSelectRecipient: (newRecipientAddress: string) => void onSelectRecipient: (newRecipientAddress: string) => void
......
import React, { useState } from 'react' import React, { useState } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { Button, CheckBox, Flex, Text } from 'ui/src' import { Button, CheckBox, Flex, Text } from 'ui/src'
import { ElementName } from 'uniswap/src/features/telemetry/constants'
import { SpinningLoader } from 'wallet/src/components/loading/SpinningLoader' import { SpinningLoader } from 'wallet/src/components/loading/SpinningLoader'
import { ElementName } from 'wallet/src/telemetry/constants'
export function RemoveLastMnemonicWalletFooter({ export function RemoveLastMnemonicWalletFooter({
onPress, onPress,
......
...@@ -11,10 +11,11 @@ import { Delay } from 'src/components/layout/Delayed' ...@@ -11,10 +11,11 @@ import { Delay } from 'src/components/layout/Delayed'
import { useBiometricAppSettings, useBiometricPrompt } from 'src/features/biometrics/hooks' import { useBiometricAppSettings, useBiometricPrompt } from 'src/features/biometrics/hooks'
import { closeModal } from 'src/features/modals/modalSlice' import { closeModal } from 'src/features/modals/modalSlice'
import { selectModalState } from 'src/features/modals/selectModalState' import { selectModalState } from 'src/features/modals/selectModalState'
import { OnboardingScreens, Screens } from 'src/screens/Screens'
import { AnimatedFlex, Button, ColorTokens, Flex, Text, ThemeKeys, useSporeColors } from 'ui/src' import { AnimatedFlex, Button, ColorTokens, Flex, Text, ThemeKeys, useSporeColors } from 'ui/src'
import { iconSizes, opacify } from 'ui/src/theme' import { iconSizes, opacify } from 'ui/src/theme'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding' import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding'
import { MobileScreens, OnboardingScreens } from 'uniswap/src/types/screens/mobile'
import { SpinningLoader } from 'wallet/src/components/loading/SpinningLoader' import { SpinningLoader } from 'wallet/src/components/loading/SpinningLoader'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { import {
...@@ -24,7 +25,6 @@ import { ...@@ -24,7 +25,6 @@ import {
import { useAccounts } from 'wallet/src/features/wallet/hooks' import { useAccounts } from 'wallet/src/features/wallet/hooks'
import { selectSignerMnemonicAccounts } from 'wallet/src/features/wallet/selectors' import { selectSignerMnemonicAccounts } from 'wallet/src/features/wallet/selectors'
import { setFinishedOnboarding } from 'wallet/src/features/wallet/slice' import { setFinishedOnboarding } from 'wallet/src/features/wallet/slice'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
export function RemoveWalletModal(): JSX.Element | null { export function RemoveWalletModal(): JSX.Element | null {
const { t } = useTranslation() const { t } = useTranslation()
...@@ -65,7 +65,7 @@ export function RemoveWalletModal(): JSX.Element | null { ...@@ -65,7 +65,7 @@ export function RemoveWalletModal(): JSX.Element | null {
navigateToOnboardingImportMethod() navigateToOnboardingImportMethod()
} else if (isReplacing) { } else if (isReplacing) {
// there are account left and it's replacing, user has view-only accounts left // there are account left and it's replacing, user has view-only accounts left
navigate(Screens.OnboardingStack, { navigate(MobileScreens.OnboardingStack, {
screen: OnboardingScreens.ImportMethod, screen: OnboardingScreens.ImportMethod,
params: { params: {
importType: ImportType.NotYetSelected, importType: ImportType.NotYetSelected,
......
import { CommonActions } from '@react-navigation/core' import { CommonActions } from '@react-navigation/core'
import { dispatchNavigationAction } from 'src/app/navigation/rootNavigation' import { dispatchNavigationAction } from 'src/app/navigation/rootNavigation'
import { OnboardingScreens, Screens } from 'src/screens/Screens'
import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding' import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding'
import { MobileScreens, OnboardingScreens } from 'uniswap/src/types/screens/mobile'
// This fast-forwards user to the same app state as if // This fast-forwards user to the same app state as if
// they have pressed "Get Started" on Landing and should now see import method view // they have pressed "Get Started" on Landing and should now see import method view
...@@ -11,7 +11,7 @@ export function navigateToOnboardingImportMethod(): void { ...@@ -11,7 +11,7 @@ export function navigateToOnboardingImportMethod(): void {
index: 0, index: 0,
routes: [ routes: [
{ {
name: Screens.OnboardingStack, name: MobileScreens.OnboardingStack,
state: { state: {
index: 1, index: 1,
routes: [ routes: [
......
...@@ -3,13 +3,13 @@ import { useTranslation } from 'react-i18next' ...@@ -3,13 +3,13 @@ import { useTranslation } from 'react-i18next'
import { useAppDispatch } from 'src/app/hooks' import { useAppDispatch } from 'src/app/hooks'
import { navigate } from 'src/app/navigation/rootNavigation' import { navigate } from 'src/app/navigation/rootNavigation'
import { closeAllModals, closeModal } from 'src/features/modals/modalSlice' import { closeAllModals, closeModal } from 'src/features/modals/modalSlice'
import { OnboardingScreens, Screens } from 'src/screens/Screens'
import { Button, Flex, Text, useSporeColors } from 'ui/src' import { Button, Flex, Text, useSporeColors } from 'ui/src'
import LockIcon from 'ui/src/assets/icons/lock.svg' import LockIcon from 'ui/src/assets/icons/lock.svg'
import { iconSizes, opacify } from 'ui/src/theme' import { iconSizes, opacify } from 'ui/src/theme'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding' import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding'
import { MobileScreens, OnboardingScreens } from 'uniswap/src/types/screens/mobile'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
export function RestoreWalletModal(): JSX.Element | null { export function RestoreWalletModal(): JSX.Element | null {
const { t } = useTranslation() const { t } = useTranslation()
...@@ -22,7 +22,7 @@ export function RestoreWalletModal(): JSX.Element | null { ...@@ -22,7 +22,7 @@ export function RestoreWalletModal(): JSX.Element | null {
const onRestore = (): void => { const onRestore = (): void => {
dispatch(closeAllModals()) dispatch(closeAllModals())
navigate(Screens.OnboardingStack, { navigate(MobileScreens.OnboardingStack, {
screen: OnboardingScreens.RestoreCloudBackupLoading, screen: OnboardingScreens.RestoreCloudBackupLoading,
params: { params: {
entryPoint: OnboardingEntryPoint.Sidebar, entryPoint: OnboardingEntryPoint.Sidebar,
......
import React from 'react' import React from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { useBiometricName } from 'src/features/biometrics/hooks' import { useBiometricName } from 'src/features/biometrics/hooks'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { isAndroid } from 'uniswap/src/utils/platform' import { isAndroid } from 'uniswap/src/utils/platform'
import { import {
WarningModal, WarningModal,
WarningModalProps, WarningModalProps,
} from 'wallet/src/components/modals/WarningModal/WarningModal' } from 'wallet/src/components/modals/WarningModal/WarningModal'
import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/types' import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/types'
import { ModalName } from 'wallet/src/telemetry/constants'
type Props = { type Props = {
isTouchIdDevice: boolean isTouchIdDevice: boolean
......
...@@ -8,14 +8,14 @@ import { ...@@ -8,14 +8,14 @@ import {
SettingsStackParamList, SettingsStackParamList,
} from 'src/app/navigation/types' } from 'src/app/navigation/types'
import { openModal } from 'src/features/modals/modalSlice' import { openModal } from 'src/features/modals/modalSlice'
import { Screens } from 'src/screens/Screens'
import { Flex, Text, TouchableArea, useSporeColors } from 'ui/src' import { Flex, Text, TouchableArea, useSporeColors } from 'ui/src'
import { RotatableChevron } from 'ui/src/components/icons' import { RotatableChevron } from 'ui/src/components/icons'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { Switch } from 'wallet/src/components/buttons/Switch' import { Switch } from 'wallet/src/components/buttons/Switch'
import { Arrow } from 'wallet/src/components/icons/Arrow' import { Arrow } from 'wallet/src/components/icons/Arrow'
import { useAppDispatch } from 'wallet/src/state' import { useAppDispatch } from 'wallet/src/state'
import { ModalName } from 'wallet/src/telemetry/constants'
import { openUri } from 'wallet/src/utils/linking' import { openUri } from 'wallet/src/utils/linking'
export interface SettingsSection { export interface SettingsSection {
...@@ -31,7 +31,7 @@ export interface SettingsSectionItemComponent { ...@@ -31,7 +31,7 @@ export interface SettingsSectionItemComponent {
type SettingsModal = typeof ModalName.FiatCurrencySelector | typeof ModalName.LanguageSelector type SettingsModal = typeof ModalName.FiatCurrencySelector | typeof ModalName.LanguageSelector
export interface SettingsSectionItem { export interface SettingsSectionItem {
screen?: keyof SettingsStackParamList | typeof Screens.OnboardingStack screen?: keyof SettingsStackParamList | typeof MobileScreens.OnboardingStack
modal?: SettingsModal modal?: SettingsModal
screenProps?: ValueOf<SettingsStackParamList> | NavigatorScreenParams<OnboardingStackParamList> screenProps?: ValueOf<SettingsStackParamList> | NavigatorScreenParams<OnboardingStackParamList>
externalLink?: string externalLink?: string
......
...@@ -13,7 +13,6 @@ import { ...@@ -13,7 +13,6 @@ import {
TAB_VIEW_SCROLL_THROTTLE, TAB_VIEW_SCROLL_THROTTLE,
TabProps, TabProps,
} from 'src/components/layout/TabHelpers' } from 'src/components/layout/TabHelpers'
import { Screens } from 'src/screens/Screens'
import { import {
AnimatedFlex, AnimatedFlex,
Flex, Flex,
...@@ -24,6 +23,7 @@ import { ...@@ -24,6 +23,7 @@ import {
} from 'ui/src' } from 'ui/src'
import { zIndices } from 'ui/src/theme' import { zIndices } from 'ui/src/theme'
import { CurrencyId } from 'uniswap/src/types/currency' import { CurrencyId } from 'uniswap/src/types/currency'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { isAndroid } from 'uniswap/src/utils/platform' import { isAndroid } from 'uniswap/src/utils/platform'
import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard' import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard'
import { isError, isNonPollingRequestInFlight } from 'wallet/src/data/utils' import { isError, isNonPollingRequestInFlight } from 'wallet/src/data/utils'
...@@ -194,7 +194,7 @@ export const TokenBalanceListInner = forwardRef< ...@@ -194,7 +194,7 @@ export const TokenBalanceListInner = forwardRef<
interactive={balancesById !== undefined} interactive={balancesById !== undefined}
screenName={ screenName={
// Marks the home screen as interactive when balances are defined // Marks the home screen as interactive when balances are defined
Screens.Home MobileScreens.Home
}> }>
{!balancesById ? ( {!balancesById ? (
isNonPollingRequestInFlight(networkStatus) ? ( isNonPollingRequestInFlight(networkStatus) ? (
......
import React from 'react' import React from 'react'
import { SvgProps } from 'react-native-svg' import { SvgProps } from 'react-native-svg'
import { useAppDispatch } from 'src/app/hooks' import { useAppDispatch } from 'src/app/hooks'
import Trace from 'src/components/Trace/Trace'
import { Flex, IconProps, Text, TouchableArea, useSporeColors } from 'ui/src' import { Flex, IconProps, Text, TouchableArea, useSporeColors } from 'ui/src'
import CopyIcon from 'ui/src/assets/icons/copy-sheets.svg' import CopyIcon from 'ui/src/assets/icons/copy-sheets.svg'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import Trace from 'uniswap/src/features/telemetry/Trace'
import { ElementNameType } from 'uniswap/src/features/telemetry/constants'
import { pushNotification } from 'wallet/src/features/notifications/slice' import { pushNotification } from 'wallet/src/features/notifications/slice'
import { AppNotificationType, CopyNotificationType } from 'wallet/src/features/notifications/types' import { AppNotificationType, CopyNotificationType } from 'wallet/src/features/notifications/types'
import { ElementNameType } from 'wallet/src/telemetry/constants'
import { setClipboard } from 'wallet/src/utils/clipboard' import { setClipboard } from 'wallet/src/utils/clipboard'
import { openUri } from 'wallet/src/utils/linking' import { openUri } from 'wallet/src/utils/linking'
......
...@@ -2,7 +2,7 @@ import React from 'react' ...@@ -2,7 +2,7 @@ import React from 'react'
import { Flex, TouchableArea } from 'ui/src' import { Flex, TouchableArea } from 'ui/src'
import SendIcon from 'ui/src/assets/icons/send-action.svg' import SendIcon from 'ui/src/assets/icons/send-action.svg'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ElementName } from 'wallet/src/telemetry/constants' import { ElementName } from 'uniswap/src/features/telemetry/constants'
type Props = { type Props = {
onPress: () => void onPress: () => void
......
import React, { useCallback } from 'react' import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks' import { useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks'
import Trace from 'src/components/Trace/Trace'
import { MobileEventName } from 'src/features/telemetry/constants'
import { Flex, Separator, Text, TouchableArea, useSporeColors } from 'ui/src' import { Flex, Separator, Text, TouchableArea, useSporeColors } from 'ui/src'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { PortfolioBalance } from 'uniswap/src/features/dataApi/types' import { PortfolioBalance } from 'uniswap/src/features/dataApi/types'
import Trace from 'uniswap/src/features/telemetry/Trace'
import { MobileEventName } from 'uniswap/src/features/telemetry/constants'
import { CurrencyId } from 'uniswap/src/types/currency' import { CurrencyId } from 'uniswap/src/types/currency'
import { NumberType } from 'utilities/src/format/types' import { NumberType } from 'utilities/src/format/types'
import { TokenLogo } from 'wallet/src/components/CurrencyLogo/TokenLogo' import { TokenLogo } from 'wallet/src/components/CurrencyLogo/TokenLogo'
......
import React from 'react' import React from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import Trace from 'src/components/Trace/Trace'
import { Button, Flex, useSporeColors } from 'ui/src' import { Button, Flex, useSporeColors } from 'ui/src'
import { opacify, validColor } from 'ui/src/theme' import { opacify, validColor } from 'ui/src/theme'
import { ElementName, ElementNameType, SectionName } from 'wallet/src/telemetry/constants' import Trace from 'uniswap/src/features/telemetry/Trace'
import { ElementName, ElementNameType, SectionName } from 'uniswap/src/features/telemetry/constants'
import { getContrastPassingTextColor } from 'wallet/src/utils/colors' import { getContrastPassingTextColor } from 'wallet/src/utils/colors'
function CTAButton({ function CTAButton({
......
...@@ -6,9 +6,9 @@ import { Flex, Text } from 'ui/src' ...@@ -6,9 +6,9 @@ import { Flex, Text } from 'ui/src'
import GlobeIcon from 'ui/src/assets/icons/globe-filled.svg' import GlobeIcon from 'ui/src/assets/icons/globe-filled.svg'
import TwitterIcon from 'ui/src/assets/icons/x-twitter.svg' import TwitterIcon from 'ui/src/assets/icons/x-twitter.svg'
import { TokenDetailsScreenQuery } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks' import { TokenDetailsScreenQuery } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { ElementName } from 'uniswap/src/features/telemetry/constants'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { CHAIN_INFO } from 'wallet/src/constants/chains' import { CHAIN_INFO } from 'wallet/src/constants/chains'
import { ElementName } from 'wallet/src/telemetry/constants'
import { import {
currencyIdToAddress, currencyIdToAddress,
currencyIdToChain, currencyIdToChain,
......
import { useCrossChainBalances, useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks' import { useCrossChainBalances, useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks'
import { Screens } from 'src/screens/Screens'
import { preloadedMobileState } from 'src/test/fixtures' import { preloadedMobileState } from 'src/test/fixtures'
import { act, renderHook, waitFor } from 'src/test/test-utils' import { act, renderHook, waitFor } from 'src/test/test-utils'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { currencyIdToContractInput } from 'wallet/src/features/dataApi/utils' import { currencyIdToContractInput } from 'wallet/src/features/dataApi/utils'
import { import {
SAMPLE_CURRENCY_ID_1, SAMPLE_CURRENCY_ID_1,
...@@ -155,7 +155,7 @@ describe(useTokenDetailsNavigation, () => { ...@@ -155,7 +155,7 @@ describe(useTokenDetailsNavigation, () => {
await act(() => result.current.navigate(SAMPLE_CURRENCY_ID_1)) await act(() => result.current.navigate(SAMPLE_CURRENCY_ID_1))
expect(mockedNavigation.navigate).toHaveBeenCalledTimes(1) expect(mockedNavigation.navigate).toHaveBeenCalledTimes(1)
expect(mockedNavigation.navigate).toHaveBeenNthCalledWith(1, Screens.TokenDetails, { expect(mockedNavigation.navigate).toHaveBeenNthCalledWith(1, MobileScreens.TokenDetails, {
currencyId: SAMPLE_CURRENCY_ID_1, currencyId: SAMPLE_CURRENCY_ID_1,
}) })
}) })
...@@ -169,7 +169,7 @@ describe(useTokenDetailsNavigation, () => { ...@@ -169,7 +169,7 @@ describe(useTokenDetailsNavigation, () => {
expect(mockedNavigation.pop).toHaveBeenCalledTimes(1) expect(mockedNavigation.pop).toHaveBeenCalledTimes(1)
expect(mockedNavigation.push).toHaveBeenCalledTimes(1) expect(mockedNavigation.push).toHaveBeenCalledTimes(1)
expect(mockedNavigation.push).toHaveBeenNthCalledWith(1, Screens.TokenDetails, { expect(mockedNavigation.push).toHaveBeenNthCalledWith(1, MobileScreens.TokenDetails, {
currencyId: SAMPLE_CURRENCY_ID_1, currencyId: SAMPLE_CURRENCY_ID_1,
}) })
}) })
...@@ -182,7 +182,7 @@ describe(useTokenDetailsNavigation, () => { ...@@ -182,7 +182,7 @@ describe(useTokenDetailsNavigation, () => {
expect(mockedNavigation.pop).not.toHaveBeenCalled() expect(mockedNavigation.pop).not.toHaveBeenCalled()
expect(mockedNavigation.push).toHaveBeenCalledTimes(1) expect(mockedNavigation.push).toHaveBeenCalledTimes(1)
expect(mockedNavigation.push).toHaveBeenNthCalledWith(1, Screens.TokenDetails, { expect(mockedNavigation.push).toHaveBeenNthCalledWith(1, MobileScreens.TokenDetails, {
currencyId: SAMPLE_CURRENCY_ID_1, currencyId: SAMPLE_CURRENCY_ID_1,
}) })
}) })
......
import { useCallback, useMemo } from 'react' import { useCallback, useMemo } from 'react'
import { useAppStackNavigation } from 'src/app/navigation/types' import { useAppStackNavigation } from 'src/app/navigation/types'
import { useBalances } from 'src/features/dataApi/balances' import { useBalances } from 'src/features/dataApi/balances'
import { Screens } from 'src/screens/Screens'
import { import {
Chain, Chain,
useTokenDetailsScreenLazyQuery, useTokenDetailsScreenLazyQuery,
} from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks' } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { PortfolioBalance } from 'uniswap/src/features/dataApi/types' import { PortfolioBalance } from 'uniswap/src/features/dataApi/types'
import { CurrencyId } from 'uniswap/src/types/currency' import { CurrencyId } from 'uniswap/src/types/currency'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { fromGraphQLChain } from 'wallet/src/features/chains/utils' import { fromGraphQLChain } from 'wallet/src/features/chains/utils'
import { currencyIdToContractInput } from 'wallet/src/features/dataApi/utils' import { currencyIdToContractInput } from 'wallet/src/features/dataApi/utils'
import { import {
...@@ -80,14 +80,14 @@ export function useTokenDetailsNavigation(): { ...@@ -80,14 +80,14 @@ export function useTokenDetailsNavigation(): {
if (navigation.canGoBack()) { if (navigation.canGoBack()) {
navigation.pop() navigation.pop()
} }
navigation.push(Screens.TokenDetails, { currencyId }) navigation.push(MobileScreens.TokenDetails, { currencyId })
}, },
[navigation] [navigation]
) )
const navigate = useCallback( const navigate = useCallback(
(currencyId: CurrencyId): void => { (currencyId: CurrencyId): void => {
navigation.navigate(Screens.TokenDetails, { currencyId }) navigation.navigate(MobileScreens.TokenDetails, { currencyId })
}, },
[navigation] [navigation]
) )
......
import { memo, PropsWithChildren } from 'react'
import { ManualPageViewScreen, MobileEventName } from 'src/features/telemetry/constants'
import { AppScreen } from 'src/screens/Screens'
import { TraceProps, Trace as UntypedTrace } from 'utilities/src/telemetry/trace/Trace'
import { ElementNameType, ModalNameType, SectionNameType } from 'wallet/src/telemetry/constants'
// Mobile specific version of ITraceContext
interface MobileTraceContext {
screen?: AppScreen | ManualPageViewScreen
section?: SectionNameType
modal?: ModalNameType
element?: ElementNameType
}
interface MobileTracePropsOverrides {
pressEvent?: MobileEventName
}
type MobileTraceProps = MobileTraceContext &
Omit<TraceProps, 'pressEvent'> &
MobileTracePropsOverrides
function _Trace({ children, ...rest }: PropsWithChildren<MobileTraceProps>): JSX.Element {
return <UntypedTrace {...rest}>{children}</UntypedTrace>
}
const Trace = memo(_Trace)
export default Trace
import { SharedEventName } from '@uniswap/analytics-events' import { SharedEventName } from '@uniswap/analytics-events'
import React from 'react' import React from 'react'
import { Route, TabView, TabViewProps } from 'react-native-tab-view' import { Route, TabView, TabViewProps } from 'react-native-tab-view'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry' import { SectionNameType } from 'uniswap/src/features/telemetry/constants'
import { Screens } from 'src/screens/Screens' import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { SectionNameType } from 'wallet/src/telemetry/constants' import { MobileScreens } from 'uniswap/src/types/screens/mobile'
type TraceRouteProps = { key: SectionNameType } & Route type TraceRouteProps = { key: SectionNameType } & Route
...@@ -12,9 +12,9 @@ export default function TraceTabView<T extends TraceRouteProps>({ ...@@ -12,9 +12,9 @@ export default function TraceTabView<T extends TraceRouteProps>({
navigationState, navigationState,
screenName, screenName,
...rest ...rest
}: TabViewProps<T> & { screenName: Screens }): JSX.Element { }: TabViewProps<T> & { screenName: MobileScreens }): JSX.Element {
const onIndexChangeTrace = (index: number): void => { const onIndexChangeTrace = (index: number): void => {
sendMobileAnalyticsEvent(SharedEventName.PAGE_VIEWED, { sendAnalyticsEvent(SharedEventName.PAGE_VIEWED, {
section: navigationState.routes[index]?.key, section: navigationState.routes[index]?.key,
screen: screenName, screen: screenName,
}) })
......
...@@ -4,9 +4,10 @@ import renderer, { act } from 'react-test-renderer' ...@@ -4,9 +4,10 @@ import renderer, { act } from 'react-test-renderer'
import * as appHooks from 'src/app/hooks' import * as appHooks from 'src/app/hooks'
import { TraceUserProperties } from 'src/components/Trace/TraceUserProperties' import { TraceUserProperties } from 'src/components/Trace/TraceUserProperties'
import * as biometricHooks from 'src/features/biometrics/hooks' import * as biometricHooks from 'src/features/biometrics/hooks'
import { AuthMethod, UserPropertyName } from 'src/features/telemetry/constants' import { AuthMethod } from 'src/features/telemetry/utils'
import * as versionUtils from 'src/utils/version' import * as versionUtils from 'src/utils/version'
import * as useIsDarkModeFile from 'ui/src/hooks/useIsDarkMode' import * as useIsDarkModeFile from 'ui/src/hooks/useIsDarkMode'
import { MobileUserPropertyName } from 'uniswap/src/features/telemetry/user'
import { analytics } from 'utilities/src/telemetry/analytics/analytics' import { analytics } from 'utilities/src/telemetry/analytics/analytics'
import { FiatCurrency } from 'wallet/src/features/fiatCurrency/constants' import { FiatCurrency } from 'wallet/src/features/fiatCurrency/constants'
import * as fiatCurrencyHooks from 'wallet/src/features/fiatCurrency/hooks' import * as fiatCurrencyHooks from 'wallet/src/features/fiatCurrency/hooks'
...@@ -23,6 +24,13 @@ function mockFn(module: any, func: string, returnValue: any): jest.SpyInstance<a ...@@ -23,6 +24,13 @@ function mockFn(module: any, func: string, returnValue: any): jest.SpyInstance<a
jest.mock('react-native/Libraries/Utilities/useColorScheme') jest.mock('react-native/Libraries/Utilities/useColorScheme')
jest.mock('wallet/src/features/gating/userPropertyHooks') jest.mock('wallet/src/features/gating/userPropertyHooks')
jest.mock('wallet/src/features/wallet/Keyring/Keyring', () => {
return {
Keyring: {
getMnemonicIds: (): Promise<string[]> => Promise.resolve([]),
},
}
})
const address1 = '0x168fA52Da8A45cEb01318E72B299b2d6A17167BF' const address1 = '0x168fA52Da8A45cEb01318E72B299b2d6A17167BF'
const address2 = '0x168fA52Da8A45cEb01318E72B299b2d6A17167BD' const address2 = '0x168fA52Da8A45cEb01318E72B299b2d6A17167BD'
...@@ -94,34 +102,37 @@ describe('TraceUserProperties', () => { ...@@ -94,34 +102,37 @@ describe('TraceUserProperties', () => {
}) })
// Check setUserProperty calls with correct values // Check setUserProperty calls with correct values
expect(mocked).toHaveBeenCalledWith(UserPropertyName.AppVersion, '1.0.0.345') expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.AppVersion, '1.0.0.345')
expect(mocked).toHaveBeenCalledWith(UserPropertyName.DarkMode, true) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.DarkMode, true)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.ActiveWalletAddress, 'address') expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.ActiveWalletAddress, 'address')
expect(mocked).toHaveBeenCalledWith( expect(mocked).toHaveBeenCalledWith(
UserPropertyName.ActiveWalletType, MobileUserPropertyName.ActiveWalletType,
AccountType.SignerMnemonic AccountType.SignerMnemonic
) )
expect(mocked).toHaveBeenCalledWith(UserPropertyName.IsCloudBackedUp, true) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.IsCloudBackedUp, true)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.IsPushEnabled, true) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.IsPushEnabled, true)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.IsHideSmallBalancesEnabled, false) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.IsHideSmallBalancesEnabled, false)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.IsHideSpamTokensEnabled, true) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.IsHideSpamTokensEnabled, true)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.WalletViewOnlyCount, 2) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.WalletViewOnlyCount, 2)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.WalletSignerCount, 3) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.WalletSignerCount, 3)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.WalletSignerAccounts, [ expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.WalletSignerAccounts, [
address1, address1,
address2, address2,
address3, address3,
]) ])
expect(mocked).toHaveBeenCalledWith( expect(mocked).toHaveBeenCalledWith(
UserPropertyName.WalletSwapProtectionSetting, MobileUserPropertyName.WalletSwapProtectionSetting,
SwapProtectionSetting.On SwapProtectionSetting.On
) )
expect(mocked).toHaveBeenCalledWith(UserPropertyName.AppOpenAuthMethod, AuthMethod.FaceId) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.AppOpenAuthMethod, AuthMethod.FaceId)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.TransactionAuthMethod, AuthMethod.FaceId) expect(mocked).toHaveBeenCalledWith(
expect(mocked).toHaveBeenCalledWith(UserPropertyName.Language, 'English') MobileUserPropertyName.TransactionAuthMethod,
expect(mocked).toHaveBeenCalledWith(UserPropertyName.Currency, 'USD') AuthMethod.FaceId
)
expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.Language, 'English')
expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.Currency, 'USD')
expect(mocked).toHaveBeenCalledTimes(16) expect(mocked).toHaveBeenCalledTimes(17)
}) })
it('sets user properties without active account', async () => { it('sets user properties without active account', async () => {
...@@ -154,13 +165,16 @@ describe('TraceUserProperties', () => { ...@@ -154,13 +165,16 @@ describe('TraceUserProperties', () => {
}) })
// Check setUserProperty calls with correct values // Check setUserProperty calls with correct values
expect(mocked).toHaveBeenCalledWith(UserPropertyName.AppVersion, '1.0.0.345') expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.AppVersion, '1.0.0.345')
expect(mocked).toHaveBeenCalledWith(UserPropertyName.DarkMode, true) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.DarkMode, true)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.WalletViewOnlyCount, 0) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.WalletViewOnlyCount, 0)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.WalletSignerCount, 0) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.WalletSignerCount, 0)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.AppOpenAuthMethod, AuthMethod.None) expect(mocked).toHaveBeenCalledWith(MobileUserPropertyName.AppOpenAuthMethod, AuthMethod.None)
expect(mocked).toHaveBeenCalledWith(UserPropertyName.TransactionAuthMethod, AuthMethod.None) expect(mocked).toHaveBeenCalledWith(
MobileUserPropertyName.TransactionAuthMethod,
expect(mocked).toHaveBeenCalledTimes(10) AuthMethod.None
)
expect(mocked).toHaveBeenCalledTimes(11)
}) })
}) })
...@@ -5,16 +5,17 @@ import { ...@@ -5,16 +5,17 @@ import {
useBiometricAppSettings, useBiometricAppSettings,
useDeviceSupportsBiometricAuth, useDeviceSupportsBiometricAuth,
} from 'src/features/biometrics/hooks' } from 'src/features/biometrics/hooks'
import { setUserProperty } from 'src/features/telemetry'
import { UserPropertyName, getAuthMethod } from 'src/features/telemetry/constants'
import { selectAllowAnalytics } from 'src/features/telemetry/selectors' import { selectAllowAnalytics } from 'src/features/telemetry/selectors'
import { getAuthMethod } from 'src/features/telemetry/utils'
import { getFullAppVersion } from 'src/utils/version' import { getFullAppVersion } from 'src/utils/version'
import { useIsDarkMode } from 'ui/src' import { useIsDarkMode } from 'ui/src'
import { MobileUserPropertyName, setUserProperty } from 'uniswap/src/features/telemetry/user'
import { isAndroid } from 'uniswap/src/utils/platform' import { isAndroid } from 'uniswap/src/utils/platform'
import { analytics } from 'utilities/src/telemetry/analytics/analytics' import { analytics } from 'utilities/src/telemetry/analytics/analytics'
import { useAppFiatCurrency } from 'wallet/src/features/fiatCurrency/hooks' import { useAppFiatCurrency } from 'wallet/src/features/fiatCurrency/hooks'
import { useGatingUserPropertyUsernames } from 'wallet/src/features/gating/userPropertyHooks' import { useGatingUserPropertyUsernames } from 'wallet/src/features/gating/userPropertyHooks'
import { useCurrentLanguageInfo } from 'wallet/src/features/language/hooks' import { useCurrentLanguageInfo } from 'wallet/src/features/language/hooks'
import { Keyring } from 'wallet/src/features/wallet/Keyring/Keyring'
import { BackupType } from 'wallet/src/features/wallet/accounts/types' import { BackupType } from 'wallet/src/features/wallet/accounts/types'
import { import {
useActiveAccount, useActiveAccount,
...@@ -45,10 +46,15 @@ export function TraceUserProperties(): null { ...@@ -45,10 +46,15 @@ export function TraceUserProperties(): null {
useGatingUserPropertyUsernames() useGatingUserPropertyUsernames()
useEffect(() => { useEffect(() => {
setUserProperty(UserPropertyName.AppVersion, getFullAppVersion()) setUserProperty(MobileUserPropertyName.AppVersion, getFullAppVersion())
Keyring.getMnemonicIds() // Temporary to prepare for fix, should be removed in 1.28
.then((mnemonicIds) => {
setUserProperty(MobileUserPropertyName.MnemonicCount, mnemonicIds.length)
})
.catch(() => {})
if (isAndroid) { if (isAndroid) {
NativeModules.AndroidDeviceModule.getPerformanceClass().then((perfClass: number) => { NativeModules.AndroidDeviceModule.getPerformanceClass().then((perfClass: number) => {
setUserProperty(UserPropertyName.AndroidPerfClass, perfClass) setUserProperty(MobileUserPropertyName.AndroidPerfClass, perfClass)
}) })
} }
return () => { return () => {
...@@ -57,58 +63,61 @@ export function TraceUserProperties(): null { ...@@ -57,58 +63,61 @@ export function TraceUserProperties(): null {
}, [allowAnalytics]) }, [allowAnalytics])
useEffect(() => { useEffect(() => {
setUserProperty(UserPropertyName.WalletSwapProtectionSetting, swapProtectionSetting) setUserProperty(MobileUserPropertyName.WalletSwapProtectionSetting, swapProtectionSetting)
}, [allowAnalytics, swapProtectionSetting]) }, [allowAnalytics, swapProtectionSetting])
useEffect(() => { useEffect(() => {
setUserProperty(UserPropertyName.DarkMode, isDarkMode) setUserProperty(MobileUserPropertyName.DarkMode, isDarkMode)
}, [allowAnalytics, isDarkMode]) }, [allowAnalytics, isDarkMode])
useEffect(() => { useEffect(() => {
setUserProperty(UserPropertyName.WalletSignerCount, signerAccounts.length) setUserProperty(MobileUserPropertyName.WalletSignerCount, signerAccounts.length)
setUserProperty( setUserProperty(
UserPropertyName.WalletSignerAccounts, MobileUserPropertyName.WalletSignerAccounts,
signerAccounts.map((account) => account.address) signerAccounts.map((account) => account.address)
) )
}, [allowAnalytics, signerAccounts]) }, [allowAnalytics, signerAccounts])
useEffect(() => { useEffect(() => {
setUserProperty(UserPropertyName.WalletViewOnlyCount, viewOnlyAccounts.length) setUserProperty(MobileUserPropertyName.WalletViewOnlyCount, viewOnlyAccounts.length)
}, [allowAnalytics, viewOnlyAccounts]) }, [allowAnalytics, viewOnlyAccounts])
useEffect(() => { useEffect(() => {
if (!activeAccount) { if (!activeAccount) {
return return
} }
setUserProperty(UserPropertyName.ActiveWalletAddress, activeAccount.address) setUserProperty(MobileUserPropertyName.ActiveWalletAddress, activeAccount.address)
setUserProperty(UserPropertyName.ActiveWalletType, activeAccount.type) setUserProperty(MobileUserPropertyName.ActiveWalletType, activeAccount.type)
setUserProperty( setUserProperty(
UserPropertyName.IsCloudBackedUp, MobileUserPropertyName.IsCloudBackedUp,
Boolean(activeAccount.backups?.includes(BackupType.Cloud)) Boolean(activeAccount.backups?.includes(BackupType.Cloud))
) )
setUserProperty(UserPropertyName.IsPushEnabled, Boolean(activeAccount.pushNotificationsEnabled)) setUserProperty(
MobileUserPropertyName.IsPushEnabled,
Boolean(activeAccount.pushNotificationsEnabled)
)
setUserProperty(UserPropertyName.IsHideSmallBalancesEnabled, hideSmallBalances) setUserProperty(MobileUserPropertyName.IsHideSmallBalancesEnabled, hideSmallBalances)
setUserProperty(UserPropertyName.IsHideSpamTokensEnabled, hideSpamTokens) setUserProperty(MobileUserPropertyName.IsHideSpamTokensEnabled, hideSpamTokens)
}, [allowAnalytics, activeAccount, hideSmallBalances, hideSpamTokens]) }, [allowAnalytics, activeAccount, hideSmallBalances, hideSpamTokens])
useEffect(() => { useEffect(() => {
setUserProperty( setUserProperty(
UserPropertyName.AppOpenAuthMethod, MobileUserPropertyName.AppOpenAuthMethod,
getAuthMethod(biometricsAppSettingsState.requiredForAppAccess, touchId, faceId) getAuthMethod(biometricsAppSettingsState.requiredForAppAccess, touchId, faceId)
) )
setUserProperty( setUserProperty(
UserPropertyName.TransactionAuthMethod, MobileUserPropertyName.TransactionAuthMethod,
getAuthMethod(biometricsAppSettingsState.requiredForTransactions, touchId, faceId) getAuthMethod(biometricsAppSettingsState.requiredForTransactions, touchId, faceId)
) )
}, [allowAnalytics, biometricsAppSettingsState, touchId, faceId]) }, [allowAnalytics, biometricsAppSettingsState, touchId, faceId])
useEffect(() => { useEffect(() => {
setUserProperty(UserPropertyName.Language, currentLanguage) setUserProperty(MobileUserPropertyName.Language, currentLanguage)
}, [allowAnalytics, currentLanguage]) }, [allowAnalytics, currentLanguage])
useEffect(() => { useEffect(() => {
setUserProperty(UserPropertyName.Currency, currentFiatCurrency) setUserProperty(MobileUserPropertyName.Currency, currentFiatCurrency)
}, [allowAnalytics, currentFiatCurrency]) }, [allowAnalytics, currentFiatCurrency])
return null return null
......
...@@ -14,8 +14,8 @@ import { ...@@ -14,8 +14,8 @@ import {
import { AnimatedFlex, Flex, Text, TouchableArea, useDeviceDimensions } from 'ui/src' import { AnimatedFlex, Flex, Text, TouchableArea, useDeviceDimensions } from 'ui/src'
import { Edit, Scan } from 'ui/src/components/icons' import { Edit, Scan } from 'ui/src/components/icons'
import { spacing } from 'ui/src/theme' import { spacing } from 'ui/src/theme'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
import { ModalName } from 'wallet/src/telemetry/constants'
type ConnectedDappsProps = { type ConnectedDappsProps = {
sessions: WalletConnectSession[] sessions: WalletConnectSession[]
......
...@@ -8,6 +8,8 @@ import { wcWeb3Wallet } from 'src/features/walletConnect/saga' ...@@ -8,6 +8,8 @@ import { wcWeb3Wallet } from 'src/features/walletConnect/saga'
import { WalletConnectSession, removeSession } from 'src/features/walletConnect/walletConnectSlice' import { WalletConnectSession, removeSession } from 'src/features/walletConnect/walletConnectSlice'
import { Button, Flex, Text } from 'ui/src' import { Button, Flex, Text } from 'ui/src'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { WalletConnectEvent } from 'uniswap/src/types/walletConnect'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { ONE_SECOND_MS } from 'utilities/src/time/time' import { ONE_SECOND_MS } from 'utilities/src/time/time'
import { NetworkLogo } from 'wallet/src/components/CurrencyLogo/NetworkLogo' import { NetworkLogo } from 'wallet/src/components/CurrencyLogo/NetworkLogo'
...@@ -16,8 +18,6 @@ import { CHAIN_INFO } from 'wallet/src/constants/chains' ...@@ -16,8 +18,6 @@ import { CHAIN_INFO } from 'wallet/src/constants/chains'
import { pushNotification } from 'wallet/src/features/notifications/slice' import { pushNotification } from 'wallet/src/features/notifications/slice'
import { AppNotificationType } from 'wallet/src/features/notifications/types' import { AppNotificationType } from 'wallet/src/features/notifications/types'
import { useActiveAccountAddressWithThrow } from 'wallet/src/features/wallet/hooks' import { useActiveAccountAddressWithThrow } from 'wallet/src/features/wallet/hooks'
import { WalletConnectEvent } from 'wallet/src/features/walletConnect/types'
import { ModalName } from 'wallet/src/telemetry/constants'
interface DappConnectedNetworkModalProps { interface DappConnectedNetworkModalProps {
session: WalletConnectSession session: WalletConnectSession
onClose: () => void onClose: () => void
......
...@@ -12,14 +12,14 @@ import { WalletConnectSession, removeSession } from 'src/features/walletConnect/ ...@@ -12,14 +12,14 @@ import { WalletConnectSession, removeSession } from 'src/features/walletConnect/
import { disableOnPress } from 'src/utils/disableOnPress' import { disableOnPress } from 'src/utils/disableOnPress'
import { AnimatedTouchableArea, Flex, ImpactFeedbackStyle, Text, TouchableArea } from 'ui/src' import { AnimatedTouchableArea, Flex, ImpactFeedbackStyle, Text, TouchableArea } from 'ui/src'
import { iconSizes, spacing } from 'ui/src/theme' import { iconSizes, spacing } from 'ui/src/theme'
import { ElementName } from 'uniswap/src/features/telemetry/constants'
import { WalletConnectEvent } from 'uniswap/src/types/walletConnect'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { ONE_SECOND_MS } from 'utilities/src/time/time' import { ONE_SECOND_MS } from 'utilities/src/time/time'
import { NetworkLogos } from 'wallet/src/components/network/NetworkLogos' import { NetworkLogos } from 'wallet/src/components/network/NetworkLogos'
import { pushNotification } from 'wallet/src/features/notifications/slice' import { pushNotification } from 'wallet/src/features/notifications/slice'
import { AppNotificationType } from 'wallet/src/features/notifications/types' import { AppNotificationType } from 'wallet/src/features/notifications/types'
import { useActiveAccountAddressWithThrow } from 'wallet/src/features/wallet/hooks' import { useActiveAccountAddressWithThrow } from 'wallet/src/features/wallet/hooks'
import { WalletConnectEvent } from 'wallet/src/features/walletConnect/types'
import { ElementName } from 'wallet/src/telemetry/constants'
export function DappConnectionItem({ export function DappConnectionItem({
session, session,
......
...@@ -3,10 +3,10 @@ import { StyleSheet } from 'react-native' ...@@ -3,10 +3,10 @@ import { StyleSheet } from 'react-native'
import { Flex } from 'ui/src' import { Flex } from 'ui/src'
import { borderRadii, iconSizes } from 'ui/src/theme' import { borderRadii, iconSizes } from 'ui/src/theme'
import { CurrencyInfo } from 'uniswap/src/features/dataApi/types' import { CurrencyInfo } from 'uniswap/src/features/dataApi/types'
import { DappInfo } from 'uniswap/src/types/walletConnect'
import { CurrencyLogo } from 'wallet/src/components/CurrencyLogo/CurrencyLogo' import { CurrencyLogo } from 'wallet/src/components/CurrencyLogo/CurrencyLogo'
import { DappIconPlaceholder } from 'wallet/src/components/WalletConnect/DappIconPlaceholder' import { DappIconPlaceholder } from 'wallet/src/components/WalletConnect/DappIconPlaceholder'
import { ImageUri } from 'wallet/src/features/images/ImageUri' import { ImageUri } from 'wallet/src/features/images/ImageUri'
import { DappInfo } from 'wallet/src/features/walletConnect/types'
export function DappHeaderIcon({ export function DappHeaderIcon({
dapp, dapp,
......
...@@ -17,9 +17,9 @@ import { useDerivedValue } from 'react-native-reanimated' ...@@ -17,9 +17,9 @@ import { useDerivedValue } from 'react-native-reanimated'
import { ScrollDownOverlay } from 'src/components/WalletConnect/ModalWithOverlay/ScrollDownOverlay' import { ScrollDownOverlay } from 'src/components/WalletConnect/ModalWithOverlay/ScrollDownOverlay'
import { Button, Flex, useDeviceInsets } from 'ui/src' import { Button, Flex, useDeviceInsets } from 'ui/src'
import { spacing } from 'ui/src/theme' import { spacing } from 'ui/src/theme'
import { ElementName } from 'uniswap/src/features/telemetry/constants'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { BottomSheetModalProps } from 'wallet/src/components/modals/BottomSheetModalProps' import { BottomSheetModalProps } from 'wallet/src/components/modals/BottomSheetModalProps'
import { ElementName } from 'wallet/src/telemetry/constants'
const MEASURE_LAYOUT_TIMEOUT = 100 const MEASURE_LAYOUT_TIMEOUT = 100
......
...@@ -3,7 +3,7 @@ import React from 'react' ...@@ -3,7 +3,7 @@ import React from 'react'
import { Trans } from 'react-i18next' import { Trans } from 'react-i18next'
import { WalletConnectRequest } from 'src/features/walletConnect/walletConnectSlice' import { WalletConnectRequest } from 'src/features/walletConnect/walletConnectSlice'
import { Text } from 'ui/src' import { Text } from 'ui/src'
import { EthMethod, UwULinkMethod } from 'wallet/src/features/walletConnect/types' import { EthMethod, UwULinkMethod } from 'uniswap/src/types/walletConnect'
import { ValueType, getCurrencyAmount } from 'wallet/src/utils/getCurrencyAmount' import { ValueType, getCurrencyAmount } from 'wallet/src/utils/getCurrencyAmount'
export function HeaderText({ export function HeaderText({
......
...@@ -14,10 +14,10 @@ import { useNoYoloParser } from 'src/utils/useNoYoloParser' ...@@ -14,10 +14,10 @@ import { useNoYoloParser } from 'src/utils/useNoYoloParser'
import { Flex, Text, useSporeColors } from 'ui/src' import { Flex, Text, useSporeColors } from 'ui/src'
import { TextVariantTokens, iconSizes } from 'ui/src/theme' import { TextVariantTokens, iconSizes } from 'ui/src/theme'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { EthMethod, EthTransaction } from 'uniswap/src/types/walletConnect'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { toSupportedChainId } from 'wallet/src/features/chains/utils' import { toSupportedChainId } from 'wallet/src/features/chains/utils'
import { useENS } from 'wallet/src/features/ens/useENS' import { useENS } from 'wallet/src/features/ens/useENS'
import { EthMethod, EthTransaction } from 'wallet/src/features/walletConnect/types'
import { getValidAddress, shortenAddress } from 'wallet/src/utils/addresses' import { getValidAddress, shortenAddress } from 'wallet/src/utils/addresses'
import { ExplorerDataType, getExplorerLink } from 'wallet/src/utils/linking' import { ExplorerDataType, getExplorerLink } from 'wallet/src/utils/linking'
......
...@@ -7,14 +7,16 @@ import { UwuLinkErc20Request } from 'src/features/walletConnect/walletConnectSli ...@@ -7,14 +7,16 @@ import { UwuLinkErc20Request } from 'src/features/walletConnect/walletConnectSli
import { Flex, Text } from 'ui/src' import { Flex, Text } from 'ui/src'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { CurrencyInfo } from 'uniswap/src/features/dataApi/types' import { CurrencyInfo } from 'uniswap/src/features/dataApi/types'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { TokenLogo } from 'wallet/src/components/CurrencyLogo/TokenLogo' import { TokenLogo } from 'wallet/src/components/CurrencyLogo/TokenLogo'
import { SpinningLoader } from 'wallet/src/components/loading/SpinningLoader' import { SpinningLoader } from 'wallet/src/components/loading/SpinningLoader'
import { NetworkFee } from 'wallet/src/components/network/NetworkFee'
import { CHAIN_INFO } from 'wallet/src/constants/chains' import { CHAIN_INFO } from 'wallet/src/constants/chains'
import { GasFeeResult } from 'wallet/src/features/gas/types'
import { useOnChainCurrencyBalance } from 'wallet/src/features/portfolio/api' import { useOnChainCurrencyBalance } from 'wallet/src/features/portfolio/api'
import { NativeCurrency } from 'wallet/src/features/tokens/NativeCurrency' import { NativeCurrency } from 'wallet/src/features/tokens/NativeCurrency'
import { useCurrencyInfo } from 'wallet/src/features/tokens/useCurrencyInfo' import { useCurrencyInfo } from 'wallet/src/features/tokens/useCurrencyInfo'
import { useActiveAccountAddressWithThrow } from 'wallet/src/features/wallet/hooks' import { useActiveAccountAddressWithThrow } from 'wallet/src/features/wallet/hooks'
import { ModalName } from 'wallet/src/telemetry/constants'
import { buildCurrencyId } from 'wallet/src/utils/currencyId' import { buildCurrencyId } from 'wallet/src/utils/currencyId'
type Props = { type Props = {
...@@ -23,9 +25,11 @@ type Props = { ...@@ -23,9 +25,11 @@ type Props = {
onReject: () => void onReject: () => void
request: UwuLinkErc20Request request: UwuLinkErc20Request
hasSufficientGasFunds: boolean hasSufficientGasFunds: boolean
gasFee: GasFeeResult
} }
export function UwULinkErc20SendModal({ export function UwULinkErc20SendModal({
gasFee,
onClose, onClose,
onConfirm, onConfirm,
onReject, onReject,
...@@ -52,6 +56,7 @@ export function UwULinkErc20SendModal({ ...@@ -52,6 +56,7 @@ export function UwULinkErc20SendModal({
onReject={onReject}> onReject={onReject}>
<UwULinkErc20SendModalContent <UwULinkErc20SendModalContent
currencyInfo={currencyInfo} currencyInfo={currencyInfo}
gasFee={gasFee}
hasSufficientGasFunds={hasSufficientGasFunds} hasSufficientGasFunds={hasSufficientGasFunds}
hasSufficientTokenFunds={hasSufficientTokenFunds} hasSufficientTokenFunds={hasSufficientTokenFunds}
loading={!balance || !currencyInfo} loading={!balance || !currencyInfo}
...@@ -62,12 +67,14 @@ export function UwULinkErc20SendModal({ ...@@ -62,12 +67,14 @@ export function UwULinkErc20SendModal({
} }
function UwULinkErc20SendModalContent({ function UwULinkErc20SendModalContent({
gasFee,
request, request,
loading, loading,
currencyInfo, currencyInfo,
hasSufficientGasFunds, hasSufficientGasFunds,
hasSufficientTokenFunds, hasSufficientTokenFunds,
}: { }: {
gasFee: GasFeeResult
request: UwuLinkErc20Request request: UwuLinkErc20Request
loading: boolean loading: boolean
hasSufficientGasFunds: boolean hasSufficientGasFunds: boolean
...@@ -124,6 +131,9 @@ function UwULinkErc20SendModalContent({ ...@@ -124,6 +131,9 @@ function UwULinkErc20SendModalContent({
<Text>{symbol}</Text> <Text>{symbol}</Text>
</Flex> </Flex>
</Flex> </Flex>
<Flex alignSelf="stretch" borderTopColor="$surface3" borderTopWidth={1} pt="$spacing16">
<NetworkFee chainId={chainId} gasFee={gasFee} />
</Flex>
{!hasSufficientGasFunds && ( {!hasSufficientGasFunds && (
<Text color="$DEP_accentWarning" pt="$spacing8" textAlign="center" variant="body3"> <Text color="$DEP_accentWarning" pt="$spacing8" textAlign="center" variant="body3">
{t('walletConnect.request.error.insufficientFunds', { {t('walletConnect.request.error.insufficientFunds', {
......
...@@ -11,8 +11,6 @@ import { ...@@ -11,8 +11,6 @@ import {
} from 'src/components/WalletConnect/RequestModal/WalletConnectRequestModalContent' } from 'src/components/WalletConnect/RequestModal/WalletConnectRequestModalContent'
import { useHasSufficientFunds } from 'src/components/WalletConnect/RequestModal/hooks' import { useHasSufficientFunds } from 'src/components/WalletConnect/RequestModal/hooks'
import { useBiometricAppSettings, useBiometricPrompt } from 'src/features/biometrics/hooks' import { useBiometricAppSettings, useBiometricPrompt } from 'src/features/biometrics/hooks'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { MobileEventName } from 'src/features/telemetry/constants'
import { returnToPreviousApp } from 'src/features/walletConnect/WalletConnect' import { returnToPreviousApp } from 'src/features/walletConnect/WalletConnect'
import { wcWeb3Wallet } from 'src/features/walletConnect/saga' import { wcWeb3Wallet } from 'src/features/walletConnect/saga'
import { selectDidOpenFromDeepLink } from 'src/features/walletConnect/selectors' import { selectDidOpenFromDeepLink } from 'src/features/walletConnect/selectors'
...@@ -21,17 +19,18 @@ import { ...@@ -21,17 +19,18 @@ import {
WalletConnectRequest, WalletConnectRequest,
isTransactionRequest, isTransactionRequest,
} from 'src/features/walletConnect/walletConnectSlice' } from 'src/features/walletConnect/walletConnectSlice'
import { useTransactionGasFee } from 'wallet/src/features/gas/hooks' import { MobileEventName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { GasSpeed } from 'wallet/src/features/gas/types' import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { useIsBlocked, useIsBlockedActiveAddress } from 'wallet/src/features/trm/hooks'
import { useSignerAccounts } from 'wallet/src/features/wallet/hooks'
import { import {
EthMethod, EthMethod,
UwULinkMethod, UwULinkMethod,
WCEventType, WCEventType,
WCRequestOutcome, WCRequestOutcome,
} from 'wallet/src/features/walletConnect/types' } from 'uniswap/src/types/walletConnect'
import { ModalName } from 'wallet/src/telemetry/constants' import { useTransactionGasFee } from 'wallet/src/features/gas/hooks'
import { GasSpeed } from 'wallet/src/features/gas/types'
import { useIsBlocked, useIsBlockedActiveAddress } from 'wallet/src/features/trm/hooks'
import { useSignerAccounts } from 'wallet/src/features/wallet/hooks'
import { areAddressesEqual } from 'wallet/src/utils/addresses' import { areAddressesEqual } from 'wallet/src/utils/addresses'
import { UwULinkErc20SendModal } from './UwULinkErc20SendModal' import { UwULinkErc20SendModal } from './UwULinkErc20SendModal'
...@@ -130,7 +129,7 @@ export function WalletConnectRequestModal({ onClose, request }: Props): JSX.Elem ...@@ -130,7 +129,7 @@ export function WalletConnectRequestModal({ onClose, request }: Props): JSX.Elem
rejectOnCloseRef.current = false rejectOnCloseRef.current = false
sendMobileAnalyticsEvent(MobileEventName.WalletConnectSheetCompleted, { sendAnalyticsEvent(MobileEventName.WalletConnectSheetCompleted, {
request_type: isTransactionRequest(request) request_type: isTransactionRequest(request)
? WCEventType.TransactionRequest ? WCEventType.TransactionRequest
: WCEventType.SignRequest, : WCEventType.SignRequest,
...@@ -184,7 +183,7 @@ export function WalletConnectRequestModal({ onClose, request }: Props): JSX.Elem ...@@ -184,7 +183,7 @@ export function WalletConnectRequestModal({ onClose, request }: Props): JSX.Elem
rejectOnCloseRef.current = false rejectOnCloseRef.current = false
sendMobileAnalyticsEvent(MobileEventName.WalletConnectSheetCompleted, { sendAnalyticsEvent(MobileEventName.WalletConnectSheetCompleted, {
request_type: isTransactionRequest(request) request_type: isTransactionRequest(request)
? WCEventType.TransactionRequest ? WCEventType.TransactionRequest
: WCEventType.SignRequest, : WCEventType.SignRequest,
...@@ -228,6 +227,7 @@ export function WalletConnectRequestModal({ onClose, request }: Props): JSX.Elem ...@@ -228,6 +227,7 @@ export function WalletConnectRequestModal({ onClose, request }: Props): JSX.Elem
if (request.type === UwULinkMethod.Erc20Send) { if (request.type === UwULinkMethod.Erc20Send) {
return ( return (
<UwULinkErc20SendModal <UwULinkErc20SendModal
gasFee={gasFee}
hasSufficientGasFunds={hasSufficientFunds} hasSufficientGasFunds={hasSufficientFunds}
request={request} request={request}
onClose={handleClose} onClose={handleClose}
......
...@@ -17,6 +17,7 @@ import { ...@@ -17,6 +17,7 @@ import {
import { Flex, Text, useSporeColors } from 'ui/src' import { Flex, Text, useSporeColors } from 'ui/src'
import AlertTriangle from 'ui/src/assets/icons/alert-triangle.svg' import AlertTriangle from 'ui/src/assets/icons/alert-triangle.svg'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { EthMethod, isPrimaryTypePermit } from 'uniswap/src/types/walletConnect'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard' import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard'
import { AccountDetails } from 'wallet/src/components/accounts/AccountDetails' import { AccountDetails } from 'wallet/src/components/accounts/AccountDetails'
...@@ -24,7 +25,6 @@ import { NetworkFee } from 'wallet/src/components/network/NetworkFee' ...@@ -24,7 +25,6 @@ import { NetworkFee } from 'wallet/src/components/network/NetworkFee'
import { NetworkPill } from 'wallet/src/components/network/NetworkPill' import { NetworkPill } from 'wallet/src/components/network/NetworkPill'
import { GasFeeResult } from 'wallet/src/features/gas/types' import { GasFeeResult } from 'wallet/src/features/gas/types'
import { BlockedAddressWarning } from 'wallet/src/features/trm/BlockedAddressWarning' import { BlockedAddressWarning } from 'wallet/src/features/trm/BlockedAddressWarning'
import { EthMethod, isPrimaryTypePermit } from 'wallet/src/features/walletConnect/types'
import { buildCurrencyId } from 'wallet/src/utils/currencyId' import { buildCurrencyId } from 'wallet/src/utils/currencyId'
const MAX_MODAL_MESSAGE_HEIGHT = 200 const MAX_MODAL_MESSAGE_HEIGHT = 200
......
...@@ -9,8 +9,6 @@ import { ModalWithOverlay } from 'src/components/WalletConnect/ModalWithOverlay/ ...@@ -9,8 +9,6 @@ import { ModalWithOverlay } from 'src/components/WalletConnect/ModalWithOverlay/
import { PendingConnectionSwitchAccountModal } from 'src/components/WalletConnect/ScanSheet/PendingConnectionSwitchAccountModal' import { PendingConnectionSwitchAccountModal } from 'src/components/WalletConnect/ScanSheet/PendingConnectionSwitchAccountModal'
import { truncateQueryParams } from 'src/components/WalletConnect/ScanSheet/util' import { truncateQueryParams } from 'src/components/WalletConnect/ScanSheet/util'
import { LinkButton } from 'src/components/buttons/LinkButton' import { LinkButton } from 'src/components/buttons/LinkButton'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { MobileEventName } from 'src/features/telemetry/constants'
import { returnToPreviousApp } from 'src/features/walletConnect/WalletConnect' import { returnToPreviousApp } from 'src/features/walletConnect/WalletConnect'
import { wcWeb3Wallet } from 'src/features/walletConnect/saga' import { wcWeb3Wallet } from 'src/features/walletConnect/saga'
import { selectDidOpenFromDeepLink } from 'src/features/walletConnect/selectors' import { selectDidOpenFromDeepLink } from 'src/features/walletConnect/selectors'
...@@ -23,7 +21,10 @@ import { ...@@ -23,7 +21,10 @@ import {
import { Flex, Text, TouchableArea, useSporeColors } from 'ui/src' import { Flex, Text, TouchableArea, useSporeColors } from 'ui/src'
import { Check, X } from 'ui/src/components/icons' import { Check, X } from 'ui/src/components/icons'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ElementName, MobileEventName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { WCEventType, WCRequestOutcome, WalletConnectEvent } from 'uniswap/src/types/walletConnect'
import { ONE_SECOND_MS } from 'utilities/src/time/time' import { ONE_SECOND_MS } from 'utilities/src/time/time'
import { AccountDetails } from 'wallet/src/components/accounts/AccountDetails' import { AccountDetails } from 'wallet/src/components/accounts/AccountDetails'
import { NetworkLogos } from 'wallet/src/components/network/NetworkLogos' import { NetworkLogos } from 'wallet/src/components/network/NetworkLogos'
...@@ -35,12 +36,6 @@ import { ...@@ -35,12 +36,6 @@ import {
useSignerAccounts, useSignerAccounts,
} from 'wallet/src/features/wallet/hooks' } from 'wallet/src/features/wallet/hooks'
import { setAccountAsActive } from 'wallet/src/features/wallet/slice' import { setAccountAsActive } from 'wallet/src/features/wallet/slice'
import {
WCEventType,
WCRequestOutcome,
WalletConnectEvent,
} from 'wallet/src/features/walletConnect/types'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
type Props = { type Props = {
pendingSession: WalletConnectPendingSession pendingSession: WalletConnectPendingSession
...@@ -191,7 +186,7 @@ export const PendingConnectionModal = ({ pendingSession, onClose }: Props): JSX. ...@@ -191,7 +186,7 @@ export const PendingConnectionModal = ({ pendingSession, onClose }: Props): JSX.
const onPressSettleConnection = useCallback( const onPressSettleConnection = useCallback(
async (approved: boolean) => { async (approved: boolean) => {
sendMobileAnalyticsEvent(MobileEventName.WalletConnectSheetCompleted, { sendAnalyticsEvent(MobileEventName.WalletConnectSheetCompleted, {
request_type: WCEventType.SessionPending, request_type: WCEventType.SessionPending,
dapp_url: pendingSession.dapp.url, dapp_url: pendingSession.dapp.url,
dapp_name: pendingSession.dapp.name, dapp_name: pendingSession.dapp.name,
......
...@@ -2,10 +2,10 @@ import React, { useMemo } from 'react' ...@@ -2,10 +2,10 @@ import React, { useMemo } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { SwitchAccountOption } from 'src/components/WalletConnect/ScanSheet/SwitchAccountOption' import { SwitchAccountOption } from 'src/components/WalletConnect/ScanSheet/SwitchAccountOption'
import { Flex, Text } from 'ui/src' import { Flex, Text } from 'ui/src'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { ActionSheetModal } from 'wallet/src/components/modals/ActionSheetModal' import { ActionSheetModal } from 'wallet/src/components/modals/ActionSheetModal'
import { Account } from 'wallet/src/features/wallet/accounts/types' import { Account } from 'wallet/src/features/wallet/accounts/types'
import { useSignerAccounts } from 'wallet/src/features/wallet/hooks' import { useSignerAccounts } from 'wallet/src/features/wallet/hooks'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
type Props = { type Props = {
activeAccount: Account | null activeAccount: Account | null
......
...@@ -3,11 +3,11 @@ import { useTranslation } from 'react-i18next' ...@@ -3,11 +3,11 @@ import { useTranslation } from 'react-i18next'
import { Flex, Separator, Text, useSporeColors } from 'ui/src' import { Flex, Separator, Text, useSporeColors } from 'ui/src'
import Check from 'ui/src/assets/icons/check.svg' import Check from 'ui/src/assets/icons/check.svg'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { NetworkLogo } from 'wallet/src/components/CurrencyLogo/NetworkLogo' import { NetworkLogo } from 'wallet/src/components/CurrencyLogo/NetworkLogo'
import { ActionSheetModal } from 'wallet/src/components/modals/ActionSheetModal' import { ActionSheetModal } from 'wallet/src/components/modals/ActionSheetModal'
import { ALL_SUPPORTED_CHAIN_IDS, CHAIN_INFO } from 'wallet/src/constants/chains' import { ALL_SUPPORTED_CHAIN_IDS, CHAIN_INFO } from 'wallet/src/constants/chains'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
type Props = { type Props = {
selectedChainId: ChainId selectedChainId: ChainId
......
...@@ -5,7 +5,6 @@ import 'react-native-reanimated' ...@@ -5,7 +5,6 @@ import 'react-native-reanimated'
import { useAppDispatch } from 'src/app/hooks' import { useAppDispatch } from 'src/app/hooks'
import { useEagerExternalProfileRootNavigation } from 'src/app/navigation/hooks' import { useEagerExternalProfileRootNavigation } from 'src/app/navigation/hooks'
import { QRCodeScanner } from 'src/components/QRCodeScanner/QRCodeScanner' import { QRCodeScanner } from 'src/components/QRCodeScanner/QRCodeScanner'
import Trace from 'src/components/Trace/Trace'
import { ConnectedDappsList } from 'src/components/WalletConnect/ConnectedDapps/ConnectedDappsList' import { ConnectedDappsList } from 'src/components/WalletConnect/ConnectedDapps/ConnectedDappsList'
import { import {
URIType, URIType,
...@@ -27,14 +26,15 @@ import ScanQRIcon from 'ui/src/assets/icons/scan.svg' ...@@ -27,14 +26,15 @@ import ScanQRIcon from 'ui/src/assets/icons/scan.svg'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { FeatureFlags } from 'uniswap/src/features/gating/flags' import { FeatureFlags } from 'uniswap/src/features/gating/flags'
import { useFeatureFlag } from 'uniswap/src/features/gating/hooks' import { useFeatureFlag } from 'uniswap/src/features/gating/hooks'
import Trace from 'uniswap/src/features/telemetry/Trace'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { EthMethod, UwULinkMethod, UwULinkRequest } from 'uniswap/src/types/walletConnect'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { WalletQRCode } from 'wallet/src/components/QRCodeScanner/WalletQRCode' import { WalletQRCode } from 'wallet/src/components/QRCodeScanner/WalletQRCode'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { useContractManager, useProviderManager } from 'wallet/src/features/wallet/context' import { useContractManager, useProviderManager } from 'wallet/src/features/wallet/context'
import { useActiveAccount } from 'wallet/src/features/wallet/hooks' import { useActiveAccount } from 'wallet/src/features/wallet/hooks'
import { EthMethod, UwULinkMethod, UwULinkRequest } from 'wallet/src/features/walletConnect/types'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
type Props = { type Props = {
initialScreenState?: ScannerModalState initialScreenState?: ScannerModalState
......
...@@ -8,6 +8,13 @@ import { ...@@ -8,6 +8,13 @@ import {
} from 'src/features/deepLinking/constants' } from 'src/features/deepLinking/constants'
import { DynamicConfigs } from 'uniswap/src/features/gating/configs' import { DynamicConfigs } from 'uniswap/src/features/gating/configs'
import { useDynamicConfig } from 'uniswap/src/features/gating/hooks' import { useDynamicConfig } from 'uniswap/src/features/gating/hooks'
import {
EthMethod,
EthTransaction,
UwULinkErc20SendRequest,
UwULinkMethod,
UwULinkRequest,
} from 'uniswap/src/types/walletConnect'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { RPCType } from 'wallet/src/constants/chains' import { RPCType } from 'wallet/src/constants/chains'
import { AssetType } from 'wallet/src/entities/assets' import { AssetType } from 'wallet/src/entities/assets'
...@@ -17,13 +24,6 @@ import { ScantasticParams, ScantasticParamsSchema } from 'wallet/src/features/sc ...@@ -17,13 +24,6 @@ import { ScantasticParams, ScantasticParamsSchema } from 'wallet/src/features/sc
import { getTokenTransferRequest } from 'wallet/src/features/transactions/transfer/hooks/useTransferTransactionRequest' import { getTokenTransferRequest } from 'wallet/src/features/transactions/transfer/hooks/useTransferTransactionRequest'
import { TransferCurrencyParams } from 'wallet/src/features/transactions/transfer/types' import { TransferCurrencyParams } from 'wallet/src/features/transactions/transfer/types'
import { Account } from 'wallet/src/features/wallet/accounts/types' import { Account } from 'wallet/src/features/wallet/accounts/types'
import {
EthMethod,
EthTransaction,
UwULinkErc20SendRequest,
UwULinkMethod,
UwULinkRequest,
} from 'wallet/src/features/walletConnect/types'
import { areAddressesEqual, getValidAddress } from 'wallet/src/utils/addresses' import { areAddressesEqual, getValidAddress } from 'wallet/src/utils/addresses'
export enum URIType { export enum URIType {
......
...@@ -16,6 +16,7 @@ import { useAppStateTrigger } from 'src/utils/useAppStateTrigger' ...@@ -16,6 +16,7 @@ import { useAppStateTrigger } from 'src/utils/useAppStateTrigger'
import { Flex, useSporeColors } from 'ui/src' import { Flex, useSporeColors } from 'ui/src'
import EyeIcon from 'ui/src/assets/icons/eye.svg' import EyeIcon from 'ui/src/assets/icons/eye.svg'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { AccountDetails } from 'wallet/src/components/accounts/AccountDetails' import { AccountDetails } from 'wallet/src/components/accounts/AccountDetails'
import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal' import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal'
import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/types' import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/types'
...@@ -24,7 +25,6 @@ import { ...@@ -24,7 +25,6 @@ import {
useActiveAccountAddressWithThrow, useActiveAccountAddressWithThrow,
useSignerAccounts, useSignerAccounts,
} from 'wallet/src/features/wallet/hooks' } from 'wallet/src/features/wallet/hooks'
import { ModalName } from 'wallet/src/telemetry/constants'
import { areAddressesEqual } from 'wallet/src/utils/addresses' import { areAddressesEqual } from 'wallet/src/utils/addresses'
export function WalletConnectModals(): JSX.Element { export function WalletConnectModals(): JSX.Element {
......
...@@ -5,17 +5,17 @@ import { useAppDispatch } from 'src/app/hooks' ...@@ -5,17 +5,17 @@ import { useAppDispatch } from 'src/app/hooks'
import { navigate } from 'src/app/navigation/rootNavigation' import { navigate } from 'src/app/navigation/rootNavigation'
import { NotificationBadge } from 'src/components/notifications/Badge' import { NotificationBadge } from 'src/components/notifications/Badge'
import { closeModal, openModal } from 'src/features/modals/modalSlice' import { closeModal, openModal } from 'src/features/modals/modalSlice'
import { Screens } from 'src/screens/Screens'
import { disableOnPress } from 'src/utils/disableOnPress' import { disableOnPress } from 'src/utils/disableOnPress'
import { Flex, HapticFeedback, Text, TouchableArea } from 'ui/src' import { Flex, HapticFeedback, Text, TouchableArea } from 'ui/src'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { NumberType } from 'utilities/src/format/types' import { NumberType } from 'utilities/src/format/types'
import { AddressDisplay } from 'wallet/src/components/accounts/AddressDisplay' import { AddressDisplay } from 'wallet/src/components/accounts/AddressDisplay'
import { useAccountList } from 'wallet/src/features/accounts/hooks' import { useAccountList } from 'wallet/src/features/accounts/hooks'
import { useLocalizationContext } from 'wallet/src/features/language/LocalizationContext' import { useLocalizationContext } from 'wallet/src/features/language/LocalizationContext'
import { pushNotification } from 'wallet/src/features/notifications/slice' import { pushNotification } from 'wallet/src/features/notifications/slice'
import { AppNotificationType, CopyNotificationType } from 'wallet/src/features/notifications/types' import { AppNotificationType, CopyNotificationType } from 'wallet/src/features/notifications/types'
import { ModalName } from 'wallet/src/telemetry/constants'
import { setClipboard } from 'wallet/src/utils/clipboard' import { setClipboard } from 'wallet/src/utils/clipboard'
type AccountCardItemProps = { type AccountCardItemProps = {
...@@ -86,8 +86,8 @@ export function AccountCardItem({ ...@@ -86,8 +86,8 @@ export function AccountCardItem({
const onPressWalletSettings = (): void => { const onPressWalletSettings = (): void => {
dispatch(closeModal({ name: ModalName.AccountSwitcher })) dispatch(closeModal({ name: ModalName.AccountSwitcher }))
navigate(Screens.SettingsStack, { navigate(MobileScreens.SettingsStack, {
screen: Screens.SettingsWallet, screen: MobileScreens.SettingsWallet,
params: { address }, params: { address },
}) })
} }
......
...@@ -2,9 +2,9 @@ import * as ExpoClipboard from 'expo-clipboard' ...@@ -2,9 +2,9 @@ import * as ExpoClipboard from 'expo-clipboard'
import { navigationRef } from 'src/app/navigation/NavigationContainer' import { navigationRef } from 'src/app/navigation/NavigationContainer'
import { MobileState } from 'src/app/reducer' import { MobileState } from 'src/app/reducer'
import { AccountHeader } from 'src/components/accounts/AccountHeader' import { AccountHeader } from 'src/components/accounts/AccountHeader'
import { Screens } from 'src/screens/Screens'
import { fireEvent, render, screen, waitFor, within } from 'src/test/test-utils' import { fireEvent, render, screen, waitFor, within } from 'src/test/test-utils'
import { ModalName } from 'wallet/src/telemetry/constants' import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { import {
ACCOUNT, ACCOUNT,
ON_PRESS_EVENT_PAYLOAD, ON_PRESS_EVENT_PAYLOAD,
...@@ -109,7 +109,9 @@ describe(AccountHeader, () => { ...@@ -109,7 +109,9 @@ describe(AccountHeader, () => {
await waitFor(() => { await waitFor(() => {
expect(navigate).toHaveBeenCalledTimes(1) expect(navigate).toHaveBeenCalledTimes(1)
expect(navigate).toHaveBeenCalledWith(Screens.SettingsStack, { screen: Screens.Settings }) expect(navigate).toHaveBeenCalledWith(MobileScreens.SettingsStack, {
screen: MobileScreens.Settings,
})
}) })
}) })
}) })
...@@ -2,11 +2,11 @@ import React, { useCallback, useEffect } from 'react' ...@@ -2,11 +2,11 @@ import React, { useCallback, useEffect } from 'react'
import { useAppDispatch, useAppSelector } from 'src/app/hooks' import { useAppDispatch, useAppSelector } from 'src/app/hooks'
import { navigate } from 'src/app/navigation/rootNavigation' import { navigate } from 'src/app/navigation/rootNavigation'
import { openModal } from 'src/features/modals/modalSlice' import { openModal } from 'src/features/modals/modalSlice'
import { setUserProperty } from 'src/features/telemetry'
import { UserPropertyName } from 'src/features/telemetry/constants'
import { Screens } from 'src/screens/Screens'
import { Flex, HapticFeedback, ImpactFeedbackStyle, Text, TouchableArea } from 'ui/src' import { Flex, HapticFeedback, ImpactFeedbackStyle, Text, TouchableArea } from 'ui/src'
import { CopyAlt, Settings } from 'ui/src/components/icons' import { CopyAlt, Settings } from 'ui/src/components/icons'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { MobileUserPropertyName, setUserProperty } from 'uniswap/src/features/telemetry/user'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { isDevEnv } from 'uniswap/src/utils/env' import { isDevEnv } from 'uniswap/src/utils/env'
import { AccountIcon } from 'wallet/src/components/accounts/AccountIcon' import { AccountIcon } from 'wallet/src/components/accounts/AccountIcon'
import { AnimatedUnitagDisplayName } from 'wallet/src/components/accounts/AnimatedUnitagDisplayName' import { AnimatedUnitagDisplayName } from 'wallet/src/components/accounts/AnimatedUnitagDisplayName'
...@@ -19,7 +19,6 @@ import { ...@@ -19,7 +19,6 @@ import {
selectActiveAccountAddress, selectActiveAccountAddress,
} from 'wallet/src/features/wallet/selectors' } from 'wallet/src/features/wallet/selectors'
import { DisplayNameType } from 'wallet/src/features/wallet/types' import { DisplayNameType } from 'wallet/src/features/wallet/types'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
import { sanitizeAddressText, shortenAddress } from 'wallet/src/utils/addresses' import { sanitizeAddressText, shortenAddress } from 'wallet/src/utils/addresses'
import { setClipboard } from 'wallet/src/utils/clipboard' import { setClipboard } from 'wallet/src/utils/clipboard'
...@@ -35,10 +34,10 @@ export function AccountHeader(): JSX.Element { ...@@ -35,10 +34,10 @@ export function AccountHeader(): JSX.Element {
useEffect(() => { useEffect(() => {
switch (displayName?.type) { switch (displayName?.type) {
case DisplayNameType.ENS: case DisplayNameType.ENS:
setUserProperty(UserPropertyName.HasLoadedENS, true) setUserProperty(MobileUserPropertyName.HasLoadedENS, true)
return return
case DisplayNameType.Unitag: case DisplayNameType.Unitag:
setUserProperty(UserPropertyName.HasLoadedUnitag, true) setUserProperty(MobileUserPropertyName.HasLoadedUnitag, true)
return return
default: default:
return return
...@@ -50,7 +49,7 @@ export function AccountHeader(): JSX.Element { ...@@ -50,7 +49,7 @@ export function AccountHeader(): JSX.Element {
}, [dispatch]) }, [dispatch])
const onPressSettings = (): void => { const onPressSettings = (): void => {
navigate(Screens.SettingsStack, { screen: Screens.Settings }) navigate(MobileScreens.SettingsStack, { screen: MobileScreens.Settings })
} }
const onPressCopyAddress = async (): Promise<void> => { const onPressCopyAddress = async (): Promise<void> => {
......
...@@ -84,7 +84,7 @@ describe(AccountList, () => { ...@@ -84,7 +84,7 @@ describe(AccountList, () => {
const viewOnlyAccounts = createArray(3, readOnlyAccount) const viewOnlyAccounts = createArray(3, readOnlyAccount)
render(<AccountList accounts={viewOnlyAccounts} onPress={jest.fn()} />, { resolvers }) render(<AccountList accounts={viewOnlyAccounts} onPress={jest.fn()} />, { resolvers })
expect(screen.queryByText('View only wallets')).toBeTruthy() expect(screen.queryByText('View-only wallets')).toBeTruthy()
viewOnlyAccounts.forEach((account) => { viewOnlyAccounts.forEach((account) => {
const address = sanitizeAddressText(shortenAddress(account.address)) const address = sanitizeAddressText(shortenAddress(account.address))
...@@ -100,7 +100,7 @@ describe(AccountList, () => { ...@@ -100,7 +100,7 @@ describe(AccountList, () => {
resolvers, resolvers,
}) })
expect(screen.queryByText('View only wallets')).toBeFalsy() expect(screen.queryByText('View-only wallets')).toBeFalsy()
cleanup() cleanup()
}) })
}) })
......
...@@ -13,12 +13,12 @@ import { ...@@ -13,12 +13,12 @@ import {
} from 'ui/src' } from 'ui/src'
import { EXTENSION_PROMO_BANNER_DARK, EXTENSION_PROMO_BANNER_LIGHT } from 'ui/src/assets' import { EXTENSION_PROMO_BANNER_DARK, EXTENSION_PROMO_BANNER_LIGHT } from 'ui/src/assets'
import { borderRadii, iconSizes, spacing } from 'ui/src/theme' import { borderRadii, iconSizes, spacing } from 'ui/src/theme'
import { MobileEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { import {
ExtensionOnboardingState, ExtensionOnboardingState,
setExtensionOnboardingState, setExtensionOnboardingState,
} from 'wallet/src/features/behaviorHistory/slice' } from 'wallet/src/features/behaviorHistory/slice'
import { sendWalletAnalyticsEvent } from 'wallet/src/telemetry'
import { ExtensionOnboardingEventName } from 'wallet/src/telemetry/constants'
const IMAGE_ASPECT_RATIO = 0.69 const IMAGE_ASPECT_RATIO = 0.69
const IMAGE_SCREEN_WIDTH_PROPORTION = 0.3 const IMAGE_SCREEN_WIDTH_PROPORTION = 0.3
...@@ -40,14 +40,14 @@ export function ExtensionPromoBanner({ ...@@ -40,14 +40,14 @@ export function ExtensionPromoBanner({
const onPressClaimNow = (): void => { const onPressClaimNow = (): void => {
Keyboard.dismiss() Keyboard.dismiss()
sendWalletAnalyticsEvent(ExtensionOnboardingEventName.PromoBannerActionTaken, { sendAnalyticsEvent(MobileEventName.ExtensionPromoBannerActionTaken, {
action: 'join', action: 'join',
}) })
onShowExtensionPromoModal() onShowExtensionPromoModal()
} }
const onPressMaybeLater = (): void => { const onPressMaybeLater = (): void => {
sendWalletAnalyticsEvent(ExtensionOnboardingEventName.PromoBannerActionTaken, { sendAnalyticsEvent(MobileEventName.ExtensionPromoBannerActionTaken, {
action: 'dismiss', action: 'dismiss',
}) })
dispatch(setExtensionOnboardingState(ExtensionOnboardingState.Completed)) dispatch(setExtensionOnboardingState(ExtensionOnboardingState.Completed))
......
...@@ -5,8 +5,8 @@ import { runOnJS } from 'react-native-reanimated' ...@@ -5,8 +5,8 @@ import { runOnJS } from 'react-native-reanimated'
import { OnboardingStackBaseParams, useOnboardingStackNavigation } from 'src/app/navigation/types' import { OnboardingStackBaseParams, useOnboardingStackNavigation } from 'src/app/navigation/types'
import { CloseButton } from 'src/components/buttons/CloseButton' import { CloseButton } from 'src/components/buttons/CloseButton'
import { CarouselContext } from 'src/components/carousel/Carousel' import { CarouselContext } from 'src/components/carousel/Carousel'
import { OnboardingScreens } from 'src/screens/Screens'
import { Flex, Text, useDeviceDimensions } from 'ui/src' import { Flex, Text, useDeviceDimensions } from 'ui/src'
import { OnboardingScreens } from 'uniswap/src/types/screens/mobile'
import { getCloudProviderName } from 'uniswap/src/utils/cloud-backup/getCloudProviderName' import { getCloudProviderName } from 'uniswap/src/utils/cloud-backup/getCloudProviderName'
function Page({ function Page({
......
...@@ -12,6 +12,7 @@ import { usePollOnFocusOnly } from 'src/utils/hooks' ...@@ -12,6 +12,7 @@ import { usePollOnFocusOnly } from 'src/utils/hooks'
import { AnimatedFlex, AnimatedTouchableArea, Flex, ImpactFeedbackStyle, Text } from 'ui/src' import { AnimatedFlex, AnimatedTouchableArea, Flex, ImpactFeedbackStyle, Text } from 'ui/src'
import { borderRadii, imageSizes } from 'ui/src/theme' import { borderRadii, imageSizes } from 'ui/src/theme'
import { useFavoriteTokenCardQuery } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks' import { useFavoriteTokenCardQuery } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { SectionName } from 'uniswap/src/features/telemetry/constants'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { NumberType } from 'utilities/src/format/types' import { NumberType } from 'utilities/src/format/types'
import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard' import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard'
...@@ -23,7 +24,6 @@ import { fromGraphQLChain } from 'wallet/src/features/chains/utils' ...@@ -23,7 +24,6 @@ import { fromGraphQLChain } from 'wallet/src/features/chains/utils'
import { currencyIdToContractInput } from 'wallet/src/features/dataApi/utils' import { currencyIdToContractInput } from 'wallet/src/features/dataApi/utils'
import { removeFavoriteToken } from 'wallet/src/features/favorites/slice' import { removeFavoriteToken } from 'wallet/src/features/favorites/slice'
import { useLocalizationContext } from 'wallet/src/features/language/LocalizationContext' import { useLocalizationContext } from 'wallet/src/features/language/LocalizationContext'
import { SectionName } from 'wallet/src/telemetry/constants'
import { getSymbolDisplayText } from 'wallet/src/utils/currency' import { getSymbolDisplayText } from 'wallet/src/utils/currency'
export const FAVORITE_TOKEN_CARD_LOADER_HEIGHT = 114 export const FAVORITE_TOKEN_CARD_LOADER_HEIGHT = 114
......
import { makeMutable } from 'react-native-reanimated' import { makeMutable } from 'react-native-reanimated'
import configureMockStore from 'redux-mock-store' import configureMockStore from 'redux-mock-store'
import { Screens } from 'src/screens/Screens'
import { preloadedMobileState } from 'src/test/fixtures' import { preloadedMobileState } from 'src/test/fixtures'
import { fireEvent, render, waitFor } from 'src/test/test-utils' import { fireEvent, render, waitFor } from 'src/test/test-utils'
import * as unitagHooks from 'uniswap/src/features/unitags/hooks' import * as unitagHooks from 'uniswap/src/features/unitags/hooks'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import * as ensHooks from 'wallet/src/features/ens/api' import * as ensHooks from 'wallet/src/features/ens/api'
import { import {
ON_PRESS_EVENT_PAYLOAD, ON_PRESS_EVENT_PAYLOAD,
...@@ -103,7 +103,7 @@ describe('FavoriteWalletCard', () => { ...@@ -103,7 +103,7 @@ describe('FavoriteWalletCard', () => {
const touchable = getByTestId('favorite-wallet-card') const touchable = getByTestId('favorite-wallet-card')
fireEvent.press(touchable, ON_PRESS_EVENT_PAYLOAD) fireEvent.press(touchable, ON_PRESS_EVENT_PAYLOAD)
expect(mockedNavigation.navigate).toHaveBeenCalledWith(Screens.ExternalProfile, { expect(mockedNavigation.navigate).toHaveBeenCalledWith(MobileScreens.ExternalProfile, {
address: defaultProps.address, address: defaultProps.address,
}) })
}) })
......
...@@ -6,13 +6,13 @@ import { ...@@ -6,13 +6,13 @@ import {
getTokensOrderByMenuLabel, getTokensOrderByMenuLabel,
getTokensOrderBySelectedLabel, getTokensOrderBySelectedLabel,
} from 'src/features/explore/utils' } from 'src/features/explore/utils'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { MobileEventName } from 'src/features/telemetry/constants'
import { disableOnPress } from 'src/utils/disableOnPress' import { disableOnPress } from 'src/utils/disableOnPress'
import { Flex, Text, TouchableArea, useIsDarkMode } from 'ui/src' import { Flex, Text, TouchableArea, useIsDarkMode } from 'ui/src'
import { RotatableChevron } from 'ui/src/components/icons' import { RotatableChevron } from 'ui/src/components/icons'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { TokenSortableField } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks' import { TokenSortableField } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { MobileEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { setTokensOrderBy } from 'wallet/src/features/wallet/slice' import { setTokensOrderBy } from 'wallet/src/features/wallet/slice'
import { ClientTokensOrderBy, TokensOrderBy } from 'wallet/src/features/wallet/types' import { ClientTokensOrderBy, TokensOrderBy } from 'wallet/src/features/wallet/types'
...@@ -70,7 +70,7 @@ function _SortButton({ orderBy }: FilterGroupProps): JSX.Element { ...@@ -70,7 +70,7 @@ function _SortButton({ orderBy }: FilterGroupProps): JSX.Element {
} }
dispatch(setTokensOrderBy({ newTokensOrderBy: selectedMenuAction.orderBy })) dispatch(setTokensOrderBy({ newTokensOrderBy: selectedMenuAction.orderBy }))
sendMobileAnalyticsEvent(MobileEventName.ExploreFilterSelected, { sendAnalyticsEvent(MobileEventName.ExploreFilterSelected, {
filter_type: selectedMenuAction.orderBy, filter_type: selectedMenuAction.orderBy,
}) })
}}> }}>
......
...@@ -4,17 +4,16 @@ import ContextMenu from 'react-native-context-menu-view' ...@@ -4,17 +4,16 @@ import ContextMenu from 'react-native-context-menu-view'
import { useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks' import { useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks'
import { useExploreTokenContextMenu } from 'src/components/explore/hooks' import { useExploreTokenContextMenu } from 'src/components/explore/hooks'
import { TokenMetadata } from 'src/components/tokens/TokenMetadata' import { TokenMetadata } from 'src/components/tokens/TokenMetadata'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { MobileEventName } from 'src/features/telemetry/constants'
import { disableOnPress } from 'src/utils/disableOnPress' import { disableOnPress } from 'src/utils/disableOnPress'
import { AnimatedFlex, Flex, ImpactFeedbackStyle, Text, TouchableArea } from 'ui/src' import { AnimatedFlex, Flex, ImpactFeedbackStyle, Text, TouchableArea } from 'ui/src'
import { MobileEventName, SectionName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { NumberType } from 'utilities/src/format/types' import { NumberType } from 'utilities/src/format/types'
import { TokenLogo } from 'wallet/src/components/CurrencyLogo/TokenLogo' import { TokenLogo } from 'wallet/src/components/CurrencyLogo/TokenLogo'
import { RelativeChange } from 'wallet/src/components/text/RelativeChange' import { RelativeChange } from 'wallet/src/components/text/RelativeChange'
import { useLocalizationContext } from 'wallet/src/features/language/LocalizationContext' import { useLocalizationContext } from 'wallet/src/features/language/LocalizationContext'
import { TokenMetadataDisplayType } from 'wallet/src/features/wallet/types' import { TokenMetadataDisplayType } from 'wallet/src/features/wallet/types'
import { SectionName } from 'wallet/src/telemetry/constants'
import { import {
buildCurrencyId, buildCurrencyId,
buildNativeCurrencyId, buildNativeCurrencyId,
...@@ -88,7 +87,7 @@ export const TokenItem = memo(function _TokenItem({ ...@@ -88,7 +87,7 @@ export const TokenItem = memo(function _TokenItem({
const onPress = (): void => { const onPress = (): void => {
tokenDetailsNavigation.preload(_currencyId) tokenDetailsNavigation.preload(_currencyId)
tokenDetailsNavigation.navigate(_currencyId) tokenDetailsNavigation.navigate(_currencyId)
sendMobileAnalyticsEvent(MobileEventName.ExploreTokenItemSelected, { sendAnalyticsEvent(MobileEventName.ExploreTokenItemSelected, {
address: currencyIdToAddress(_currencyId), address: currencyIdToAddress(_currencyId),
chain: currencyIdToChain(_currencyId) as number, chain: currencyIdToChain(_currencyId) as number,
name, name,
......
...@@ -30,7 +30,7 @@ exports[`TokenItem renders without error 1`] = ` ...@@ -30,7 +30,7 @@ exports[`TokenItem renders without error 1`] = `
], ],
} }
} }
testID="token-item-cum" testID="token-item-tkn"
> >
<View <View
collapsable={false} collapsable={false}
...@@ -143,7 +143,7 @@ exports[`TokenItem renders without error 1`] = ` ...@@ -143,7 +143,7 @@ exports[`TokenItem renders without error 1`] = `
} }
suppressHighlighting={true} suppressHighlighting={true}
> >
cum tkn
</Text> </Text>
<Text <Text
allowFontScaling={true} allowFontScaling={true}
......
...@@ -4,9 +4,9 @@ import configureMockStore from 'redux-mock-store' ...@@ -4,9 +4,9 @@ import configureMockStore from 'redux-mock-store'
import { useExploreTokenContextMenu } from 'src/components/explore/hooks' import { useExploreTokenContextMenu } from 'src/components/explore/hooks'
import { renderHookWithProviders } from 'src/test/render' import { renderHookWithProviders } from 'src/test/render'
import { Resolvers } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks' import { Resolvers } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { SectionName } from 'uniswap/src/features/telemetry/constants'
import { FavoritesState } from 'wallet/src/features/favorites/slice' import { FavoritesState } from 'wallet/src/features/favorites/slice'
import { CurrencyField } from 'wallet/src/features/transactions/transactionState/types' import { CurrencyField } from 'wallet/src/features/transactions/transactionState/types'
import { SectionName } from 'wallet/src/telemetry/constants'
import { SAMPLE_SEED_ADDRESS_1 } from 'wallet/src/test/fixtures/constants' import { SAMPLE_SEED_ADDRESS_1 } from 'wallet/src/test/fixtures/constants'
import { cleanup } from 'wallet/src/test/test-utils' import { cleanup } from 'wallet/src/test/test-utils'
......
...@@ -6,7 +6,8 @@ import { ContextMenuAction, ContextMenuOnPressNativeEvent } from 'react-native-c ...@@ -6,7 +6,8 @@ import { ContextMenuAction, ContextMenuOnPressNativeEvent } from 'react-native-c
import { SharedValue, StyleProps, interpolate, useAnimatedStyle } from 'react-native-reanimated' import { SharedValue, StyleProps, interpolate, useAnimatedStyle } from 'react-native-reanimated'
import { useSelectHasTokenFavorited, useToggleFavoriteCallback } from 'src/features/favorites/hooks' import { useSelectHasTokenFavorited, useToggleFavoriteCallback } from 'src/features/favorites/hooks'
import { openModal } from 'src/features/modals/modalSlice' import { openModal } from 'src/features/modals/modalSlice'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry' import { ElementName, ModalName, SectionNameType } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { CurrencyId } from 'uniswap/src/types/currency' import { CurrencyId } from 'uniswap/src/types/currency'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
...@@ -17,7 +18,6 @@ import { ...@@ -17,7 +18,6 @@ import {
TransactionState, TransactionState,
} from 'wallet/src/features/transactions/transactionState/types' } from 'wallet/src/features/transactions/transactionState/types'
import { useAppDispatch } from 'wallet/src/state' import { useAppDispatch } from 'wallet/src/state'
import { ElementName, ModalName, SectionNameType } from 'wallet/src/telemetry/constants'
import { currencyIdToAddress } from 'wallet/src/utils/currencyId' import { currencyIdToAddress } from 'wallet/src/utils/currencyId'
interface TokenMenuParams { interface TokenMenuParams {
...@@ -74,7 +74,7 @@ export function useExploreTokenContextMenu({ ...@@ -74,7 +74,7 @@ export function useExploreTokenContextMenu({
}, },
} }
dispatch(openModal({ name: ModalName.Swap, initialState: swapFormState })) dispatch(openModal({ name: ModalName.Swap, initialState: swapFormState }))
sendMobileAnalyticsEvent(SharedEventName.ELEMENT_CLICKED, { sendAnalyticsEvent(SharedEventName.ELEMENT_CLICKED, {
element: ElementName.Swap, element: ElementName.Swap,
section: analyticsSection, section: analyticsSection,
}) })
......
...@@ -3,11 +3,11 @@ import { useAppDispatch } from 'src/app/hooks' ...@@ -3,11 +3,11 @@ import { useAppDispatch } from 'src/app/hooks'
import { getBlockExplorerIcon } from 'src/components/icons/BlockExplorerIcon' import { getBlockExplorerIcon } from 'src/components/icons/BlockExplorerIcon'
import { Flex, ImpactFeedbackStyle, Text, TouchableArea, useSporeColors } from 'ui/src' import { Flex, ImpactFeedbackStyle, Text, TouchableArea, useSporeColors } from 'ui/src'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ElementName } from 'uniswap/src/features/telemetry/constants'
import { ChainId } from 'uniswap/src/types/chains' import { ChainId } from 'uniswap/src/types/chains'
import { Arrow } from 'wallet/src/components/icons/Arrow' import { Arrow } from 'wallet/src/components/icons/Arrow'
import { EtherscanSearchResult } from 'wallet/src/features/search/SearchResult' import { EtherscanSearchResult } from 'wallet/src/features/search/SearchResult'
import { addToSearchHistory } from 'wallet/src/features/search/searchHistorySlice' import { addToSearchHistory } from 'wallet/src/features/search/searchHistorySlice'
import { ElementName } from 'wallet/src/telemetry/constants'
import { shortenAddress } from 'wallet/src/utils/addresses' import { shortenAddress } from 'wallet/src/utils/addresses'
import { ExplorerDataType, getExplorerLink, openUri } from 'wallet/src/utils/linking' import { ExplorerDataType, getExplorerLink, openUri } from 'wallet/src/utils/linking'
......
import { default as React } from 'react' import { default as React } from 'react'
import { useAppDispatch } from 'src/app/hooks' import { useAppDispatch } from 'src/app/hooks'
import { useAppStackNavigation } from 'src/app/navigation/types' import { useAppStackNavigation } from 'src/app/navigation/types'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { MobileEventName } from 'src/features/telemetry/constants'
import { Screens } from 'src/screens/Screens'
import { Flex, ImpactFeedbackStyle, Text, TouchableArea } from 'ui/src' import { Flex, ImpactFeedbackStyle, Text, TouchableArea } from 'ui/src'
import { Verified } from 'ui/src/components/icons' import { Verified } from 'ui/src/components/icons'
import { iconSizes } from 'ui/src/theme' import { iconSizes } from 'ui/src/theme'
import { ElementName, MobileEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { NFTViewer } from 'wallet/src/features/images/NFTViewer' import { NFTViewer } from 'wallet/src/features/images/NFTViewer'
import { SearchContext } from 'wallet/src/features/search/SearchContext' import { SearchContext } from 'wallet/src/features/search/SearchContext'
import { import {
...@@ -14,7 +14,6 @@ import { ...@@ -14,7 +14,6 @@ import {
SearchResultType, SearchResultType,
} from 'wallet/src/features/search/SearchResult' } from 'wallet/src/features/search/SearchResult'
import { addToSearchHistory } from 'wallet/src/features/search/searchHistorySlice' import { addToSearchHistory } from 'wallet/src/features/search/searchHistorySlice'
import { ElementName } from 'wallet/src/telemetry/constants'
type NFTCollectionItemProps = { type NFTCollectionItemProps = {
collection: NFTCollectionSearchResult collection: NFTCollectionSearchResult
...@@ -30,12 +29,12 @@ export function SearchNFTCollectionItem({ ...@@ -30,12 +29,12 @@ export function SearchNFTCollectionItem({
const navigation = useAppStackNavigation() const navigation = useAppStackNavigation()
const onPress = (): void => { const onPress = (): void => {
navigation.navigate(Screens.NFTCollection, { navigation.navigate(MobileScreens.NFTCollection, {
collectionAddress: address, collectionAddress: address,
}) })
if (searchContext) { if (searchContext) {
sendMobileAnalyticsEvent(MobileEventName.ExploreSearchResultClicked, { sendAnalyticsEvent(MobileEventName.ExploreSearchResultClicked, {
query: searchContext.query, query: searchContext.query,
name, name,
chain: chainId, chain: chainId,
......
...@@ -3,17 +3,16 @@ import ContextMenu from 'react-native-context-menu-view' ...@@ -3,17 +3,16 @@ import ContextMenu from 'react-native-context-menu-view'
import { useAppDispatch } from 'src/app/hooks' import { useAppDispatch } from 'src/app/hooks'
import { useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks' import { useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks'
import { useExploreTokenContextMenu } from 'src/components/explore/hooks' import { useExploreTokenContextMenu } from 'src/components/explore/hooks'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { MobileEventName } from 'src/features/telemetry/constants'
import { disableOnPress } from 'src/utils/disableOnPress' import { disableOnPress } from 'src/utils/disableOnPress'
import { Flex, ImpactFeedbackStyle, Text, TouchableArea, useIsDarkMode } from 'ui/src' import { Flex, ImpactFeedbackStyle, Text, TouchableArea, useIsDarkMode } from 'ui/src'
import { SafetyLevel } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks' import { SafetyLevel } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { ElementName, MobileEventName, SectionName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { TokenLogo } from 'wallet/src/components/CurrencyLogo/TokenLogo' import { TokenLogo } from 'wallet/src/components/CurrencyLogo/TokenLogo'
import WarningIcon from 'wallet/src/components/icons/WarningIcon' import WarningIcon from 'wallet/src/components/icons/WarningIcon'
import { SearchContext } from 'wallet/src/features/search/SearchContext' import { SearchContext } from 'wallet/src/features/search/SearchContext'
import { SearchResultType, TokenSearchResult } from 'wallet/src/features/search/SearchResult' import { SearchResultType, TokenSearchResult } from 'wallet/src/features/search/SearchResult'
import { addToSearchHistory } from 'wallet/src/features/search/searchHistorySlice' import { addToSearchHistory } from 'wallet/src/features/search/searchHistorySlice'
import { ElementName, SectionName } from 'wallet/src/telemetry/constants'
import { shortenAddress } from 'wallet/src/utils/addresses' import { shortenAddress } from 'wallet/src/utils/addresses'
import { buildCurrencyId, buildNativeCurrencyId } from 'wallet/src/utils/currencyId' import { buildCurrencyId, buildNativeCurrencyId } from 'wallet/src/utils/currencyId'
...@@ -34,7 +33,7 @@ export function SearchTokenItem({ token, searchContext }: SearchTokenItemProps): ...@@ -34,7 +33,7 @@ export function SearchTokenItem({ token, searchContext }: SearchTokenItemProps):
tokenDetailsNavigation.preload(currencyId) tokenDetailsNavigation.preload(currencyId)
tokenDetailsNavigation.navigate(currencyId) tokenDetailsNavigation.navigate(currencyId)
if (searchContext) { if (searchContext) {
sendMobileAnalyticsEvent(MobileEventName.ExploreSearchResultClicked, { sendAnalyticsEvent(MobileEventName.ExploreSearchResultClicked, {
query: searchContext.query, query: searchContext.query,
name: name ?? '', name: name ?? '',
chain: token.chainId, chain: token.chainId,
......
...@@ -4,10 +4,10 @@ import ContextMenu from 'react-native-context-menu-view' ...@@ -4,10 +4,10 @@ import ContextMenu from 'react-native-context-menu-view'
import { useAppDispatch, useAppSelector } from 'src/app/hooks' import { useAppDispatch, useAppSelector } from 'src/app/hooks'
import { useEagerExternalProfileNavigation } from 'src/app/navigation/hooks' import { useEagerExternalProfileNavigation } from 'src/app/navigation/hooks'
import { useToggleWatchedWalletCallback } from 'src/features/favorites/hooks' import { useToggleWatchedWalletCallback } from 'src/features/favorites/hooks'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { MobileEventName } from 'src/features/telemetry/constants'
import { disableOnPress } from 'src/utils/disableOnPress' import { disableOnPress } from 'src/utils/disableOnPress'
import { ImpactFeedbackStyle, TouchableArea } from 'ui/src' import { ImpactFeedbackStyle, TouchableArea } from 'ui/src'
import { MobileEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { selectWatchedAddressSet } from 'wallet/src/features/favorites/selectors' import { selectWatchedAddressSet } from 'wallet/src/features/favorites/selectors'
import { SearchContext } from 'wallet/src/features/search/SearchContext' import { SearchContext } from 'wallet/src/features/search/SearchContext'
import { import {
...@@ -42,7 +42,7 @@ export function SearchWalletItemBase({ ...@@ -42,7 +42,7 @@ export function SearchWalletItemBase({
: type === SearchResultType.ENSAddress : type === SearchResultType.ENSAddress
? searchResult.ensName ? searchResult.ensName
: undefined : undefined
sendMobileAnalyticsEvent(MobileEventName.ExploreSearchResultClicked, { sendAnalyticsEvent(MobileEventName.ExploreSearchResultClicked, {
query: searchContext.query, query: searchContext.query,
name: walletName, name: walletName,
address, address,
......
...@@ -7,12 +7,12 @@ import { UpgradeStatus } from 'src/features/forceUpgrade/types' ...@@ -7,12 +7,12 @@ import { UpgradeStatus } from 'src/features/forceUpgrade/types'
import { Flex, Text, TouchableArea, useSporeColors } from 'ui/src' import { Flex, Text, TouchableArea, useSporeColors } from 'ui/src'
import { DynamicConfigs } from 'uniswap/src/features/gating/configs' import { DynamicConfigs } from 'uniswap/src/features/gating/configs'
import { useDynamicConfig } from 'uniswap/src/features/gating/hooks' import { useDynamicConfig } from 'uniswap/src/features/gating/hooks'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal' import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal'
import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/types' import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/types'
import { SignerMnemonicAccount } from 'wallet/src/features/wallet/accounts/types' import { SignerMnemonicAccount } from 'wallet/src/features/wallet/accounts/types'
import { useNonPendingSignerAccounts } from 'wallet/src/features/wallet/hooks' import { useNonPendingSignerAccounts } from 'wallet/src/features/wallet/hooks'
import { ModalName } from 'wallet/src/telemetry/constants'
import { openUri } from 'wallet/src/utils/linking' import { openUri } from 'wallet/src/utils/linking'
export function ForceUpgradeModal(): JSX.Element { export function ForceUpgradeModal(): JSX.Element {
......
...@@ -13,10 +13,10 @@ import { openModal } from 'src/features/modals/modalSlice' ...@@ -13,10 +13,10 @@ import { openModal } from 'src/features/modals/modalSlice'
import { removePendingSession } from 'src/features/walletConnect/walletConnectSlice' import { removePendingSession } from 'src/features/walletConnect/walletConnectSlice'
import { Flex, useDeviceInsets, useSporeColors } from 'ui/src' import { Flex, useDeviceInsets, useSporeColors } from 'ui/src'
import { GQLQueries } from 'uniswap/src/data/graphql/uniswap-data-api/queries' import { GQLQueries } from 'uniswap/src/data/graphql/uniswap-data-api/queries'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { isAndroid } from 'uniswap/src/utils/platform' import { isAndroid } from 'uniswap/src/utils/platform'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
import { useActivityData } from 'wallet/src/features/activity/useActivityData' import { useActivityData } from 'wallet/src/features/activity/useActivityData'
import { ModalName } from 'wallet/src/telemetry/constants'
export const ACTIVITY_TAB_DATA_DEPENDENCIES = [GQLQueries.TransactionList] export const ACTIVITY_TAB_DATA_DEPENDENCIES = [GQLQueries.TransactionList]
......
...@@ -12,6 +12,7 @@ import { removePendingSession } from 'src/features/walletConnect/walletConnectSl ...@@ -12,6 +12,7 @@ import { removePendingSession } from 'src/features/walletConnect/walletConnectSl
import { Flex, Text, useDeviceInsets, useSporeColors } from 'ui/src' import { Flex, Text, useDeviceInsets, useSporeColors } from 'ui/src'
import { NoTransactions } from 'ui/src/components/icons' import { NoTransactions } from 'ui/src/components/icons'
import { GQLQueries } from 'uniswap/src/data/graphql/uniswap-data-api/queries' import { GQLQueries } from 'uniswap/src/data/graphql/uniswap-data-api/queries'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { isAndroid } from 'uniswap/src/utils/platform' import { isAndroid } from 'uniswap/src/utils/platform'
import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard' import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
...@@ -20,7 +21,6 @@ import { selectWatchedAddressSet } from 'wallet/src/features/favorites/selectors ...@@ -20,7 +21,6 @@ import { selectWatchedAddressSet } from 'wallet/src/features/favorites/selectors
import TransactionSummaryLayout from 'wallet/src/features/transactions/SummaryCards/SummaryItems/TransactionSummaryLayout' import TransactionSummaryLayout from 'wallet/src/features/transactions/SummaryCards/SummaryItems/TransactionSummaryLayout'
import { generateActivityItemRenderer } from 'wallet/src/features/transactions/SummaryCards/utils' import { generateActivityItemRenderer } from 'wallet/src/features/transactions/SummaryCards/utils'
import { useHideSpamTokensSetting } from 'wallet/src/features/wallet/hooks' import { useHideSpamTokensSetting } from 'wallet/src/features/wallet/hooks'
import { ModalName } from 'wallet/src/telemetry/constants'
export const FEED_TAB_DATA_DEPENDENCIES = [GQLQueries.FeedTransactionList] export const FEED_TAB_DATA_DEPENDENCIES = [GQLQueries.FeedTransactionList]
......
...@@ -5,9 +5,9 @@ import { useAppStackNavigation } from 'src/app/navigation/types' ...@@ -5,9 +5,9 @@ import { useAppStackNavigation } from 'src/app/navigation/types'
import { NftView } from 'src/components/NFT/NftView' import { NftView } from 'src/components/NFT/NftView'
import { useAdaptiveFooter } from 'src/components/home/hooks' import { useAdaptiveFooter } from 'src/components/home/hooks'
import { TAB_BAR_HEIGHT, TabProps } from 'src/components/layout/TabHelpers' import { TAB_BAR_HEIGHT, TabProps } from 'src/components/layout/TabHelpers'
import { Screens } from 'src/screens/Screens'
import { Flex, useDeviceInsets, useSporeColors } from 'ui/src' import { Flex, useDeviceInsets, useSporeColors } from 'ui/src'
import { GQLQueries } from 'uniswap/src/data/graphql/uniswap-data-api/queries' import { GQLQueries } from 'uniswap/src/data/graphql/uniswap-data-api/queries'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { isAndroid } from 'uniswap/src/utils/platform' import { isAndroid } from 'uniswap/src/utils/platform'
import { NftsList } from 'wallet/src/components/nfts/NftsList' import { NftsList } from 'wallet/src/components/nfts/NftsList'
import { NFTItem } from 'wallet/src/features/nfts/types' import { NFTItem } from 'wallet/src/features/nfts/types'
...@@ -39,7 +39,7 @@ export const NftsTab = memo( ...@@ -39,7 +39,7 @@ export const NftsTab = memo(
const renderNFTItem = useCallback( const renderNFTItem = useCallback(
(item: NFTItem) => { (item: NFTItem) => {
const onPressNft = (): void => { const onPressNft = (): void => {
navigation.navigate(Screens.NFTItem, { navigation.navigate(MobileScreens.NFTItem, {
owner, owner,
address: item.contractAddress ?? '', address: item.contractAddress ?? '',
tokenId: item.tokenId ?? '', tokenId: item.tokenId ?? '',
......
...@@ -8,15 +8,15 @@ import { useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks' ...@@ -8,15 +8,15 @@ import { useTokenDetailsNavigation } from 'src/components/TokenDetails/hooks'
import { WalletEmptyState } from 'src/components/home/WalletEmptyState' import { WalletEmptyState } from 'src/components/home/WalletEmptyState'
import { TabContentProps, TabProps } from 'src/components/layout/TabHelpers' import { TabContentProps, TabProps } from 'src/components/layout/TabHelpers'
import { openModal } from 'src/features/modals/modalSlice' import { openModal } from 'src/features/modals/modalSlice'
import { Screens } from 'src/screens/Screens'
import { Flex } from 'ui/src' import { Flex } from 'ui/src'
import { NoTokens } from 'ui/src/components/icons' import { NoTokens } from 'ui/src/components/icons'
import { GQLQueries } from 'uniswap/src/data/graphql/uniswap-data-api/queries' import { GQLQueries } from 'uniswap/src/data/graphql/uniswap-data-api/queries'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { CurrencyId } from 'uniswap/src/types/currency' import { CurrencyId } from 'uniswap/src/types/currency'
import { MobileScreens } from 'uniswap/src/types/screens/mobile'
import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard' import { BaseCard } from 'wallet/src/components/BaseCard/BaseCard'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
import { TokenBalanceListRow } from 'wallet/src/features/portfolio/TokenBalanceListContext' import { TokenBalanceListRow } from 'wallet/src/features/portfolio/TokenBalanceListContext'
import { ModalName } from 'wallet/src/telemetry/constants'
export const TOKENS_TAB_DATA_DEPENDENCIES = [GQLQueries.PortfolioBalances] export const TOKENS_TAB_DATA_DEPENDENCIES = [GQLQueries.PortfolioBalances]
...@@ -44,7 +44,7 @@ export const TokensTab = memo( ...@@ -44,7 +44,7 @@ export const TokensTab = memo(
const onPressToken = useCallback( const onPressToken = useCallback(
(currencyId: CurrencyId): void => { (currencyId: CurrencyId): void => {
startProfilerTimer({ source: Screens.Home }) startProfilerTimer({ source: MobileScreens.Home })
tokenDetailsNavigation.navigate(currencyId) tokenDetailsNavigation.navigate(currencyId)
}, },
[startProfilerTimer, tokenDetailsNavigation] [startProfilerTimer, tokenDetailsNavigation]
......
...@@ -9,7 +9,6 @@ import { ...@@ -9,7 +9,6 @@ import {
VirtualizedList, VirtualizedList,
} from 'react-native' } from 'react-native'
import { useAppDispatch } from 'src/app/hooks' import { useAppDispatch } from 'src/app/hooks'
import Trace from 'src/components/Trace/Trace'
import { openModal } from 'src/features/modals/modalSlice' import { openModal } from 'src/features/modals/modalSlice'
import { Flex, Text, TouchableArea, useIsDarkMode } from 'ui/src' import { Flex, Text, TouchableArea, useIsDarkMode } from 'ui/src'
import { CRYPTO_PURCHASE_BACKGROUND_DARK, CRYPTO_PURCHASE_BACKGROUND_LIGHT } from 'ui/src/assets' import { CRYPTO_PURCHASE_BACKGROUND_DARK, CRYPTO_PURCHASE_BACKGROUND_LIGHT } from 'ui/src/assets'
...@@ -17,12 +16,13 @@ import { ArrowDownCircle, Buy as BuyIcon, PaperStack } from 'ui/src/components/i ...@@ -17,12 +16,13 @@ import { ArrowDownCircle, Buy as BuyIcon, PaperStack } from 'ui/src/components/i
import { borderRadii } from 'ui/src/theme' import { borderRadii } from 'ui/src/theme'
import { FeatureFlags } from 'uniswap/src/features/gating/flags' import { FeatureFlags } from 'uniswap/src/features/gating/flags'
import { useFeatureFlag } from 'uniswap/src/features/gating/hooks' import { useFeatureFlag } from 'uniswap/src/features/gating/hooks'
import Trace from 'uniswap/src/features/telemetry/Trace'
import { ElementName, ElementNameType, ModalName } from 'uniswap/src/features/telemetry/constants'
import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants' import { ScannerModalState } from 'wallet/src/components/QRCodeScanner/constants'
import { useCexTransferProviders } from 'wallet/src/features/fiatOnRamp/api' import { useCexTransferProviders } from 'wallet/src/features/fiatOnRamp/api'
import { ImageUri } from 'wallet/src/features/images/ImageUri' import { ImageUri } from 'wallet/src/features/images/ImageUri'
import { AccountType } from 'wallet/src/features/wallet/accounts/types' import { AccountType } from 'wallet/src/features/wallet/accounts/types'
import { useActiveAccount } from 'wallet/src/features/wallet/hooks' import { useActiveAccount } from 'wallet/src/features/wallet/hooks'
import { ElementName, ElementNameType, ModalName } from 'wallet/src/telemetry/constants'
interface ActionCardItem { interface ActionCardItem {
title: string title: string
......
...@@ -61,7 +61,7 @@ export const TAB_STYLES = StyleSheet.create({ ...@@ -61,7 +61,7 @@ export const TAB_STYLES = StyleSheet.create({
// For padding on the list components themselves within tabs. // For padding on the list components themselves within tabs.
tabListInner: { tabListInner: {
paddingBottom: spacing.spacing12, paddingBottom: spacing.spacing12,
paddingTop: spacing.spacing8, paddingTop: spacing.spacing4,
}, },
}) })
......
...@@ -7,9 +7,9 @@ import { MnemonicDisplay } from 'src/components/mnemonic/MnemonicDisplay' ...@@ -7,9 +7,9 @@ import { MnemonicDisplay } from 'src/components/mnemonic/MnemonicDisplay'
import { useBiometricAppSettings, useBiometricPrompt } from 'src/features/biometrics/hooks' import { useBiometricAppSettings, useBiometricPrompt } from 'src/features/biometrics/hooks'
import { useWalletRestore } from 'src/features/wallet/hooks' import { useWalletRestore } from 'src/features/wallet/hooks'
import { Button, Flex } from 'ui/src' import { Button, Flex } from 'ui/src'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal' import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal'
import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/types' import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/types'
import { ElementName, ModalName } from 'wallet/src/telemetry/constants'
type Props = { type Props = {
mnemonicId: string mnemonicId: string
......
...@@ -3,8 +3,8 @@ import { useTranslation } from 'react-i18next' ...@@ -3,8 +3,8 @@ import { useTranslation } from 'react-i18next'
import { ColorValue, Keyboard } from 'react-native' import { ColorValue, Keyboard } from 'react-native'
import { TouchableArea, TouchableAreaProps, useSporeColors } from 'ui/src' import { TouchableArea, TouchableAreaProps, useSporeColors } from 'ui/src'
import InfoCircle from 'ui/src/assets/icons/info-circle.svg' import InfoCircle from 'ui/src/assets/icons/info-circle.svg'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal' import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal'
import { ModalName } from 'wallet/src/telemetry/constants'
const DEFAULT_ICON_SIZE = 20 const DEFAULT_ICON_SIZE = 20
......
...@@ -6,6 +6,8 @@ import { getUniqueId } from 'react-native-device-info' ...@@ -6,6 +6,8 @@ import { getUniqueId } from 'react-native-device-info'
import { Button, Flex, Text, useSporeColors } from 'ui/src' import { Button, Flex, Text, useSporeColors } from 'ui/src'
import { AlertTriangle } from 'ui/src/components/icons' import { AlertTriangle } from 'ui/src/components/icons'
import { fonts, spacing } from 'ui/src/theme' import { fonts, spacing } from 'ui/src/theme'
import { ElementName, ModalName, UnitagEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { useUnitagUpdater } from 'uniswap/src/features/unitags/context' import { useUnitagUpdater } from 'uniswap/src/features/unitags/context'
import { UnitagErrorCodes } from 'uniswap/src/features/unitags/types' import { UnitagErrorCodes } from 'uniswap/src/features/unitags/types'
import { isIOS } from 'uniswap/src/utils/platform' import { isIOS } from 'uniswap/src/utils/platform'
...@@ -22,8 +24,6 @@ import { parseUnitagErrorCode } from 'wallet/src/features/unitags/utils' ...@@ -22,8 +24,6 @@ import { parseUnitagErrorCode } from 'wallet/src/features/unitags/utils'
import { useWalletSigners } from 'wallet/src/features/wallet/context' import { useWalletSigners } from 'wallet/src/features/wallet/context'
import { useAccount } from 'wallet/src/features/wallet/hooks' import { useAccount } from 'wallet/src/features/wallet/hooks'
import { useAppDispatch } from 'wallet/src/state' import { useAppDispatch } from 'wallet/src/state'
import { sendWalletAnalyticsEvent } from 'wallet/src/telemetry'
import { ElementName, ModalName, UnitagEventName } from 'wallet/src/telemetry/constants'
export function ChangeUnitagModal({ export function ChangeUnitagModal({
unitag, unitag,
...@@ -123,7 +123,7 @@ export function ChangeUnitagModal({ ...@@ -123,7 +123,7 @@ export function ChangeUnitagModal({
// If change succeeded, exit the modal and display a success message // If change succeeded, exit the modal and display a success message
if (changeResponse.success) { if (changeResponse.success) {
sendWalletAnalyticsEvent(UnitagEventName.UnitagChanged) sendAnalyticsEvent(UnitagEventName.UnitagChanged)
triggerRefetchUnitags() triggerRefetchUnitags()
dispatch( dispatch(
pushNotification({ pushNotification({
...@@ -197,11 +197,7 @@ export function ChangeUnitagModal({ ...@@ -197,11 +197,7 @@ export function ChangeUnitagModal({
{showConfirmModal && ( {showConfirmModal && (
<ChangeUnitagConfirmModal onChangeSubmit={onChangeSubmit} onClose={onCloseConfirmModal} /> <ChangeUnitagConfirmModal onChangeSubmit={onChangeSubmit} onClose={onCloseConfirmModal} />
)} )}
<BottomSheetModal <BottomSheetModal isDismissible name={ModalName.UnitagsChange} onClose={onClose}>
isDismissible
isModalOpen={!showConfirmModal}
name={ModalName.UnitagsChange}
onClose={onClose}>
<Flex <Flex
centered centered
gap="$spacing12" gap="$spacing12"
......
import { NftView } from 'src/components/NFT/NftView' import { NftView } from 'src/components/NFT/NftView'
import { useDeviceInsets, useSporeColors } from 'ui/src' import { useDeviceInsets, useSporeColors } from 'ui/src'
import { spacing } from 'ui/src/theme' import { spacing } from 'ui/src/theme'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal' import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { NftsList } from 'wallet/src/components/nfts/NftsList' import { NftsList } from 'wallet/src/components/nfts/NftsList'
import { NFTItem } from 'wallet/src/features/nfts/types' import { NFTItem } from 'wallet/src/features/nfts/types'
import { ModalName } from 'wallet/src/telemetry/constants'
type ChooseNftProps = { type ChooseNftProps = {
address: string address: string
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment