Skip to content

Commit 06e937d

Browse files
ci(release): publish latest release
1 parent c1daf02 commit 06e937d

File tree

59 files changed

+1950
-1091
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1950
-1091
lines changed

RELEASE

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IPFS hash of the deployment:
2-
- CIDv0: `QmYsHGBHp98EzfBdS8e3inLYfg78s7iWwjJ6gcQwAC9pxH`
3-
- CIDv1: `bafybeie4nwp4jxdsqscdvwbjj43pgjz5eta3keqy3wftdszlmacbbourwi`
2+
- CIDv0: `QmPejsjfiS8N5GaQYKoMirK9GXMJCEhyTbCEsU6mpzooNJ`
3+
- CIDv1: `bafybeiatpx5zjwrh3bsmjdrt77hlkjuztsnqm63dfzr4mf2nbbit6hwx5m`
44

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

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

1212
IPFS gateways:
13-
- https://bafybeie4nwp4jxdsqscdvwbjj43pgjz5eta3keqy3wftdszlmacbbourwi.ipfs.dweb.link/
14-
- https://bafybeie4nwp4jxdsqscdvwbjj43pgjz5eta3keqy3wftdszlmacbbourwi.ipfs.cf-ipfs.com/
15-
- [ipfs://QmYsHGBHp98EzfBdS8e3inLYfg78s7iWwjJ6gcQwAC9pxH/](ipfs://QmYsHGBHp98EzfBdS8e3inLYfg78s7iWwjJ6gcQwAC9pxH/)
13+
- https://bafybeiatpx5zjwrh3bsmjdrt77hlkjuztsnqm63dfzr4mf2nbbit6hwx5m.ipfs.dweb.link/
14+
- https://bafybeiatpx5zjwrh3bsmjdrt77hlkjuztsnqm63dfzr4mf2nbbit6hwx5m.ipfs.cf-ipfs.com/
15+
- [ipfs://QmPejsjfiS8N5GaQYKoMirK9GXMJCEhyTbCEsU6mpzooNJ/](ipfs://QmPejsjfiS8N5GaQYKoMirK9GXMJCEhyTbCEsU6mpzooNJ/)
1616

17-
## 5.15.0 (2024-02-27)
17+
## 5.16.0 (2024-02-28)
1818

1919

2020
### Features
2121

22-
* **web:** [info] enable by default (#6623) (#6624) 7442c9e
22+
* **web:** [info] enable by default (#6623) 0573173
23+
* **web:** swap smarter banner (#6579) c715d1f
24+
25+
26+
### Bug Fixes
27+
28+
* **web:** [info] remove markets from pool token (#6613) 4fdad80
29+
* **web:** fix analytics for swap tab clicked and page name (#6600) f018e73
30+
* **web:** fix math for calculating prices for small decimals (#6612) 59900ff
31+
* **web:** Landing page style fixes at small heights (#6603) 0975cfa
2332

2433

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web/5.15.0
1+
web/5.16.0

apps/mobile/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@
8080
"@uniswap/ethers-rs-mobile": "0.0.5",
8181
"@uniswap/sdk-core": "4.1.2",
8282
"@uniswap/v3-sdk": "3.10.2",
83-
"@walletconnect/core": "2.10.1",
84-
"@walletconnect/react-native-compat": "2.10.1",
85-
"@walletconnect/utils": "2.10.1",
86-
"@walletconnect/web3wallet": "1.9.1",
83+
"@walletconnect/core": "2.11.2",
84+
"@walletconnect/react-native-compat": "2.11.2",
85+
"@walletconnect/utils": "2.11.2",
86+
"@walletconnect/web3wallet": "1.10.2",
8787
"apollo3-cache-persist": "0.14.1",
8888
"babel-plugin-transform-inline-environment-variables": "0.4.4",
8989
"babel-plugin-transform-remove-console": "6.9.4",
@@ -162,7 +162,7 @@
162162
"@types/react-native": "0.71.3",
163163
"@types/redux-mock-store": "1.0.6",
164164
"@uniswap/eslint-config": "workspace:^",
165-
"@walletconnect/types": "2.8.6",
165+
"@walletconnect/types": "2.11.2",
166166
"@welldone-software/why-did-you-render": "7.0.1",
167167
"babel-jest": "29.6.1",
168168
"babel-loader": "8.2.3",

apps/mobile/src/app/modals/AccountSwitcherModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ export function AccountSwitcher({ onClose }: { onClose: () => void }): JSX.Eleme
127127
})
128128

129129
const addWalletOptions = useMemo<MenuItemProp[]>(() => {
130-
const onPressCreateNewWallet = async (): Promise<void> => {
130+
const onPressCreateNewWallet = (): void => {
131131
// Ensure no pending accounts
132-
await dispatch(pendingAccountActions.trigger(PendingAccountActions.Delete))
133-
await dispatch(createAccountActions.trigger())
132+
dispatch(pendingAccountActions.trigger(PendingAccountActions.ActivateOneAndDelete))
133+
dispatch(createAccountActions.trigger())
134134

135135
if (unitagsFeatureFlagEnabled) {
136136
if (hasImportedSeedPhrase) {

apps/mobile/src/components/RemoveWallet/useModalContent.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,15 @@ export const useModalContent = ({
134134
</Trans>
135135
),
136136
description: (
137-
<Trans t={t}>
138-
It shares the same recovery phrase as{' '}
139-
<Text color="$neutral1">{{ wallets: associatedAccountNames }}</Text>. Your recovery
140-
phrase will remain stored until you delete all remaining wallets.
141-
</Trans>
137+
<Text color="$neutral2" variant="body3">
138+
<Trans t={t}>
139+
It shares the same recovery phrase as{' '}
140+
<Text color="$neutral1" variant="body3">
141+
{{ wallets: associatedAccountNames }}
142+
</Text>
143+
. Your recovery phrase will remain stored until you delete all remaining wallets.
144+
</Trans>
145+
</Text>
142146
),
143147
Icon: TrashIcon,
144148
iconColorLabel: 'statusCritical',

apps/mobile/src/components/WalletConnect/ConnectedDapps/DappConnectedNetworksModal.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,15 @@ export function DappConnectedNetworkModal({
3535
const onDisconnect = async (): Promise<void> => {
3636
try {
3737
dispatch(removeSession({ account: address, sessionId: id }))
38-
await wcWeb3Wallet.disconnectSession({
39-
topic: id,
40-
reason: getSdkError('USER_DISCONNECTED'),
41-
})
38+
// Explicitly verify that WalletConnect has this session id as an active session
39+
// It's possible that the session was already disconnected on WC but wasn't updated locally in redux
40+
const sessions = wcWeb3Wallet.getActiveSessions()
41+
if (sessions[session.id]) {
42+
await wcWeb3Wallet.disconnectSession({
43+
topic: session.id,
44+
reason: getSdkError('USER_DISCONNECTED'),
45+
})
46+
}
4247
dispatch(
4348
pushNotification({
4449
type: AppNotificationType.WalletConnect,

apps/mobile/src/components/WalletConnect/ConnectedDapps/DappConnectionItem.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@ export function DappConnectionItem({
3939
const onDisconnect = async (): Promise<void> => {
4040
try {
4141
dispatch(removeSession({ account: address, sessionId: session.id }))
42-
await wcWeb3Wallet.disconnectSession({
43-
topic: session.id,
44-
reason: getSdkError('USER_DISCONNECTED'),
45-
})
42+
// Explicitly verify that WalletConnect has this session id as an active session
43+
// It's possible that the session was already disconnected on WC but wasn't updated locally in redux
44+
const sessions = wcWeb3Wallet.getActiveSessions()
45+
if (sessions[session.id]) {
46+
await wcWeb3Wallet.disconnectSession({
47+
topic: session.id,
48+
reason: getSdkError('USER_DISCONNECTED'),
49+
})
50+
}
4651
dispatch(
4752
pushNotification({
4853
type: AppNotificationType.WalletConnect,

apps/mobile/src/components/fiatOnRamp/QuoteItem.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Loader } from 'src/components/loading'
66
import { useFormatExactCurrencyAmount } from 'src/features/fiatOnRamp/hooks'
77
import { Flex, Icons, Text, TouchableArea, useIsDarkMode } from 'ui/src'
88
import { fonts, iconSizes } from 'ui/src/theme'
9+
import { NumberType } from 'utilities/src/format/types'
910
import { FiatCurrencyInfo } from 'wallet/src/features/fiatCurrency/hooks'
1011
import { FORQuote, FORServiceProvider } from 'wallet/src/features/fiatOnRamp/types'
1112
import { getServiceProviderLogo } from 'wallet/src/features/fiatOnRamp/utils'
@@ -29,7 +30,7 @@ export function FORQuoteItem({
2930
showCarret,
3031
active,
3132
}: {
32-
quote: FORQuote | undefined
33+
quote: FORQuote
3334
serviceProvider: FORServiceProvider | undefined
3435
currency: Maybe<Currency>
3536
loading: boolean
@@ -39,17 +40,17 @@ export function FORQuoteItem({
3940
active?: boolean
4041
}): JSX.Element {
4142
const { t } = useTranslation()
42-
const { addFiatSymbolToNumber } = useLocalizationContext()
43+
const { formatNumberOrString } = useLocalizationContext()
4344

4445
const quoteAmount = useFormatExactCurrencyAmount(
4546
(quote?.destinationAmount || 0).toString(),
4647
currency
4748
)
4849

49-
const quoteEquivalentInSourceCurrencyAmount = addFiatSymbolToNumber({
50-
value: quote?.sourceAmount || 0,
51-
currencyCode: baseCurrency.code,
52-
currencySymbol: baseCurrency.symbol,
50+
const quoteEquivalentInSourceCurrencyAmount = formatNumberOrString({
51+
value: quote.sourceAmount - quote.totalFee,
52+
type: NumberType.FiatStandard,
53+
currencyCode: baseCurrency.code.toLowerCase(),
5354
})
5455

5556
const isDarkMode = useIsDarkMode()

apps/mobile/src/components/unitags/DeleteUnitagModal.tsx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { useNavigation } from '@react-navigation/native'
2+
import { useState } from 'react'
23
import { useTranslation } from 'react-i18next'
3-
import { Button, Flex, Icons, Text } from 'ui/src'
4+
import { ActivityIndicator } from 'react-native'
5+
import { Button, Flex, Icons, Text, useSporeColors } from 'ui/src'
6+
import { fonts } from 'ui/src/theme'
47
import { logger } from 'utilities/src/logger/logger'
58
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
69
import { pushNotification } from 'wallet/src/features/notifications/slice'
@@ -23,13 +26,16 @@ export function DeleteUnitagModal({
2326
onClose: () => void
2427
}): JSX.Element {
2528
const { t } = useTranslation()
29+
const colors = useSporeColors()
2630
const navigation = useNavigation()
2731
const dispatch = useAppDispatch()
2832
const { triggerRefetchUnitags } = useUnitagUpdater()
2933
const account = useAccount(address)
3034
const signerManager = useWalletSigners()
35+
const [isDeleting, setIsDeleting] = useState(false)
3136

3237
const handleDeleteError = (): void => {
38+
setIsDeleting(false)
3339
dispatch(
3440
pushNotification({
3541
type: AppNotificationType.Error,
@@ -41,11 +47,14 @@ export function DeleteUnitagModal({
4147

4248
const onDelete = async (): Promise<void> => {
4349
try {
50+
setIsDeleting(true)
4451
const { data: deleteResponse } = await deleteUnitag({
4552
username: unitag,
4653
account,
4754
signerManager,
4855
})
56+
setIsDeleting(false)
57+
4958
if (!deleteResponse?.success) {
5059
handleDeleteError()
5160
return
@@ -92,8 +101,19 @@ export function DeleteUnitagModal({
92101
)}
93102
</Text>
94103
<Flex centered row gap="$spacing12" pt="$spacing24">
95-
<Button fill testID={ElementName.Remove} theme="detrimental" onPress={onDelete}>
96-
{t('Delete')}
104+
<Button
105+
fill
106+
disabled={isDeleting}
107+
testID={ElementName.Remove}
108+
theme="detrimental"
109+
onPress={onDelete}>
110+
{isDeleting ? (
111+
<Flex height={fonts.buttonLabel1.lineHeight}>
112+
<ActivityIndicator color={colors.sporeWhite.val} />
113+
</Flex>
114+
) : (
115+
t('Delete')
116+
)}
97117
</Button>
98118
</Flex>
99119
</Flex>

apps/mobile/src/features/fiatOnRamp/aggregatorHooks.ts

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import {
1111
useAppFiatCurrencyInfo,
1212
useFiatCurrencyInfo,
1313
} from 'wallet/src/features/fiatCurrency/hooks'
14-
import { useFiatOnRampAggregatorCryptoQuoteQuery } from 'wallet/src/features/fiatOnRamp/api'
14+
import {
15+
useFiatOnRampAggregatorCryptoQuoteQuery,
16+
useFiatOnRampAggregatorSupportedFiatCurrenciesQuery,
17+
} from 'wallet/src/features/fiatOnRamp/api'
1518
import { FORQuote } from 'wallet/src/features/fiatOnRamp/types'
1619
import {
1720
isFiatOnRampApiError,
@@ -21,10 +24,7 @@ import {
2124
import { useLocalizationContext } from 'wallet/src/features/language/LocalizationContext'
2225
import { useActiveAccountAddress } from 'wallet/src/features/wallet/hooks'
2326

24-
// TODO: https://linear.app/uniswap/issue/MOB-2532/implement-fetching-of-available-fiat-currencies-from-meld
25-
const MELD_FIAT_CURRENCY_CODES = ['usd', 'eur']
26-
27-
export function useMeldFiatCurrencySupportInfo(): {
27+
export function useMeldFiatCurrencySupportInfo(countryCode: string): {
2828
appFiatCurrencySupportedInMeld: boolean
2929
meldSupportedFiatCurrency: FiatCurrencyInfo
3030
} {
@@ -33,12 +33,22 @@ export function useMeldFiatCurrencySupportInfo(): {
3333
const fallbackCurrencyInfo = useFiatCurrencyInfo(FiatCurrency.UnitedStatesDollar)
3434
const appFiatCurrencyCode = appFiatCurrencyInfo.code.toLowerCase()
3535

36-
const appFiatCurrencySupported = MELD_FIAT_CURRENCY_CODES.includes(appFiatCurrencyCode)
37-
const currency = appFiatCurrencySupported ? appFiatCurrencyInfo : fallbackCurrencyInfo
36+
const { data: supportedFiatCurrencies } = useFiatOnRampAggregatorSupportedFiatCurrenciesQuery({
37+
countryCode,
38+
})
39+
40+
const appFiatCurrencySupported =
41+
!supportedFiatCurrencies ||
42+
supportedFiatCurrencies.fiatCurrencies.some(
43+
(currency): boolean => appFiatCurrencyCode === currency.fiatCurrencyCode.toLowerCase()
44+
)
45+
const meldSupportedFiatCurrency = appFiatCurrencySupported
46+
? appFiatCurrencyInfo
47+
: fallbackCurrencyInfo
3848

3949
return {
4050
appFiatCurrencySupportedInMeld: appFiatCurrencySupported,
41-
meldSupportedFiatCurrency: currency,
51+
meldSupportedFiatCurrency,
4252
}
4353
}
4454

@@ -105,30 +115,31 @@ export function useParseFiatOnRampError(
105115
const { formatNumberOrString } = useLocalizationContext()
106116

107117
let errorText, errorColor: ColorTokens | undefined
108-
109-
if (!isFiatOnRampApiError(error)) {
118+
if (!error) {
110119
return { errorText, errorColor }
111120
}
112121

113-
if (isInvalidRequestAmountTooLow(error)) {
114-
const formattedAmount = formatNumberOrString({
115-
value: error.data.context.minimumAllowed,
116-
type: NumberType.FiatStandard,
117-
currencyCode,
118-
})
119-
errorText = t('Minimum {{amount}}', { amount: formattedAmount })
120-
errorColor = '$statusCritical'
121-
} else if (isInvalidRequestAmountTooHigh(error)) {
122-
const formattedAmount = formatNumberOrString({
123-
value: error.data.context.maximumAllowed,
124-
type: NumberType.FiatStandard,
125-
currencyCode,
126-
})
127-
errorText = t('Maximum {{amount}}', { amount: formattedAmount })
128-
errorColor = '$statusCritical'
129-
} else {
130-
errorText = t('Something went wrong.')
131-
errorColor = '$DEP_accentWarning'
122+
errorText = t('Something went wrong.')
123+
errorColor = '$DEP_accentWarning'
124+
125+
if (isFiatOnRampApiError(error)) {
126+
if (isInvalidRequestAmountTooLow(error)) {
127+
const formattedAmount = formatNumberOrString({
128+
value: error.data.context.minimumAllowed,
129+
type: NumberType.FiatStandard,
130+
currencyCode,
131+
})
132+
errorText = t('Minimum {{amount}}', { amount: formattedAmount })
133+
errorColor = '$statusCritical'
134+
} else if (isInvalidRequestAmountTooHigh(error)) {
135+
const formattedAmount = formatNumberOrString({
136+
value: error.data.context.maximumAllowed,
137+
type: NumberType.FiatStandard,
138+
currencyCode,
139+
})
140+
errorText = t('Maximum {{amount}}', { amount: formattedAmount })
141+
errorColor = '$statusCritical'
142+
}
132143
}
133144

134145
return { errorText, errorColor }

0 commit comments

Comments
 (0)