diff --git a/RELEASE b/RELEASE index 002c9203f4d..2d9dc55d6e0 100644 --- a/RELEASE +++ b/RELEASE @@ -1,5 +1,10 @@ -We are back with some small updates! Here’s the latest: +We are back with a new feature: + +Fiat Offramp: Users can now sell their crypto back into cash and have it deposit to their bank account, centralized exchange account, and more! + +Other changes: - More robust dapp information on Activity screen +- Reduced onboarding screens for new wallets - Improved volume-based sorting on our Explore page - Various bug fixes and performance improvements \ No newline at end of file diff --git a/VERSION b/VERSION index e2f84122602..3abd13892d3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -extension/1.14.0 \ No newline at end of file +mobile/1.44.1 \ No newline at end of file diff --git a/apps/mobile/android/app/build.gradle b/apps/mobile/android/app/build.gradle index e53d8c458c7..10b45df3a19 100644 --- a/apps/mobile/android/app/build.gradle +++ b/apps/mobile/android/app/build.gradle @@ -89,9 +89,9 @@ if (isCI && datadogPropertiesAvailable && !isE2E) { apply from: "../../../../node_modules/@datadog/mobile-react-native/datadog-sourcemaps.gradle" } -def devVersionName = "1.44" -def betaVersionName = "1.44" -def prodVersionName = "1.44" +def devVersionName = "1.44.1" +def betaVersionName = "1.44.1" +def prodVersionName = "1.44.1" android { ndkVersion rootProject.ext.ndkVersion diff --git a/apps/mobile/ios/Uniswap.xcodeproj/project.pbxproj b/apps/mobile/ios/Uniswap.xcodeproj/project.pbxproj index bcb1e7c214b..5b43c15101f 100644 --- a/apps/mobile/ios/Uniswap.xcodeproj/project.pbxproj +++ b/apps/mobile/ios/Uniswap.xcodeproj/project.pbxproj @@ -2230,7 +2230,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; @@ -2283,7 +2283,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCore; @@ -2336,7 +2336,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCore; @@ -2389,7 +2389,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCore; @@ -2427,7 +2427,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; @@ -2463,7 +2463,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCoreTests; @@ -2498,7 +2498,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCoreTests; @@ -2533,7 +2533,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = schemes.WidgetsCoreTests; @@ -2580,7 +2580,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; @@ -2626,7 +2626,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.widgets; @@ -2672,7 +2672,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.dev.widgets; @@ -2718,7 +2718,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.beta.widgets; @@ -2760,7 +2760,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; @@ -2803,7 +2803,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.WidgetIntentExtension; @@ -2846,7 +2846,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.dev.WidgetIntentExtension; @@ -2889,7 +2889,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.beta.WidgetIntentExtension; @@ -2925,7 +2925,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2963,7 +2963,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -3164,7 +3164,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; @@ -3210,7 +3210,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.OneSignalNotificationServiceExtension; @@ -3322,7 +3322,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -3394,7 +3394,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.beta.OneSignalNotificationServiceExtension; @@ -3506,7 +3506,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -3578,7 +3578,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.44; + MARKETING_VERSION = 1.44.1; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.dev.OneSignalNotificationServiceExtension; diff --git a/apps/mobile/src/components/accounts/__snapshots__/AccountHeader.test.tsx.snap b/apps/mobile/src/components/accounts/__snapshots__/AccountHeader.test.tsx.snap index 9ff5ac54aba..6f28825fa67 100644 --- a/apps/mobile/src/components/accounts/__snapshots__/AccountHeader.test.tsx.snap +++ b/apps/mobile/src/components/accounts/__snapshots__/AccountHeader.test.tsx.snap @@ -208,16 +208,6 @@ exports[`AccountHeader renders correctly 1`] = ` } > { }-${index}` } -function tokenStatsToTokenItemData(tokenStat: TokenStats): TokenItemData | null { - const formattedChain = fromGraphQLChain(tokenStat.chain) +function tokenRankingStatsToTokenItemData(tokenRankingStat: TokenRankingsStat): TokenItemData | null { + const formattedChain = fromGraphQLChain(tokenRankingStat.chain) if (!formattedChain) { return null } return { - name: tokenStat.name ?? '', - logoUrl: tokenStat.logo ?? '', + name: tokenRankingStat.name ?? '', + logoUrl: tokenRankingStat.logo ?? '', chainId: formattedChain, - address: tokenStat.address, - symbol: tokenStat.symbol ?? '', - price: tokenStat.price?.value, - marketCap: tokenStat.fullyDilutedValuation?.value, - pricePercentChange24h: tokenStat.pricePercentChange1Day?.value, - volume24h: tokenStat.volume1Day?.value, - totalValueLocked: tokenStat.volume1Day?.value, + address: tokenRankingStat.address, + symbol: tokenRankingStat.symbol ?? '', + price: tokenRankingStat.price?.value, + marketCap: tokenRankingStat.fullyDilutedValuation?.value, + pricePercentChange24h: tokenRankingStat.pricePercentChange1Day?.value, + volume24h: tokenRankingStat.volume1Day?.value, + totalValueLocked: tokenRankingStat.totalValueLocked?.value, } } @@ -290,9 +290,9 @@ function useTokenItems( const tokenMetadataDisplayType = getTokenMetadataDisplayType(orderBy) const topTokens: TokenItemDataWithMetadata[] | undefined = data.tokenRankings[orderBy]?.tokens?.reduce( - (acc: TokenItemDataWithMetadata[], tokenStat) => { - if (tokenStat) { - const tokenItemData = tokenStatsToTokenItemData(tokenStat) + (acc: TokenItemDataWithMetadata[], tokenRankingStat) => { + if (tokenRankingStat) { + const tokenItemData = tokenRankingStatsToTokenItemData(tokenRankingStat) if (tokenItemData) { acc.push({ tokenItemData, tokenMetadataDisplayType }) } diff --git a/apps/mobile/src/features/deepLinking/handleOffRampReturnLinkSaga.ts b/apps/mobile/src/features/deepLinking/handleOffRampReturnLinkSaga.ts index c33d81c85f0..09eb5f6187c 100644 --- a/apps/mobile/src/features/deepLinking/handleOffRampReturnLinkSaga.ts +++ b/apps/mobile/src/features/deepLinking/handleOffRampReturnLinkSaga.ts @@ -36,8 +36,6 @@ function* _handleOffRampReturnLink(url: URL) { throw new Error('Missing externalTransactionId or moonpay data in fiat offramp deep link') } - sendAnalyticsEvent(FiatOffRampEventName.FiatOffRampWidgetCompleted, { externalTransactionId }) - let offRampTransferDetails: OffRampTransferDetailsResponse | undefined try { @@ -51,6 +49,7 @@ function* _handleOffRampReturnLink(url: URL) { } catch (error) { logger.error(error, { tags: { file: 'handleOffRampReturnLinkSaga', function: 'handleOffRampReturnLink' }, + extra: { url: url.toString() }, }) throw new Error('Failed to fetch offramp transfer details') } @@ -62,6 +61,16 @@ function* _handleOffRampReturnLink(url: URL) { const { tokenAddress, baseCurrencyCode, baseCurrencyAmount, depositWalletAddress, logos, provider, chainId } = offRampTransferDetails + const analyticsProperties = { + cryptoCurrency: baseCurrencyCode, + currencyAmount: baseCurrencyAmount, + serviceProvider: provider, + chainId, + externalTransactionId, + } + + sendAnalyticsEvent(FiatOffRampEventName.FiatOffRampWidgetCompleted, analyticsProperties) + const currencyTradeableAsset: TradeableAsset = { address: tokenAddress, chainId: Number(chainId) as UniverseChainId, @@ -72,13 +81,7 @@ function* _handleOffRampReturnLink(url: URL) { name: provider, logoUrl: logos.lightLogo, onSubmitCallback: () => { - sendAnalyticsEvent(FiatOffRampEventName.FiatOffRampFundsSent, { - cryptoCurrency: baseCurrencyCode, - currencyAmount: baseCurrencyAmount, - serviceProvider: provider, - chainId, - externalTransactionId, - }) + sendAnalyticsEvent(FiatOffRampEventName.FiatOffRampFundsSent, analyticsProperties) }, moonpayCurrencyCode: baseCurrencyCode, meldCurrencyCode: baseCurrencyCode, diff --git a/apps/mobile/src/screens/FiatOnRampScreen.tsx b/apps/mobile/src/screens/FiatOnRampScreen.tsx index 9aa49f5d392..01b0d101b89 100644 --- a/apps/mobile/src/screens/FiatOnRampScreen.tsx +++ b/apps/mobile/src/screens/FiatOnRampScreen.tsx @@ -398,12 +398,13 @@ export function FiatOnRampScreen({ navigation }: Props): JSX.Element { const notAvailableInThisRegion = supportedFiatCurrencies?.length === 0 - const { errorText } = useParseFiatOnRampError( - !notAvailableInThisRegion && quotesError, - meldSupportedFiatCurrency.code, - exceedsBalanceError, - quotes?.length === 0, - ) + const { errorText } = useParseFiatOnRampError({ + error: !notAvailableInThisRegion && quotesError, + currencyCode: meldSupportedFiatCurrency.code, + tokenCode: quoteCurrency.currencyInfo?.currency.symbol, + balanceError: exceedsBalanceError, + noQuotesReturned: quotes?.length === 0, + }) const onSelectionChange = useCallback( (start: number, end: number) => { diff --git a/apps/mobile/src/screens/HomeScreen/useHomeScreenState.tsx b/apps/mobile/src/screens/HomeScreen/useHomeScreenState.tsx index ad8ec2d6f9a..84ea4d67931 100644 --- a/apps/mobile/src/screens/HomeScreen/useHomeScreenState.tsx +++ b/apps/mobile/src/screens/HomeScreen/useHomeScreenState.tsx @@ -51,10 +51,13 @@ export function useHomeScreenState(): { const hasNft = !!nftData?.nftBalances?.edges.length const hasTokenBalance = !!Object.entries(balancesById || {}).length - const hasUsedWalletFromRemote = !!hasTokenBalance || !!hasNft || !!hasActivity + const hasUsedWalletFromRemote = hasTokenBalance || hasNft || hasActivity + const dataIsLoading = areBalancesLoading || areNFTsLoading || isActivityLoading + + // 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 isTabsDataLoaded = - hasUsedWalletFromRemote || (!areBalancesLoading && !areNFTsLoading && !isActivityLoading) || hasUsedWalletFromCache const hasUsedWallet = hasUsedWalletFromCache || hasUsedWalletFromRemote useEffect(() => { diff --git a/packages/uniswap/src/features/fiatOnRamp/hooks.ts b/packages/uniswap/src/features/fiatOnRamp/hooks.ts index 0e6e072278c..2857bb59f61 100644 --- a/packages/uniswap/src/features/fiatOnRamp/hooks.ts +++ b/packages/uniswap/src/features/fiatOnRamp/hooks.ts @@ -273,12 +273,19 @@ export function useFiatOnRampQuotes({ } } -export function useParseFiatOnRampError( - error: unknown, - currencyCode: string, - balanceError: boolean, - noQuotesReturned: boolean, -): { +export function useParseFiatOnRampError({ + error, + currencyCode, + tokenCode, + balanceError, + noQuotesReturned, +}: { + error: unknown + currencyCode: string + tokenCode?: string + balanceError: boolean + noQuotesReturned: boolean +}): { errorText: string | undefined } { const { t } = useTranslation() @@ -289,28 +296,33 @@ export function useParseFiatOnRampError( if (balanceError) { errorText = t('fiatOffRamp.error.balance') } + if (noQuotesReturned) { + errorText = t('fiatOnRamp.error.noQuotes') + } if (!error) { return { errorText } } - errorText = noQuotesReturned ? t('fiatOnRamp.error.noQuotes') : t('fiatOnRamp.error.default') + errorText = t('fiatOnRamp.error.default') if (isFiatOnRampApiError(error)) { + const formatMinMaxError = (amount: number, unit?: string): string => { + return ( + formatNumberOrString({ + value: amount, + type: unit === 'token' ? NumberType.TokenTx : NumberType.FiatStandard, + currencyCode, + }) + (unit === 'token' ? ` ${tokenCode}` : '') + ) + } + if (isInvalidRequestAmountTooLow(error)) { - const formattedAmount = formatNumberOrString({ - value: error.data.context.minimumAllowed, - type: NumberType.FiatStandard, - currencyCode, - }) - errorText = t('fiatOnRamp.error.min', { amount: formattedAmount }) + const { minimumAllowed, unit } = error.data.context + errorText = t('fiatOnRamp.error.min', { amount: formatMinMaxError(minimumAllowed, unit) }) } else if (isInvalidRequestAmountTooHigh(error)) { - const formattedAmount = formatNumberOrString({ - value: error.data.context.maximumAllowed, - type: NumberType.FiatStandard, - currencyCode, - }) - errorText = t('fiatOnRamp.error.max', { amount: formattedAmount }) + const { maximumAllowed, unit } = error.data.context + errorText = t('fiatOnRamp.error.max', { amount: formatMinMaxError(maximumAllowed, unit) }) } } diff --git a/packages/uniswap/src/features/fiatOnRamp/utils.ts b/packages/uniswap/src/features/fiatOnRamp/utils.ts index cc1226a20e8..c1e075c5856 100644 --- a/packages/uniswap/src/features/fiatOnRamp/utils.ts +++ b/packages/uniswap/src/features/fiatOnRamp/utils.ts @@ -35,6 +35,7 @@ export interface InvalidRequestAmountTooLow extends FORApiError { errorName: 'InvalidRequestAmountTooLow' context: { minimumAllowed: number + unit?: 'token' | 'fiat' } } } @@ -54,6 +55,7 @@ export interface InvalidRequestAmountTooHigh extends FORApiError { errorName: 'InvalidRequestAmountTooHigh' context: { maximumAllowed: number + unit?: 'token' | 'fiat' } } } diff --git a/packages/uniswap/src/features/telemetry/types.ts b/packages/uniswap/src/features/telemetry/types.ts index 363dd533c3b..17b1cce8b4d 100644 --- a/packages/uniswap/src/features/telemetry/types.ts +++ b/packages/uniswap/src/features/telemetry/types.ts @@ -306,11 +306,7 @@ export type FORTransactionUpdatedProperties = { serviceProvider: string } -export type FORWidgetCompletedProperties = ITraceContext & { - externalTransactionId: Maybe -} - -export type FORFundsSentProperties = ITraceContext & { +export type OfframpSendTransactionProperties = ITraceContext & { cryptoCurrency: string currencyAmount: number serviceProvider: string @@ -383,8 +379,8 @@ export type UniverseEventProperties = { [FiatOffRampEventName.FiatOffRampUnsupportedTokenBack]: FORUnsupportedTokenSelectedProperties [FiatOffRampEventName.FiatOffRampUnsupportedTokenSwap]: FORUnsupportedTokenSelectedProperties [FiatOffRampEventName.FiatOffRampWidgetOpened]: FORWidgetOpenedProperties - [FiatOffRampEventName.FiatOffRampWidgetCompleted]: FORWidgetCompletedProperties - [FiatOffRampEventName.FiatOffRampFundsSent]: FORFundsSentProperties + [FiatOffRampEventName.FiatOffRampWidgetCompleted]: OfframpSendTransactionProperties + [FiatOffRampEventName.FiatOffRampFundsSent]: OfframpSendTransactionProperties [FiatOnRampEventName.FiatOnRampAmountEntered]: FORAmountEnteredProperties [FiatOnRampEventName.FiatOnRampTokenSelected]: FORTokenSelectedProperties [FiatOnRampEventName.FiatOnRampTransactionUpdated]: FORTransactionUpdatedProperties diff --git a/packages/wallet/src/components/accounts/AnimatedUnitagDisplayName.native.tsx b/packages/wallet/src/components/accounts/AnimatedUnitagDisplayName.native.tsx index 121c0ebd3ea..55a9528d75c 100644 --- a/packages/wallet/src/components/accounts/AnimatedUnitagDisplayName.native.tsx +++ b/packages/wallet/src/components/accounts/AnimatedUnitagDisplayName.native.tsx @@ -1,5 +1,5 @@ import { SharedEventName } from '@uniswap/analytics-events' -import { BaseSyntheticEvent, memo, useCallback, useMemo, useRef, useState } from 'react' +import { BaseSyntheticEvent, memo, useCallback, useMemo, useState } from 'react' import { LayoutChangeEvent } from 'react-native' import { useDispatch } from 'react-redux' import { AnimatePresence, Flex, Text, TouchableArea, getTokenValue } from 'ui/src' @@ -89,7 +89,6 @@ function _AnimatedUnitagDisplayName({ row width={viewWidth} opacity={isLayoutReady ? 1 : 0} - animation="100ms" enterStyle={{ opacity: 0 }} exitStyle={{ opacity: 0 }} > @@ -146,27 +145,17 @@ function _AnimatedUnitagDisplayName({ export function useLayoutWidth(pause = false): { width: number onLayout: (event: LayoutChangeEvent) => void - remeasure: () => void } { const [width, setWidth] = useState(0) - const isWidthSet = useRef(false) const onLayout = (event: LayoutChangeEvent): void => { if (pause) { return } setWidth(event.nativeEvent.layout.width) - if (event.nativeEvent.layout.width > 0) { - isWidthSet.current = true - } } - const remeasure = useCallback(() => { - setWidth(0) - isWidthSet.current = false - }, []) - - return { width, onLayout, remeasure } + return { width, onLayout } } export const AnimatedUnitagDisplayName = memo(_AnimatedUnitagDisplayName) diff --git a/packages/wallet/src/features/fiatOnRamp/api.ts b/packages/wallet/src/features/fiatOnRamp/api.ts index be70ca317af..c321f9f5beb 100644 --- a/packages/wallet/src/features/fiatOnRamp/api.ts +++ b/packages/wallet/src/features/fiatOnRamp/api.ts @@ -23,7 +23,9 @@ export async function fetchFORTransaction( forceFetch: boolean, activeAccountAddress: Address | null, ): Promise { - const isOffRamp = previousTransactionDetails.typeInfo.type === TransactionType.LocalOffRamp + const isOffRamp = + previousTransactionDetails.typeInfo.type === TransactionType.LocalOffRamp || + previousTransactionDetails.typeInfo.type === TransactionType.OffRampSale const isRecent = dayjs(previousTransactionDetails.addedTime).isAfter( dayjs().subtract(FIAT_ONRAMP_FORCE_FETCH_TX_TIMEOUT, 'ms'), ) diff --git a/packages/wallet/src/features/transactions/SummaryCards/SummaryItems/OffRampTransferSummaryItem.tsx b/packages/wallet/src/features/transactions/SummaryCards/SummaryItems/OffRampTransferSummaryItem.tsx index ac613d0fa33..0b3e863d132 100644 --- a/packages/wallet/src/features/transactions/SummaryCards/SummaryItems/OffRampTransferSummaryItem.tsx +++ b/packages/wallet/src/features/transactions/SummaryCards/SummaryItems/OffRampTransferSummaryItem.tsx @@ -29,7 +29,7 @@ export function OffRampTransferSummaryItem({