ci(release): publish latest release

parent ecaf6a9b
mobile/1.45.2
\ No newline at end of file
extension/1.15.2
\ No newline at end of file
......@@ -17,7 +17,7 @@ import { getScantasticUrl } from 'src/app/features/onboarding/scan/utils'
import { OnboardingRoutes, TopLevelRoutes } from 'src/app/navigation/constants'
import { navigate } from 'src/app/navigation/state'
import UAParser from 'ua-parser-js'
import { Flex, Image, Square, Text, TouchableArea, useSporeColors } from 'ui/src'
import { Flex, Image, Square, Text, TouchableArea, useIsDarkMode, useSporeColors } from 'ui/src'
import { DOT_GRID, UNISWAP_LOGO } from 'ui/src/assets'
import { FileListLock, Mobile, RotatableChevron, Wifi } from 'ui/src/components/icons'
import { AnimatedFlex } from 'ui/src/components/layout/AnimatedFlex'
......@@ -56,6 +56,7 @@ function useDocumentVisibility(): boolean {
export function ScanToOnboard(): JSX.Element {
const colors = useSporeColors()
const { t } = useTranslation()
const isDarkMode = useIsDarkMode()
const { goToNextStep } = useOnboardingSteps()
const isDocumentVisible = useDocumentVisibility()
......@@ -304,7 +305,7 @@ export function ScanToOnboard(): JSX.Element {
>
<QRCode
bgColor="transparent"
fgColor={colors.black.val}
fgColor={isDarkMode ? colors.white.val : colors.black.val}
size={QR_CODE_SIZE}
value={scantasticValue}
/>
......
......@@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Uniswap Extension",
"description": "The Uniswap Extension is a self-custody crypto wallet that's built for swapping.",
"version": "1.15.0",
"version": "1.15.2",
"minimum_chrome_version": "116",
"icons": {
"16": "assets/icon16.png",
......
......@@ -89,9 +89,9 @@ if (isCI && datadogPropertiesAvailable && !isE2E) {
apply from: "../../../../node_modules/@datadog/mobile-react-native/datadog-sourcemaps.gradle"
}
def devVersionName = "1.45.2"
def betaVersionName = "1.45.2"
def prodVersionName = "1.45.2"
def devVersionName = "1.45"
def betaVersionName = "1.45"
def prodVersionName = "1.45"
android {
ndkVersion rootProject.ext.ndkVersion
......
......@@ -76,8 +76,8 @@ class NotificationExtension : OSRemoteNotificationReceivedHandler {
"https://gating.android.wallet.gateway.uniswap.org/v1/statsig-proxy"
private const val STATSIG_ENVIRONMENT_KEY_TIER = "tier"
private const val FEATURE_GATE_UNFUNDED_WALLET = "notification_unfunded_wallet_android"
private const val FEATURE_GATE_PRICE_ALERT = "notification_price_alerts_android"
private const val FEATURE_GATE_UNFUNDED_WALLET = "notification_unfunded_wallet"
private const val FEATURE_GATE_PRICE_ALERT = "notification_price_alerts"
private const val FIELD_NOTIFICATION_TYPE = "notification_type"
private const val TYPE_UNFUNDED_WALLET_REMINDER = "unfunded_wallet_reminder"
......
......@@ -87,6 +87,6 @@ struct Constants {
static let typeUnfundedWallet = "unfunded_wallet_reminder"
static let typePriceAlert = "price_alert"
static let gateUnfundedWallet = "notification_unfunded_wallet_ios"
static let gatePriceAlert = "notification_price_alerts_ios"
static let gateUnfundedWallet = "notification_unfunded_wallet"
static let gatePriceAlert = "notification_price_alerts"
}
......@@ -2234,7 +2234,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
......@@ -2287,7 +2287,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCore;
......@@ -2340,7 +2340,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCore;
......@@ -2393,7 +2393,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCore;
......@@ -2431,7 +2431,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
......@@ -2467,7 +2467,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCoreTests;
......@@ -2502,7 +2502,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCoreTests;
......@@ -2537,7 +2537,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCoreTests;
......@@ -2584,7 +2584,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
......@@ -2630,7 +2630,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.widgets;
......@@ -2676,7 +2676,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.dev.widgets;
......@@ -2722,7 +2722,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.beta.widgets;
......@@ -2764,7 +2764,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
......@@ -2807,7 +2807,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.WidgetIntentExtension;
......@@ -2850,7 +2850,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.dev.WidgetIntentExtension;
......@@ -2893,7 +2893,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.beta.WidgetIntentExtension;
......@@ -2929,7 +2929,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......@@ -2967,7 +2967,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......@@ -3168,7 +3168,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
......@@ -3213,7 +3213,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.OneSignalNotificationServiceExtension;
......@@ -3324,7 +3324,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......@@ -3396,7 +3396,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.beta.OneSignalNotificationServiceExtension;
......@@ -3507,7 +3507,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......@@ -3579,7 +3579,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.45.2;
MARKETING_VERSION = 1.45;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.dev.OneSignalNotificationServiceExtension;
......
......@@ -256,8 +256,8 @@ function AppOuter(): JSX.Element | null {
// Used in case we aren't able to resolve notification filtering issues on iOS
if (isIOS) {
const notificationsPriceAlertsEnabled = getFeatureFlag(FeatureFlags.NotificationPriceAlertsIOS)
const notificationsUnfundedWalletEnabled = getFeatureFlag(FeatureFlags.NotificationUnfundedWalletsIOS)
const notificationsPriceAlertsEnabled = getFeatureFlag(FeatureFlags.NotificationPriceAlerts)
const notificationsUnfundedWalletEnabled = getFeatureFlag(FeatureFlags.NotificationUnfundedWallets)
OneSignal.sendTags({
[OneSignalUserTagField.GatingPriceAlertsEnabled]: notificationsPriceAlertsEnabled ? 'true' : 'false',
......
......@@ -30,10 +30,6 @@ export function SearchEmptySection({ selectedChain }: { selectedChain: UniverseC
const [showPopularInfo, setShowPopularInfo] = useState(false)
// Popular NFT collections data is only available on Mainnet
// TODO(WALL-5876): Update this once we have a way to fetch NFT collections for all chains
const showPopularNftCollections = !selectedChain || selectedChain === UniverseChainId.Mainnet
const onPressClearSearchHistory = (): void => {
dispatch(clearSearchHistory())
}
......@@ -83,12 +79,10 @@ export function SearchEmptySection({ selectedChain }: { selectedChain: UniverseC
/>
<SearchPopularTokens selectedChain={selectedChain} />
</Flex>
{showPopularNftCollections && (
<Flex gap="$spacing4">
<SectionHeaderText icon={TrendUpIcon} title={t('explore.search.section.popularNFT')} />
<SearchPopularNFTCollections />
</Flex>
)}
</AnimatedFlex>
<WarningModal
backgroundIconColor={colors.surface3.get()}
......
......@@ -31,7 +31,6 @@ import { BaseCard } from 'uniswap/src/components/BaseCard/BaseCard'
import { useExploreSearchQuery } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { useEnabledChains } from 'uniswap/src/features/chains/hooks/useEnabledChains'
import { UniverseChainId } from 'uniswap/src/features/chains/types'
import { toGraphQLChain } from 'uniswap/src/features/chains/utils'
import { SearchContext } from 'uniswap/src/features/search/SearchContext'
import {
NFTCollectionSearchResult,
......@@ -62,11 +61,7 @@ export function SearchResultsSection({
error,
refetch,
} = useExploreSearchQuery({
variables: {
searchQuery,
nftCollectionsFilter: { nameQuery: searchQuery },
chains: selectedChain ? [toGraphQLChain(selectedChain)] : undefined,
},
variables: { searchQuery, nftCollectionsFilter: { nameQuery: searchQuery } },
})
const onRetry = useCallback(async () => {
......
......@@ -3,7 +3,7 @@ import OneSignal, { NotificationReceivedEvent, OpenedEvent } from 'react-native-
import { NotificationType } from 'src/features/notifications/constants'
import { config } from 'uniswap/src/config'
import { FeatureFlags } from 'uniswap/src/features/gating/flags'
import { getFeatureFlag } from 'uniswap/src/features/gating/hooks'
import { getFeatureFlagWithExposureLoggingDisabled } from 'uniswap/src/features/gating/hooks'
import { GQL_QUERIES_TO_REFETCH_ON_TXN_UPDATE } from 'uniswap/src/features/portfolio/portfolioUpdates/constants'
import { getUniqueId } from 'utilities/src/device/getUniqueId'
import { logger } from 'utilities/src/logger/logger'
......@@ -20,14 +20,14 @@ export const initOneSignal = (): void => {
const notificationType = additionalData?.notification_type
let enabled = false
// Some special notif filtering logic is needed for iOS
// Some special notif filtering logic is needed for iOS, avoiding exposure
if (isIOS) {
switch (notificationType) {
case NotificationType.UnfundedWalletReminder:
enabled = getFeatureFlag(FeatureFlags.NotificationPriceAlertsIOS)
enabled = getFeatureFlagWithExposureLoggingDisabled(FeatureFlags.NotificationUnfundedWallets)
break
case NotificationType.PriceAlert:
enabled = getFeatureFlag(FeatureFlags.NotificationPriceAlertsIOS)
enabled = getFeatureFlagWithExposureLoggingDisabled(FeatureFlags.NotificationPriceAlerts)
break
default:
enabled = false
......
......@@ -82,7 +82,6 @@ function preloadServiceProviderLogos(serviceProviders: FORServiceProvider[], isD
}
const PREDEFINED_AMOUNTS_SUPPORTED_CURRENCIES = ['usd', 'eur', 'gbp', 'aud', 'cad', 'sgd']
const US_STATES_WITH_RESTRICTIONS = 'US-NY'
export function FiatOnRampScreen({ navigation }: Props): JSX.Element {
const isOffRampEnabled = useFeatureFlag(FeatureFlags.FiatOffRamp)
......@@ -399,10 +398,7 @@ export function FiatOnRampScreen({ navigation }: Props): JSX.Element {
meldSupportedFiatCurrency.code.toLowerCase(),
)
const notAvailableInThisRegion =
supportedFiatCurrencies?.length === 0 ||
(!supportedTokensLoading && supportedTokensList?.length === 0) ||
(US_STATES_WITH_RESTRICTIONS.includes(countryState || '') && quotes?.length === 0)
const notAvailableInThisRegion = supportedFiatCurrencies?.length === 0
const { errorText } = useParseFiatOnRampError({
error: !notAvailableInThisRegion && quotesError,
......
......@@ -656,7 +656,7 @@ export function HomeScreen(props?: AppStackScreenProp<MobileScreens.Home>): JSX.
{contentHeader}
</Animated.View>
{isTabsDataLoaded && isLayoutReady && (
{isTabsDataLoaded && (
<TraceTabView
lazy
initialLayout={{
......
import { useEffect, useRef } from 'react'
import { useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useNftsTabQuery } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { useEnabledChains } from 'uniswap/src/features/chains/hooks/useEnabledChains'
......@@ -25,14 +25,6 @@ export function useHomeScreenState(): {
)
const { gqlChains } = useEnabledChains()
const neverCached = hasUsedWalletFromCache === undefined
// There's a race condition during onboarding where the editAccountSaga is
// editing the account in redux in an unconventional way that causes the
// hasUsedWalletFromCache to reset after being set by this hook. This ref
// is a work around to only trigger the loading state once.
const dataLoadedRef = useRef(false)
const { data: balancesById, loading: areBalancesLoading } = usePortfolioBalances({
address,
skip: hasUsedWalletFromCache,
......@@ -56,27 +48,24 @@ export function useHomeScreenState(): {
})
const hasNft = !!nftData?.nftBalances?.edges.length
const hasTokenBalance = balancesById ? Object.keys(balancesById).length > 0 : false
const hasTokenBalance = !!Object.entries(balancesById || {}).length
const hasUsedWalletFromRemote = hasTokenBalance || hasNft || hasActivity
const dataIsLoading = areBalancesLoading || areNFTsLoading || isActivityLoading
const isTabsDataLoaded = neverCached ? !dataIsLoading : true
// Note: This is to prevent loading the empty wallet state for an active
// wallet loading tabs for the first time.
const isTabsDataLoaded = !(dataIsLoading && hasUsedWalletFromCache)
const hasUsedWallet = hasUsedWalletFromCache || hasUsedWalletFromRemote
const shouldUpdateCache = neverCached && isTabsDataLoaded
const addressIsNowUsed = hasUsedWalletFromCache === false && hasUsedWalletFromRemote
useEffect(() => {
if (shouldUpdateCache || addressIsNowUsed) {
dispatch(setHasBalanceOrActivity({ address, hasBalanceOrActivity: hasUsedWallet }))
}
}, [hasUsedWallet, dispatch, address, shouldUpdateCache, addressIsNowUsed])
if (!dataLoadedRef.current && isTabsDataLoaded) {
dataLoadedRef.current = true
if (hasUsedWallet && !hasUsedWalletFromCache) {
dispatch(setHasBalanceOrActivity({ address, hasBalanceOrActivity: true }))
}
}, [hasUsedWallet, dispatch, address, hasUsedWalletFromCache])
return {
showEmptyWalletState: !hasUsedWallet,
isTabsDataLoaded: dataLoadedRef.current || isTabsDataLoaded,
isTabsDataLoaded,
}
}
import React, { memo, useCallback } from 'react'
import React, { memo } from 'react'
import { useTranslation } from 'react-i18next'
import { BackHeader } from 'src/components/layout/BackHeader'
import { Screen } from 'src/components/layout/Screen'
......@@ -14,8 +14,6 @@ import { FeatureFlags } from 'uniswap/src/features/gating/flags'
import { useFeatureFlag } from 'uniswap/src/features/gating/hooks'
import { MobileEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { NotificationToggleLoggingType } from 'uniswap/src/features/telemetry/types'
import { isIOS } from 'utilities/src/platform'
import { AddressDisplay } from 'wallet/src/components/accounts/AddressDisplay'
import { useAccountsList } from 'wallet/src/features/wallet/hooks'
......@@ -24,26 +22,13 @@ export function SettingsNotificationsScreen(): JSX.Element {
const accounts = useAccountsList()
const priceAlertsToggleEnabled = useFeatureFlag(
isIOS ? FeatureFlags.NotificationPriceAlertsIOS : FeatureFlags.NotificationPriceAlertsAndroid,
)
const onGeneralUpdatesToggle = useCallback(
(enabled: boolean) => onPermissionChanged(enabled, NotifSettingType.GeneralUpdates),
[],
)
const onPriceAlertsToggle = useCallback(
(enabled: boolean) => onPermissionChanged(enabled, NotifSettingType.PriceAlerts),
[],
)
const priceAlertsToggleEnabled = useFeatureFlag(FeatureFlags.NotificationPriceAlerts)
const { isEnabled: updatesNotifEnabled, toggle: toggleUpdatesNotif } = useSettingNotificationToggle({
type: NotifSettingType.GeneralUpdates,
onToggle: onGeneralUpdatesToggle,
})
const { isEnabled: priceAlertsNotifEnabled, toggle: togglePriceAlertsNotif } = useSettingNotificationToggle({
type: NotifSettingType.PriceAlerts,
onToggle: onPriceAlertsToggle,
})
return (
......@@ -132,14 +117,14 @@ function NotificationSettingRow({
)
}
function onPermissionChanged(enabled: boolean, type: NotificationToggleLoggingType): void {
sendAnalyticsEvent(MobileEventName.NotificationsToggled, { enabled, type })
function onPermissionChanged(enabled: boolean): void {
sendAnalyticsEvent(MobileEventName.NotificationsToggled, { enabled })
}
function _AddressNotificationsSwitch({ address }: { address: string }): JSX.Element {
const { isEnabled, isPending, toggle } = useAddressNotificationToggle({
address,
onToggle: (enabled) => onPermissionChanged(enabled, 'wallet_activity'),
onToggle: onPermissionChanged,
})
return <Switch checked={isEnabled} disabled={isPending} variant="branded" onCheckedChange={toggle} />
......
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="arrow">
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M5.24408 14.7559C5.56951 15.0814 6.09715 15.0814 6.42259 14.7559L13.3333 7.84518V14.1667C13.3333 14.6269 13.7064 15 14.1667 15C14.6269 15 15 14.6269 15 14.1667V5.83333C15 5.3731 14.6269 5 14.1667 5H5.83333C5.3731 5 5 5.3731 5 5.83333C5 6.29357 5.3731 6.66667 5.83333 6.66667H12.1548L5.24408 13.5774C4.91864 13.9028 4.91864 14.4305 5.24408 14.7559Z" fill="#7D7D7D"/>
</g>
</svg>
......@@ -13,7 +13,6 @@ type InlineCardProps = {
iconBackgroundColor?: ColorTokens
heading?: string | JSX.Element
CtaButtonIcon?: GeneratedIcon | ((props: IconProps) => JSX.Element)
CtaButtonIconColor?: ColorTokens
onPressCtaButton?: () => void
}
......@@ -26,7 +25,6 @@ export function InlineCard({
heading,
description,
CtaButtonIcon,
CtaButtonIconColor = '$neutral3',
onPressCtaButton,
}: InlineCardProps): JSX.Element {
const icon = <Icon color={iconColor ?? color} size="$icon.20" />
......@@ -66,7 +64,7 @@ export function InlineCard({
</Flex>
{CtaButtonIcon && (
<TouchableArea onPress={onPressCtaButton}>
<CtaButtonIcon color={CtaButtonIconColor} size="$icon.20" />
<CtaButtonIcon color="$neutral3" size="$icon.20" />
</TouchableArea>
)}
</Flex>
......
import { G, Path, Svg } from 'react-native-svg'
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
import { createIcon } from '../factories/createIcon'
export const [ArrowUpRight, AnimatedArrowUpRight] = createIcon({
name: 'ArrowUpRight',
getIcon: (props) => (
<Svg viewBox="0 0 20 20" fill="none" {...props}>
<G id="arrow">
<Path
id="Vector"
d="M5.24408 14.7559C5.56951 15.0814 6.09715 15.0814 6.42259 14.7559L13.3333 7.84518V14.1667C13.3333 14.6269 13.7064 15 14.1667 15C14.6269 15 15 14.6269 15 14.1667V5.83333C15 5.3731 14.6269 5 14.1667 5H5.83333C5.3731 5 5 5.3731 5 5.83333C5 6.29357 5.3731 6.66667 5.83333 6.66667H12.1548L5.24408 13.5774C4.91864 13.9028 4.91864 14.4305 5.24408 14.7559Z"
fill={'currentColor' ?? '#7D7D7D'}
fillRule="evenodd"
clipRule="evenodd"
/>
</G>
</Svg>
),
defaultFill: '#7D7D7D',
})
......@@ -23,7 +23,6 @@ export * from './ArrowTurnDownRight'
export * from './ArrowUpCircle'
export * from './ArrowUpDown'
export * from './ArrowUpInCircle'
export * from './ArrowUpRight'
export * from './ArrowsLeftRight'
export * from './BadgeDollar'
export * from './Bank'
......
......@@ -41,7 +41,6 @@ export const uniswapUrls = {
limitsInfo: `${helpUrl}/sections/24372644881293`,
limitsNetworkSupport: `${helpUrl}/articles/24470251716237-What-networks-do-limits-support`,
fiatOnRampHelp: `${helpUrl}/articles/11306574799117`,
fiatOffRampHelp: `${helpUrl}/articles/34006552258957`,
transferCryptoHelp: `${helpUrl}/articles/27103878635661-How-to-transfer-crypto-from-a-Robinhood-or-Coinbase-account-to-the-Uniswap-Wallet`,
moonpayRegionalAvailability: `${helpUrl}/articles/11306664890381-Why-isn-t-MoonPay-available-in-my-region-`,
networkFeeInfo: `${helpUrl}/articles/8370337377805-What-is-a-network-fee-`,
......
......@@ -830,9 +830,8 @@ query SearchTokens($searchQuery: String!, $chains: [Chain!]!) {
query ExploreSearch(
$searchQuery: String!
$nftCollectionsFilter: NftCollectionsFilterInput!
$chains: [Chain!]
) {
searchTokens(searchQuery: $searchQuery, chains: $chains) {
searchTokens(searchQuery: $searchQuery) {
chain
address
decimals
......
......@@ -30,11 +30,9 @@ export enum FeatureFlags {
ExtensionClaimUnitag,
ExtensionPromotionGA,
FiatOffRamp,
NotificationPriceAlertsAndroid,
NotificationPriceAlertsIOS,
NotificationPriceAlerts,
NotificationOnboardingCard,
NotificationUnfundedWalletsAndroid,
NotificationUnfundedWalletsIOS,
NotificationUnfundedWallets,
OnboardingKeyring,
OpenAIAssistant,
PrivateRpc,
......@@ -127,10 +125,8 @@ export const WALLET_FEATURE_FLAG_NAMES = new Map<FeatureFlags, string>([
[FeatureFlags.FiatOffRamp, 'fiat-offramp'],
[FeatureFlags.ForAggregator, 'for-aggregator'],
[FeatureFlags.NotificationOnboardingCard, 'notification_onboarding_card'],
[FeatureFlags.NotificationPriceAlertsAndroid, 'notification_price_alerts_android'],
[FeatureFlags.NotificationPriceAlertsIOS, 'notification_price_alerts_ios'],
[FeatureFlags.NotificationUnfundedWalletsAndroid, 'notification_unfunded_wallet_android'],
[FeatureFlags.NotificationUnfundedWalletsIOS, 'notification_unfunded_wallet_ios'],
[FeatureFlags.NotificationPriceAlerts, 'notification_price_alerts'],
[FeatureFlags.NotificationUnfundedWallets, 'notification_unfunded_wallet'],
[FeatureFlags.OnboardingKeyring, 'onboarding-keyring'],
[FeatureFlags.OpenAIAssistant, 'openai-assistant'],
[FeatureFlags.PrivateRpc, 'mev-blocker'],
......
......@@ -358,11 +358,6 @@ export type LiquidityAnalyticsProperties = ITraceContext & {
currencyInfo1Decimals: number
}
export type NotificationToggleLoggingType =
| 'settings_general_updates_enabled'
| 'settings_price_alerts_enabled'
| 'wallet_activity'
// Please sort new values by EventName type!
export type UniverseEventProperties = {
[ExtensionEventName.OnboardingLoad]: undefined
......@@ -595,7 +590,6 @@ export type UniverseEventProperties = {
[MobileEventName.FiatOnRampQuickActionButtonPressed]: ITraceContext
[MobileEventName.NotificationsToggled]: ITraceContext & {
enabled: boolean
type: NotificationToggleLoggingType
}
[MobileEventName.OnboardingCompleted]: OnboardingCompletedProps & ITraceContext
[MobileEventName.PerformanceReport]: RenderPassReport
......
import { useDeviceDimensions } from 'ui/src/hooks/useDeviceDimensions'
export type WindowSize = {
width: number | undefined
height: number | undefined
}
export function useWindowSize(): WindowSize {
const { fullWidth, fullHeight } = useDeviceDimensions()
return { width: fullWidth, height: fullHeight }
}
export function useIsExtraLargeScreen(): boolean {
return false
}
import { PlatformSplitStubError } from 'utilities/src/errors'
export type WindowSize = {
width: number | undefined
height: number | undefined
}
// TODO: consider deprecating this hook and use `useDeviceDimensions` instead.
export function useWindowSize(): WindowSize {
throw new PlatformSplitStubError('useWindowSize')
}
export function useIsExtraLargeScreen(): boolean {
throw new PlatformSplitStubError('useIsExtraLargeScreen')
}
import { useEffect, useState } from 'react'
import { useEffect, useMemo, useState } from 'react'
import { breakpoints } from 'ui/src/theme'
import type { WindowSize } from 'uniswap/src/hooks/useWindowSize'
import { logger } from 'utilities/src/logger/logger'
import { isExtension } from 'utilities/src/platform'
const isClient = typeof window === 'object'
interface WindowSize {
width: number | undefined
height: number | undefined
}
function getWindowSize(): WindowSize {
return {
width: isClient ? window.innerWidth : undefined,
......@@ -58,5 +62,5 @@ export function useWindowSize(): WindowSize {
*/
export function useIsExtraLargeScreen(): boolean {
const { width } = useWindowSize()
return !!width && width >= breakpoints.xl
return useMemo(() => !!width && width >= breakpoints.xl, [width])
}
......@@ -1751,7 +1751,7 @@
"settings.setting.language.description.mobile": "Uniswap defaults to your device‘s language settings. To change your preferred language, go to “Uniswap” in your device settings and tap on “Language”.",
"settings.setting.language.title": "Language",
"settings.setting.notifications.row.activity.description": "Transfers, requests, and other activity",
"settings.setting.notifications.row.activity.title": "Wallet activity",
"settings.setting.notifications.row.activity.title": "Wallet Activity",
"settings.setting.notifications.row.priceAlerts.description": "Big price changes for favorited tokens",
"settings.setting.notifications.row.priceAlerts.title": "Price alerts",
"settings.setting.notifications.row.updates.description": "Recommendations and new features",
......@@ -2212,8 +2212,6 @@
"transaction.status.sale.canceled": "Canceled sale",
"transaction.status.sale.canceling": "Canceling sale",
"transaction.status.sale.failedOn": "Sale Failed via {{serviceProvider}}",
"transaction.status.sale.pendingCard.msg": "Learn more about selling crypto.",
"transaction.status.sale.pendingCard.title": "Why is my sale still pending?",
"transaction.status.sale.pendingOn": "Selling via {{serviceProvider}}",
"transaction.status.sale.successOn": "Sold via {{serviceProvider}}",
"transaction.status.sell.canceled": "Canceled sell",
......
import { useTranslation } from 'react-i18next'
import { InlineCard, Text, TouchableArea } from 'ui/src'
import { ArrowUpRight, MessageQuestion } from 'ui/src/components/icons'
import { openOfframpPendingSupportLink } from 'wallet/src/utils/linking'
export function OffRampPendingSupportCard(): JSX.Element {
const { t } = useTranslation()
return (
<TouchableArea p="$spacing8" onPress={openOfframpPendingSupportLink}>
<InlineCard
CtaButtonIcon={ArrowUpRight}
CtaButtonIconColor="$neutral2"
Icon={MessageQuestion}
color="$neutral2"
iconColor="$neutral2"
description={
<Text color="$neutral2" variant="body3">
{t('transaction.status.sale.pendingCard.msg')}
</Text>
}
heading={
<Text color="$neutral1" variant="body3">
{t('transaction.status.sale.pendingCard.title')}
</Text>
}
/>
</TouchableArea>
)
}
......@@ -20,7 +20,6 @@ import { ApproveTransactionDetails } from 'wallet/src/features/transactions/Summ
import { BridgeTransactionDetails } from 'wallet/src/features/transactions/SummaryCards/DetailsModal/BridgeTransactionDetails'
import { HeaderLogo } from 'wallet/src/features/transactions/SummaryCards/DetailsModal/HeaderLogo'
import { NftTransactionDetails } from 'wallet/src/features/transactions/SummaryCards/DetailsModal/NftTransactionDetails'
import { OffRampPendingSupportCard } from 'wallet/src/features/transactions/SummaryCards/DetailsModal/OffRampPendingSupportCard'
import { OffRampTransactionDetails } from 'wallet/src/features/transactions/SummaryCards/DetailsModal/OffRampTransactionDetails'
import { OnRampTransactionDetails } from 'wallet/src/features/transactions/SummaryCards/DetailsModal/OnRampTransactionDetails'
import { SwapTransactionDetails } from 'wallet/src/features/transactions/SummaryCards/DetailsModal/SwapTransactionDetails'
......@@ -164,7 +163,7 @@ export function TransactionDetailsModal({
transactionDetails,
}: TransactionDetailsModalProps): JSX.Element {
const { t } = useTranslation()
const { typeInfo, status, addedTime } = transactionDetails
const { typeInfo } = transactionDetails
const [isShowingMore, setIsShowingMore] = useState(false)
const hasMoreInfoRows = [TransactionType.Swap, TransactionType.Bridge].includes(transactionDetails.typeInfo.type)
......@@ -206,10 +205,6 @@ export function TransactionDetailsModal({
)
}
const OFFRAMP_PENDING_STALE_TIME_IN_MINUTES = 20
const isTransactionStale = dayjs().diff(dayjs(addedTime), 'minute') >= OFFRAMP_PENDING_STALE_TIME_IN_MINUTES
const showOffRampPendingCard = isOffRampSaleTransactionInfo(typeInfo) && status === 'pending' && isTransactionStale
return (
<>
<Modal isDismissible alignment="top" name={ModalName.TransactionDetails} onClose={onClose}>
......@@ -227,7 +222,6 @@ export function TransactionDetailsModal({
pt={!hideBottomSeparator && !hasMoreInfoRows ? '$spacing8' : undefined}
onClose={onClose}
/>
{showOffRampPendingCard && <OffRampPendingSupportCard />}
{buttons.length > 0 && (
<Flex gap="$spacing8" pt="$spacing8">
{buttons}
......
......@@ -77,5 +77,5 @@ export const appRatingPromptedMsSelector = (state: WalletState): number | undefi
export const appRatingFeedbackProvidedMsSelector = (state: WalletState): number | undefined =>
state.wallet.appRatingFeedbackProvidedMs
export const selectHasBalanceOrActivityForAddress = (state: WalletState, address: Address): boolean | undefined =>
state.wallet.accounts[address]?.hasBalanceOrActivity
export const selectHasBalanceOrActivityForAddress = (state: WalletState, address: Address): boolean =>
state.wallet.accounts[address]?.hasBalanceOrActivity ?? false
......@@ -136,7 +136,7 @@ const slice = createSlice({
},
resetWallet: () => initialWalletState,
restoreMnemonicComplete: (state) => state,
setHasBalanceOrActivity: (state, action: PayloadAction<{ address: Address; hasBalanceOrActivity?: boolean }>) => {
setHasBalanceOrActivity: (state, action: PayloadAction<{ address: Address; hasBalanceOrActivity: boolean }>) => {
const { address, hasBalanceOrActivity } = action.payload
const id = getValidAddress(address, true)
if (!id) {
......
......@@ -29,10 +29,6 @@ export async function openFORSupportLink(serviceProvider: ServiceProviderInfo):
return openUri(serviceProvider.supportUrl ?? uniswapUrls.helpRequestUrl)
}
export async function openOfframpPendingSupportLink(): Promise<void> {
return openUri(uniswapUrls.helpArticleUrls.fiatOffRampHelp)
}
export async function openSettings(): Promise<void> {
await Linking.openSettings()
}
......
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