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 28, 2024
1 parent c1daf02 commit 06e937d
Show file tree
Hide file tree
Showing 59 changed files with 1,950 additions and 1,091 deletions.
23 changes: 16 additions & 7 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
IPFS hash of the deployment:
- CIDv0: `QmYsHGBHp98EzfBdS8e3inLYfg78s7iWwjJ6gcQwAC9pxH`
- CIDv1: `bafybeie4nwp4jxdsqscdvwbjj43pgjz5eta3keqy3wftdszlmacbbourwi`
- CIDv0: `QmPejsjfiS8N5GaQYKoMirK9GXMJCEhyTbCEsU6mpzooNJ`
- CIDv1: `bafybeiatpx5zjwrh3bsmjdrt77hlkjuztsnqm63dfzr4mf2nbbit6hwx5m`

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

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

IPFS gateways:
- https://bafybeie4nwp4jxdsqscdvwbjj43pgjz5eta3keqy3wftdszlmacbbourwi.ipfs.dweb.link/
- https://bafybeie4nwp4jxdsqscdvwbjj43pgjz5eta3keqy3wftdszlmacbbourwi.ipfs.cf-ipfs.com/
- [ipfs://QmYsHGBHp98EzfBdS8e3inLYfg78s7iWwjJ6gcQwAC9pxH/](ipfs://QmYsHGBHp98EzfBdS8e3inLYfg78s7iWwjJ6gcQwAC9pxH/)
- https://bafybeiatpx5zjwrh3bsmjdrt77hlkjuztsnqm63dfzr4mf2nbbit6hwx5m.ipfs.dweb.link/
- https://bafybeiatpx5zjwrh3bsmjdrt77hlkjuztsnqm63dfzr4mf2nbbit6hwx5m.ipfs.cf-ipfs.com/
- [ipfs://QmPejsjfiS8N5GaQYKoMirK9GXMJCEhyTbCEsU6mpzooNJ/](ipfs://QmPejsjfiS8N5GaQYKoMirK9GXMJCEhyTbCEsU6mpzooNJ/)

## 5.15.0 (2024-02-27)
## 5.16.0 (2024-02-28)


### Features

* **web:** [info] enable by default (#6623) (#6624) 7442c9e
* **web:** [info] enable by default (#6623) 0573173
* **web:** swap smarter banner (#6579) c715d1f


### Bug Fixes

* **web:** [info] remove markets from pool token (#6613) 4fdad80
* **web:** fix analytics for swap tab clicked and page name (#6600) f018e73
* **web:** fix math for calculating prices for small decimals (#6612) 59900ff
* **web:** Landing page style fixes at small heights (#6603) 0975cfa


2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web/5.15.0
web/5.16.0
10 changes: 5 additions & 5 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@
"@uniswap/ethers-rs-mobile": "0.0.5",
"@uniswap/sdk-core": "4.1.2",
"@uniswap/v3-sdk": "3.10.2",
"@walletconnect/core": "2.10.1",
"@walletconnect/react-native-compat": "2.10.1",
"@walletconnect/utils": "2.10.1",
"@walletconnect/web3wallet": "1.9.1",
"@walletconnect/core": "2.11.2",
"@walletconnect/react-native-compat": "2.11.2",
"@walletconnect/utils": "2.11.2",
"@walletconnect/web3wallet": "1.10.2",
"apollo3-cache-persist": "0.14.1",
"babel-plugin-transform-inline-environment-variables": "0.4.4",
"babel-plugin-transform-remove-console": "6.9.4",
Expand Down Expand Up @@ -162,7 +162,7 @@
"@types/react-native": "0.71.3",
"@types/redux-mock-store": "1.0.6",
"@uniswap/eslint-config": "workspace:^",
"@walletconnect/types": "2.8.6",
"@walletconnect/types": "2.11.2",
"@welldone-software/why-did-you-render": "7.0.1",
"babel-jest": "29.6.1",
"babel-loader": "8.2.3",
Expand Down
6 changes: 3 additions & 3 deletions apps/mobile/src/app/modals/AccountSwitcherModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme
})

const addWalletOptions = useMemo<MenuItemProp[]>(() => {
const onPressCreateNewWallet = async (): Promise<void> => {
const onPressCreateNewWallet = (): void => {
// Ensure no pending accounts
await dispatch(pendingAccountActions.trigger(PendingAccountActions.Delete))
await dispatch(createAccountActions.trigger())
dispatch(pendingAccountActions.trigger(PendingAccountActions.ActivateOneAndDelete))
dispatch(createAccountActions.trigger())

if (unitagsFeatureFlagEnabled) {
if (hasImportedSeedPhrase) {
Expand Down
14 changes: 9 additions & 5 deletions apps/mobile/src/components/RemoveWallet/useModalContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,15 @@ export const useModalContent = ({
</Trans>
),
description: (
<Trans t={t}>
It shares the same recovery phrase as{' '}
<Text color="$neutral1">{{ wallets: associatedAccountNames }}</Text>. Your recovery
phrase will remain stored until you delete all remaining wallets.
</Trans>
<Text color="$neutral2" variant="body3">
<Trans t={t}>
It shares the same recovery phrase as{' '}
<Text color="$neutral1" variant="body3">
{{ wallets: associatedAccountNames }}
</Text>
. Your recovery phrase will remain stored until you delete all remaining wallets.
</Trans>
</Text>
),
Icon: TrashIcon,
iconColorLabel: 'statusCritical',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,15 @@ export function DappConnectedNetworkModal({
const onDisconnect = async (): Promise<void> => {
try {
dispatch(removeSession({ account: address, sessionId: id }))
await wcWeb3Wallet.disconnectSession({
topic: id,
reason: getSdkError('USER_DISCONNECTED'),
})
// Explicitly verify that WalletConnect has this session id as an active session
// It's possible that the session was already disconnected on WC but wasn't updated locally in redux
const sessions = wcWeb3Wallet.getActiveSessions()
if (sessions[session.id]) {
await wcWeb3Wallet.disconnectSession({
topic: session.id,
reason: getSdkError('USER_DISCONNECTED'),
})
}
dispatch(
pushNotification({
type: AppNotificationType.WalletConnect,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,15 @@ export function DappConnectionItem({
const onDisconnect = async (): Promise<void> => {
try {
dispatch(removeSession({ account: address, sessionId: session.id }))
await wcWeb3Wallet.disconnectSession({
topic: session.id,
reason: getSdkError('USER_DISCONNECTED'),
})
// Explicitly verify that WalletConnect has this session id as an active session
// It's possible that the session was already disconnected on WC but wasn't updated locally in redux
const sessions = wcWeb3Wallet.getActiveSessions()
if (sessions[session.id]) {
await wcWeb3Wallet.disconnectSession({
topic: session.id,
reason: getSdkError('USER_DISCONNECTED'),
})
}
dispatch(
pushNotification({
type: AppNotificationType.WalletConnect,
Expand Down
13 changes: 7 additions & 6 deletions apps/mobile/src/components/fiatOnRamp/QuoteItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Loader } from 'src/components/loading'
import { useFormatExactCurrencyAmount } from 'src/features/fiatOnRamp/hooks'
import { Flex, Icons, Text, TouchableArea, useIsDarkMode } from 'ui/src'
import { fonts, iconSizes } from 'ui/src/theme'
import { NumberType } from 'utilities/src/format/types'
import { FiatCurrencyInfo } from 'wallet/src/features/fiatCurrency/hooks'
import { FORQuote, FORServiceProvider } from 'wallet/src/features/fiatOnRamp/types'
import { getServiceProviderLogo } from 'wallet/src/features/fiatOnRamp/utils'
Expand All @@ -29,7 +30,7 @@ export function FORQuoteItem({
showCarret,
active,
}: {
quote: FORQuote | undefined
quote: FORQuote
serviceProvider: FORServiceProvider | undefined
currency: Maybe<Currency>
loading: boolean
Expand All @@ -39,17 +40,17 @@ export function FORQuoteItem({
active?: boolean
}): JSX.Element {
const { t } = useTranslation()
const { addFiatSymbolToNumber } = useLocalizationContext()
const { formatNumberOrString } = useLocalizationContext()

const quoteAmount = useFormatExactCurrencyAmount(
(quote?.destinationAmount || 0).toString(),
currency
)

const quoteEquivalentInSourceCurrencyAmount = addFiatSymbolToNumber({
value: quote?.sourceAmount || 0,
currencyCode: baseCurrency.code,
currencySymbol: baseCurrency.symbol,
const quoteEquivalentInSourceCurrencyAmount = formatNumberOrString({
value: quote.sourceAmount - quote.totalFee,
type: NumberType.FiatStandard,
currencyCode: baseCurrency.code.toLowerCase(),
})

const isDarkMode = useIsDarkMode()
Expand Down
26 changes: 23 additions & 3 deletions apps/mobile/src/components/unitags/DeleteUnitagModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { useNavigation } from '@react-navigation/native'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Button, Flex, Icons, Text } from 'ui/src'
import { ActivityIndicator } from 'react-native'
import { Button, Flex, Icons, Text, useSporeColors } from 'ui/src'
import { fonts } from 'ui/src/theme'
import { logger } from 'utilities/src/logger/logger'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
import { pushNotification } from 'wallet/src/features/notifications/slice'
Expand All @@ -23,13 +26,16 @@ export function DeleteUnitagModal({
onClose: () => void
}): JSX.Element {
const { t } = useTranslation()
const colors = useSporeColors()
const navigation = useNavigation()
const dispatch = useAppDispatch()
const { triggerRefetchUnitags } = useUnitagUpdater()
const account = useAccount(address)
const signerManager = useWalletSigners()
const [isDeleting, setIsDeleting] = useState(false)

const handleDeleteError = (): void => {
setIsDeleting(false)
dispatch(
pushNotification({
type: AppNotificationType.Error,
Expand All @@ -41,11 +47,14 @@ export function DeleteUnitagModal({

const onDelete = async (): Promise<void> => {
try {
setIsDeleting(true)
const { data: deleteResponse } = await deleteUnitag({
username: unitag,
account,
signerManager,
})
setIsDeleting(false)

if (!deleteResponse?.success) {
handleDeleteError()
return
Expand Down Expand Up @@ -92,8 +101,19 @@ export function DeleteUnitagModal({
)}
</Text>
<Flex centered row gap="$spacing12" pt="$spacing24">
<Button fill testID={ElementName.Remove} theme="detrimental" onPress={onDelete}>
{t('Delete')}
<Button
fill
disabled={isDeleting}
testID={ElementName.Remove}
theme="detrimental"
onPress={onDelete}>
{isDeleting ? (
<Flex height={fonts.buttonLabel1.lineHeight}>
<ActivityIndicator color={colors.sporeWhite.val} />
</Flex>
) : (
t('Delete')
)}
</Button>
</Flex>
</Flex>
Expand Down
69 changes: 40 additions & 29 deletions apps/mobile/src/features/fiatOnRamp/aggregatorHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import {
useAppFiatCurrencyInfo,
useFiatCurrencyInfo,
} from 'wallet/src/features/fiatCurrency/hooks'
import { useFiatOnRampAggregatorCryptoQuoteQuery } from 'wallet/src/features/fiatOnRamp/api'
import {
useFiatOnRampAggregatorCryptoQuoteQuery,
useFiatOnRampAggregatorSupportedFiatCurrenciesQuery,
} from 'wallet/src/features/fiatOnRamp/api'
import { FORQuote } from 'wallet/src/features/fiatOnRamp/types'
import {
isFiatOnRampApiError,
Expand All @@ -21,10 +24,7 @@ import {
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']

export function useMeldFiatCurrencySupportInfo(): {
export function useMeldFiatCurrencySupportInfo(countryCode: string): {
appFiatCurrencySupportedInMeld: boolean
meldSupportedFiatCurrency: FiatCurrencyInfo
} {
Expand All @@ -33,12 +33,22 @@ export function useMeldFiatCurrencySupportInfo(): {
const fallbackCurrencyInfo = useFiatCurrencyInfo(FiatCurrency.UnitedStatesDollar)
const appFiatCurrencyCode = appFiatCurrencyInfo.code.toLowerCase()

const appFiatCurrencySupported = MELD_FIAT_CURRENCY_CODES.includes(appFiatCurrencyCode)
const currency = appFiatCurrencySupported ? appFiatCurrencyInfo : fallbackCurrencyInfo
const { data: supportedFiatCurrencies } = useFiatOnRampAggregatorSupportedFiatCurrenciesQuery({
countryCode,
})

const appFiatCurrencySupported =
!supportedFiatCurrencies ||
supportedFiatCurrencies.fiatCurrencies.some(
(currency): boolean => appFiatCurrencyCode === currency.fiatCurrencyCode.toLowerCase()
)
const meldSupportedFiatCurrency = appFiatCurrencySupported
? appFiatCurrencyInfo
: fallbackCurrencyInfo

return {
appFiatCurrencySupportedInMeld: appFiatCurrencySupported,
meldSupportedFiatCurrency: currency,
meldSupportedFiatCurrency,
}
}

Expand Down Expand Up @@ -105,30 +115,31 @@ export function useParseFiatOnRampError(
const { formatNumberOrString } = useLocalizationContext()

let errorText, errorColor: ColorTokens | undefined

if (!isFiatOnRampApiError(error)) {
if (!error) {
return { errorText, errorColor }
}

if (isInvalidRequestAmountTooLow(error)) {
const formattedAmount = formatNumberOrString({
value: error.data.context.minimumAllowed,
type: NumberType.FiatStandard,
currencyCode,
})
errorText = t('Minimum {{amount}}', { amount: formattedAmount })
errorColor = '$statusCritical'
} else if (isInvalidRequestAmountTooHigh(error)) {
const formattedAmount = formatNumberOrString({
value: error.data.context.maximumAllowed,
type: NumberType.FiatStandard,
currencyCode,
})
errorText = t('Maximum {{amount}}', { amount: formattedAmount })
errorColor = '$statusCritical'
} else {
errorText = t('Something went wrong.')
errorColor = '$DEP_accentWarning'
errorText = t('Something went wrong.')
errorColor = '$DEP_accentWarning'

if (isFiatOnRampApiError(error)) {
if (isInvalidRequestAmountTooLow(error)) {
const formattedAmount = formatNumberOrString({
value: error.data.context.minimumAllowed,
type: NumberType.FiatStandard,
currencyCode,
})
errorText = t('Minimum {{amount}}', { amount: formattedAmount })
errorColor = '$statusCritical'
} else if (isInvalidRequestAmountTooHigh(error)) {
const formattedAmount = formatNumberOrString({
value: error.data.context.maximumAllowed,
type: NumberType.FiatStandard,
currencyCode,
})
errorText = t('Maximum {{amount}}', { amount: formattedAmount })
errorColor = '$statusCritical'
}
}

return { errorText, errorColor }
Expand Down
Loading

0 comments on commit 06e937d

Please sign in to comment.