Skip to content

Commit

Permalink
ci(release): publish latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-happy-puppy committed Feb 20, 2024
1 parent 2001cd4 commit 8c6c0e9
Show file tree
Hide file tree
Showing 33 changed files with 321 additions and 239 deletions.
38 changes: 9 additions & 29 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
IPFS hash of the deployment:
- CIDv0: `QmeAaU5F67PX1jZemajRJjA6sDvJ1X6ddvgjjqDHfTePx7`
- CIDv1: `bafybeihlezropz7qe2rutxp4solf46m3hgpl7c53fevxscbltlz2fo6exq`
- CIDv0: `QmVUZGU9EBHPpn3BZRhKTQB5VZuDtv2PUetyHxxpfmzcp9`
- CIDv1: `bafybeidkbbgtppk3euej56wgoxllerdoggnsz3fgkirnhrgvlbmff4reii`

The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).

Expand All @@ -10,41 +10,21 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs.

IPFS gateways:
- https://bafybeihlezropz7qe2rutxp4solf46m3hgpl7c53fevxscbltlz2fo6exq.ipfs.dweb.link/
- https://bafybeihlezropz7qe2rutxp4solf46m3hgpl7c53fevxscbltlz2fo6exq.ipfs.cf-ipfs.com/
- [ipfs://QmeAaU5F67PX1jZemajRJjA6sDvJ1X6ddvgjjqDHfTePx7/](ipfs://QmeAaU5F67PX1jZemajRJjA6sDvJ1X6ddvgjjqDHfTePx7/)
- https://bafybeidkbbgtppk3euej56wgoxllerdoggnsz3fgkirnhrgvlbmff4reii.ipfs.dweb.link/
- https://bafybeidkbbgtppk3euej56wgoxllerdoggnsz3fgkirnhrgvlbmff4reii.ipfs.cf-ipfs.com/
- [ipfs://QmVUZGU9EBHPpn3BZRhKTQB5VZuDtv2PUetyHxxpfmzcp9/](ipfs://QmVUZGU9EBHPpn3BZRhKTQB5VZuDtv2PUetyHxxpfmzcp9/)

## 5.10.0 (2024-02-20)
## 5.11.0 (2024-02-20)


### Features

* **web:** [info] active liquidity chart (#6237) 1133601
* **web:** [info] add p0 info analytics (#6338) fdaade8
* **web:** [info] dot grids (#6327) e4e8720
* **web:** [uni-tags] add accept / reject to banners (#6309) 34a5aa7
* **web:** [uni-tags] add banner to account drawer (#6209) 995722d
* **web:** [uni-tags] add banner to swap page (#6234) b41f304
* **web:** add tables error states (#6228) 262f8a0
* **web:** fix PDP in-chart price headers (#6211) a6070ae
* **web:** implement TDP TVL chart gql queries (#6190) dabe043
* **web:** implement TDP volumes chart gql queries (#6188) d044d6b
* **web:** pool protocol switcher (#6339) f81cc26
* **web:** replace account drawer header buttons with action tiles (#6240) fba32e9
* **web:** v2 everywhere (#6164) 5c8ec8d
* **web:** [uni-tags] show username in header (#6353) 28fbb53
* **web:** move PDP in-chart fees display to tooltip (#6288) eaad394


### Bug Fixes

* **web:** [info] fix pool table description ellipsis width (#6148) b83c2a3
* **web:** avoid re-rendering the App constantly (#6296) 45de35c
* **web:** disable statsig metrics (#6368) f554c79
* **web:** fix e2e tests (#6365) 4343ae9
* **web:** fix importing some wallet paths causing errors due to react-native-dotenv (#6255) 6b7fc53
* **web:** import v2 pool goes to add v3 pool (#6273) 8f52943
* **web:** Keep base/quote tokens stable if user has edited the limit price value (#6284) 1dfe744
* **web:** make new landing page enabled by default (#6285) a09d8fe
* **web:** use chainId instead of chainName for analytics (#6390) 81dc15b
* **web:** using correct favicon url (#6298) 46d76a8
* **web:** swap e2e tests (#6412) d5a637e


2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web/5.10.0
web/5.11.0
46 changes: 21 additions & 25 deletions apps/mobile/src/components/fiatOnRamp/QuoteItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ import { Currency } from '@uniswap/sdk-core'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { StyleSheet } from 'react-native'
import { useFiatOnRampLogoUrl } from 'src/components/fiatOnRamp/hooks'
import { Loader } from 'src/components/loading'
import { useFormatExactCurrencyAmount } from 'src/features/fiatOnRamp/hooks'
import { Flex, Icons, Text, TouchableArea } from 'ui/src'
import { getServiceProviderLogo } from 'src/features/fiatOnRamp/utils'
import { Flex, Icons, Text, TouchableArea, useIsDarkMode } from 'ui/src'
import { fonts, iconSizes } from 'ui/src/theme'
import { FiatCurrencyInfo } from 'wallet/src/features/fiatCurrency/hooks'
import { FORQuote, FORServiceProvider } from 'wallet/src/features/fiatOnRamp/types'
import { ImageUri } from 'wallet/src/features/images/ImageUri'
import { useLocalizationContext } from 'wallet/src/features/language/LocalizationContext'
import { getSymbolDisplayText } from 'wallet/src/utils/currency'

function LogoLoader(): JSX.Element {
return (
<Loader.Box borderRadius="$roundedFull" height={iconSizes.icon40} width={iconSizes.icon40} />
)
}

export function FORQuoteItem({
quote,
serviceProvider,
Expand Down Expand Up @@ -46,7 +52,8 @@ export function FORQuoteItem({
currencySymbol: baseCurrency.symbol,
})

const logoUrl = useFiatOnRampLogoUrl(serviceProvider?.logos)
const isDarkMode = useIsDarkMode()
const logoUrl = getServiceProviderLogo(serviceProvider?.logos, isDarkMode)

return (
<TouchableArea onPress={onPress}>
Expand All @@ -62,11 +69,17 @@ export function FORQuoteItem({
<QuoteLoader showCarret={showCarret} />
) : (
<Flex row alignItems="center" gap="$spacing12">
<Loader.Box
borderRadius="$roundedFull"
height={iconSizes.icon40}
width={iconSizes.icon40}
/>
<Flex>
{logoUrl ? (
<ImageUri
fallback={<LogoLoader />}
imageStyle={ServiceProviderLogoStyles.icon}
uri={logoUrl}
/>
) : (
<LogoLoader />
)}
</Flex>
<Flex shrink gap="$spacing4">
<Text color="$neutral1" variant="subheading2">
{serviceProvider?.name}
Expand Down Expand Up @@ -96,23 +109,6 @@ export function FORQuoteItem({
<Flex />
)}
</Flex>
{
// TODO: Enable once https://linear.app/uniswap/issue/MOB-2565/implement-service-providers-logo-once-meld-has-added-them-on-their is unblocked
false && logoUrl && (
<ImageUri
fallback={
<Loader.Box
borderRadius="$roundedFull"
height={iconSizes.icon40}
width={iconSizes.icon40}
/>
}
imageStyle={ServiceProviderLogoStyles.icon}
resizeMode="contain"
uri={logoUrl}
/>
)
}
</Flex>
)}
</Flex>
Expand Down
12 changes: 0 additions & 12 deletions apps/mobile/src/components/fiatOnRamp/hooks.ts

This file was deleted.

3 changes: 3 additions & 0 deletions apps/mobile/src/features/fiatOnRamp/aggregatorHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
isInvalidRequestAmountTooLow,
} from 'wallet/src/features/fiatOnRamp/utils'
import { useLocalizationContext } from 'wallet/src/features/language/LocalizationContext'
import { useActiveAccountAddress } from 'wallet/src/features/wallet/hooks'

// TODO: https://linear.app/uniswap/issue/MOB-2532/implement-fetching-of-available-fiat-currencies-from-meld
const MELD_FIAT_CURRENCY_CODES = ['usd', 'eur']
Expand Down Expand Up @@ -60,6 +61,7 @@ export function useFiatOnRampQuotes({
quotes: FORQuote[] | undefined
} {
const debouncedBaseCurrencyAmount = useDebounce(baseCurrencyAmount, Delay.Short)
const walletAddress = useActiveAccountAddress()

const {
currentData: quotesResponse,
Expand All @@ -72,6 +74,7 @@ export function useFiatOnRampQuotes({
sourceCurrencyCode: baseCurrencyCode,
destinationCurrencyCode: quoteCurrencyCode,
countryCode,
walletAddress: walletAddress ?? '',
}
: skipToken,
{
Expand Down
13 changes: 12 additions & 1 deletion apps/mobile/src/features/fiatOnRamp/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import { FORQuote, FORServiceProvider } from 'wallet/src/features/fiatOnRamp/types'
import { FORLogo, FORQuote, FORServiceProvider } from 'wallet/src/features/fiatOnRamp/types'

export function getServiceProviderForQuote(
quote: FORQuote | undefined,
serviceProviders: FORServiceProvider[] | undefined
): FORServiceProvider | undefined {
return serviceProviders?.find((sp) => sp.serviceProvider === quote?.serviceProvider)
}

export function getServiceProviderLogo(
logos: FORLogo | undefined,
isDarkMode: boolean
): string | undefined {
if (!logos) {
return
}

return isDarkMode ? logos.darkLogo : logos.lightLogo
}
29 changes: 27 additions & 2 deletions apps/mobile/src/screens/FiatOnRampScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NativeStackScreenProps } from '@react-navigation/native-stack'
import React, { ComponentProps, useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { TextInput, TextInputProps } from 'react-native'
import FastImage from 'react-native-fast-image'
import { FadeIn, FadeOut, FadeOutDown } from 'react-native-reanimated'
import { useAppDispatch, useShouldShowNativeKeyboard } from 'src/app/hooks'
import { FiatOnRampStackParamList } from 'src/app/navigation/types'
Expand All @@ -19,17 +20,18 @@ import { FiatOnRampCountryPicker } from 'src/features/fiatOnRamp/FiatOnRampCount
import { FiatOnRampTokenSelectorModal } from 'src/features/fiatOnRamp/FiatOnRampTokenSelector'
import { useFiatOnRampSupportedTokens } from 'src/features/fiatOnRamp/hooks'
import { FiatOnRampCurrency, InitialQuoteSelection } from 'src/features/fiatOnRamp/types'
import { getServiceProviderLogo } from 'src/features/fiatOnRamp/utils'
import { sendMobileAnalyticsEvent } from 'src/features/telemetry'
import { MobileEventName } from 'src/features/telemetry/constants'
import { MobileEventProperties } from 'src/features/telemetry/types'
import { FiatOnRampScreens } from 'src/screens/Screens'
import { AnimatedFlex, Flex, Text } from 'ui/src'
import { AnimatedFlex, Flex, Text, useIsDarkMode } from 'ui/src'
import { usePrevious } from 'utilities/src/react/hooks'
import { DecimalPadLegacy } from 'wallet/src/components/legacy/DecimalPadLegacy'
import { useBottomSheetContext } from 'wallet/src/components/modals/BottomSheetContext'
import { HandleBar } from 'wallet/src/components/modals/HandleBar'
import { useFiatOnRampAggregatorServiceProvidersQuery } from 'wallet/src/features/fiatOnRamp/api'
import { FORQuote } from 'wallet/src/features/fiatOnRamp/types'
import { FORQuote, FORServiceProvider } from 'wallet/src/features/fiatOnRamp/types'
import { pushNotification } from 'wallet/src/features/notifications/slice'
import { AppNotificationType } from 'wallet/src/features/notifications/types'

Expand Down Expand Up @@ -57,9 +59,21 @@ function selectInitialQuote(
return { quote: undefined, type: undefined }
}

function preloadServiceProviderLogos(
serviceProviders: FORServiceProvider[],
isDarkMode: boolean
): void {
FastImage.preload(
serviceProviders
.map((sp) => ({ uri: getServiceProviderLogo(sp.logos, isDarkMode) }))
.filter((sp) => !!sp.uri)
)
}

export function FiatOnRampScreen({ navigation }: Props): JSX.Element {
const { t } = useTranslation()
const dispatch = useAppDispatch()
const isDarkMode = useIsDarkMode()
const [selection, setSelection] = useState<TextInputProps['selection']>()
const [value, setValue] = useState('')
const [showTokenSelector, setShowTokenSelector] = useState(false)
Expand Down Expand Up @@ -109,6 +123,17 @@ export function FiatOnRampScreen({ navigation }: Props): JSX.Element {
error: serviceProvidersError,
} = useFiatOnRampAggregatorServiceProvidersQuery()

// preload service provider logos for given quotes for the next screen
useEffect(() => {
if (serviceProvidersResponse?.serviceProviders && quotes) {
const quotesServiceProviderNames = quotes.map((q) => q.serviceProvider)
const serviceProviders = serviceProvidersResponse.serviceProviders.filter(
(sp) => quotesServiceProviderNames.indexOf(sp.serviceProvider) !== -1
)
preloadServiceProviderLogos(serviceProviders, isDarkMode)
}
}, [serviceProvidersResponse, quotes, isDarkMode])

const { errorText, errorColor } = useParseFiatOnRampError(
quotesError || serviceProvidersError,
meldSupportedFiatCurrency.code
Expand Down
1 change: 1 addition & 0 deletions apps/web/.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ REACT_APP_TEMP_API_URL="https://temp.gateway.uniswap.org/v1"
REACT_APP_UNISWAP_API_URL="https://interface.gateway.uniswap.org/v2"
REACT_APP_UNISWAP_BASE_API_URL="https://interface.gateway.uniswap.org/"
REACT_APP_UNISWAP_GATEWAY_DNS="https://interface.gateway.uniswap.org/v2"
REACT_APP_UNITAGS_API_URL="https://gateway.uniswap.org/v2/unitags"
REACT_APP_WALLET_CONNECT_PROJECT_ID="c6c9bacd35afa3eb9e6cccf6d8464395"
1 change: 1 addition & 0 deletions apps/web/cypress/e2e/swap/swap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ describe('Swap', () => {
})

it('swaps ETH for USDC', () => {
cy.interceptGraphqlOperation('Activity', 'mini-portfolio/empty_activity.json')
cy.visit('/swap')
cy.hardhat({ automine: false })
getBalance(USDC_MAINNET).then((initialBalance) => {
Expand Down
16 changes: 16 additions & 0 deletions apps/web/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ declare global {
* @returns {Chainable<Subject>}
*/
waitForAmplitudeEvent(eventName: string, requiredProperties?: string[]): Chainable<Subject>
/**
* Intercepts a specific graphql operation and responds with the given fixture.
* @param {string} operationName - The name of the graphql operation to intercept.
* @param {string} fixturePath - The path to the fixture to respond with.
*/
interceptGraphqlOperation(operationName: string, fixturePath: string): Chainable<Subject>
}
interface VisitOptions {
serviceWorker?: true
Expand Down Expand Up @@ -96,3 +102,13 @@ Cypress.Commands.add('waitForAmplitudeEvent', (eventName, requiredProperties) =>
}
return findAndDiscardEventsUpToTarget()
})

Cypress.Commands.add('interceptGraphqlOperation', (operationName, fixturePath) => {
return cy.intercept(/(?:interface|beta).gateway.uniswap.org\/v1\/graphql/, (req) => {
if (req.body.operationName === operationName) {
req.reply({ fixture: fixturePath })
} else {
req.continue()
}
})
})
2 changes: 1 addition & 1 deletion apps/web/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const forks = {
[ChainId.MAINNET]: {
url: `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`,
// Temporarily hardcoding this to fix e2e tests as we investigate source of swap tests failing on older blocknumbers
blockNumber: 19236051,
blockNumber: 19270708,
...forkingConfig,
},
[ChainId.POLYGON]: {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@
"@uniswap/merkle-distributor": "1.0.1",
"@uniswap/permit2-sdk": "1.2.0",
"@uniswap/redux-multicall": "1.1.8",
"@uniswap/router-sdk": "1.7.1",
"@uniswap/router-sdk": "1.8.0",
"@uniswap/sdk-core": "4.1.2",
"@uniswap/smart-order-router": "3.17.3",
"@uniswap/token-lists": "1.0.0-beta.33",
"@uniswap/uniswapx-sdk": "1.4.1",
"@uniswap/universal-router-sdk": "1.5.8",
"@uniswap/universal-router-sdk": "1.7.1",
"@uniswap/v2-core": "1.0.1",
"@uniswap/v2-periphery": "1.1.0-beta.0",
"@uniswap/v2-sdk": "4.1.0",
Expand Down
13 changes: 10 additions & 3 deletions apps/web/src/components/AccountDrawer/AuthenticatedHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ import { useAppDispatch } from 'state/hooks'
import { setRecentConnectionDisconnected } from 'state/user/reducer'
import styled from 'styled-components'
import { CopyHelper, ThemedText } from 'theme/components'
import { Icons } from 'ui/src'
import { shortenAddress } from 'utilities/src/addresses'
import { isPathBlocked } from 'utils/blockedPaths'
import { NumberType, useFormatter } from 'utils/formatNumbers'
import { useUnitagByAddress } from 'wallet/src/features/unitags/hooks'
import { useCloseModal, useFiatOnrampAvailability, useOpenModal, useToggleModal } from '../../state/application/hooks'
import { ApplicationModal } from '../../state/application/reducer'
import { useUserHasAvailableClaim, useUserUnclaimedAmount } from '../../state/claim/hooks'
Expand Down Expand Up @@ -200,6 +202,7 @@ export default function AuthenticatedHeader({
const [showDisconnectConfirm, setShowDisconnectConfirm] = useState(false)

const isUniTagsEnabled = useUniTagsEnabled()
const { unitag } = useUnitagByAddress(account, isUniTagsEnabled && Boolean(account))

return (
<AuthenticatedHeaderWrapper>
Expand All @@ -209,10 +212,14 @@ export default function AuthenticatedHeader({
{account && (
<AccountNamesWrapper>
<ThemedText.SubHeader>
<CopyText toCopy={ENSName ?? account}>{ENSName ?? shortenAddress(account)}</CopyText>
<CopyText toCopy={unitag?.username ?? ENSName ?? account}>
<Row gap="xs">
{unitag?.username ?? ENSName ?? shortenAddress(account)}
{unitag?.username && <Icons.Unitag size={24} />}
</Row>
</CopyText>
</ThemedText.SubHeader>
{/* Displays smaller view of account if ENS name was rendered above */}
{ENSName && (
{(unitag || ENSName) && (
<ThemedText.BodySmall color="neutral2">
<CopyText toCopy={account}>{shortenAddress(account)}</CopyText>
</ThemedText.BodySmall>
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 8c6c0e9

Please sign in to comment.