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 Jun 5, 2024
1 parent 8985195 commit 687ae57
Show file tree
Hide file tree
Showing 285 changed files with 6,704 additions and 5,957 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @uniswap/web-admins
50 changes: 45 additions & 5 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
Excited to share some new updates! Here’s what’s new:

Expanded support for NFTs — In addition to mainnet Ethereum, you are now able to see NFTs across all other networks that we currently support, including: Polygon, Arbitrum, Optimism, Base, BSC, and Blast.

Improved Unicons — We gave your wallet’s unique Unicon a makeover. Check out the rest of your accounts to see your upgraded icons.
IPFS hash of the deployment:
- CIDv0: `QmQgjnjsbdgihYv6dHDgLpnXBkTwSwi3bthr3YLBgry9We`
- CIDv1: `bafybeibc3s5567p7ggbzhvrxuqztosya2qdsixkjlre5onkgbmkiipjba4`

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

You can also access the Uniswap Interface from an IPFS gateway.
**BEWARE**: The Uniswap interface uses [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to remember your settings, such as which tokens you have imported.
**You should always use an IPFS gateway that enforces origin separation**, or our hosted deployment of the latest release at [app.uniswap.org](https://app.uniswap.org).
Your Uniswap settings are never remembered across different URLs.

IPFS gateways:
- https://bafybeibc3s5567p7ggbzhvrxuqztosya2qdsixkjlre5onkgbmkiipjba4.ipfs.dweb.link/
- https://bafybeibc3s5567p7ggbzhvrxuqztosya2qdsixkjlre5onkgbmkiipjba4.ipfs.cf-ipfs.com/
- [ipfs://QmQgjnjsbdgihYv6dHDgLpnXBkTwSwi3bthr3YLBgry9We/](ipfs://QmQgjnjsbdgihYv6dHDgLpnXBkTwSwi3bthr3YLBgry9We/)

## 5.31.0 (2024-06-05)


### Features

* **web:** add utm tags to copyLink buttons (#8556) 7a70df6
* **web:** Only show identicon in send speedbump if ENS or Unitag (#8475) 5fea09e
* **web:** use max-image-preview for nft SEO (#8557) caf4d41


### Bug Fixes

* **web:** Correctly route back to previous page on AddLiq page (#8523) 21a8143
* **web:** don't disable swap settings for unconnected chains [staging] (#8653) b9731e2
* **web:** fix broken translations (#8581) 5a86cb6
* **web:** fix translations not loading (#8503) 12acb23
* **web:** improve connection loading/error state (#8533) 9371fb3
* **web:** properly filter buy/sell txs on TDP (#8511) 28ac0ef
* **web:** round Send input if greatern than max decimals allowed (#8525) f56c514
* **web:** update USDC address on Celo Alfajores testnet (#8484) d265731
* **web:** update useOnClickOutside to handle tooltips [staging] (#8705) 1a4610f
* **web:** use prev sitemaps for sitemap generation.. (#8524) b72a23f


### Continuous Integration

* **web:** update sitemaps ff410fb


2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mobile/1.28.2
web/5.31.0
1 change: 1 addition & 0 deletions apps/mobile/.depcheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ignores: [
"@amplitude/analytics-react-native",
"@react-native-masked-view/masked-view",
"@react-native-firebase/app-check",
"@shopify/react-native-skia",
"react-native-image-colors",
"react-native-restart",
# Dependencies that depcheck thinks are missing but are actually present or never used
Expand Down
18 changes: 3 additions & 15 deletions apps/mobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ And select the version that pops up.
Taken from [RN instructions](https://reactnative.dev/docs/environment-setup?guide=native&platform=android)

```
brew tap homebrew/cask-versions
brew install --cask zulu17
brew install --cask zulu@17
# Get path to where cask was installed to double-click installer
brew info --cask zulu17
brew info --cask zulu@17
```

Add the following to your .rc file
Expand Down Expand Up @@ -176,18 +175,7 @@ These are some tools you might want to familiarize yourself with to understand t

## Migrations

We use `redux-persist` to persist Redux state between user sessions. When the Redux state schema is altered, a migration may be needed to transfer the existing persisted state to the new Redux schema. Failing to define a migration results in the app defaulting to the persisted schema, which will very likely cause `undefined` errors because the code has references to Redux state properties that were dropped in favor the persisted schema.

### When to define a migration

Anytime a required property is added or any property is renamed or deleted to/from Redux state. Migrations are not necessary when optional properties are added to an existing slice. Make sure to always add new required properties to the `schema.ts` file as well.

### How to migrate

1. Increment the `version` of `persistConfig` defined within `store.ts`
2. Create a migration function within `migrations.ts`. The migration key should be the same as the `version` defined in the previous step
3. Write a test for your migration within `migrations.test.ts`
4. Create a new schema within `schema.ts` and ensure it is being exported by the `getSchema` function at the bottom of the file
We use `redux-persist` to persist the Redux state between user sessions. Most of this state is shared between the mobile app and the extension. Please review the [Wallet Migrations README](../../packages/wallet/src/state//README.md) for details on how to write migrations when you add or remove anything from the Redux state structure.

## Troubleshooting

Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ android {
}
beta {
applicationIdSuffix ".beta"
versionName "1.28.2"
versionName "1.28"
dimension "variant"
}
prod {
dimension "variant"
versionName "1.28.2"
versionName "1.28"
}
}

Expand Down
7 changes: 0 additions & 7 deletions apps/mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,6 @@ PODS:
- BoringSSL-GRPC/Interface (0.0.24)
- DoubleConversion (1.1.6)
- EthersRS (0.0.5)
- EXAV (13.10.5):
- ExpoModulesCore
- ReactCommon/turbomodule/core
- EXBarCodeScanner (12.9.3):
- EXImageLoader
- ExpoModulesCore
Expand Down Expand Up @@ -2042,7 +2039,6 @@ DEPENDENCIES:
- boost (from `../../../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- "EthersRS (from `../../../node_modules/@uniswap/ethers-rs-mobile`)"
- EXAV (from `../../../node_modules/expo-av/ios`)
- EXBarCodeScanner (from `../../../node_modules/expo-barcode-scanner/ios`)
- EXFont (from `../../../node_modules/expo-font/ios`)
- EXImageLoader (from `../../../node_modules/expo-image-loader/ios`)
Expand Down Expand Up @@ -2196,8 +2192,6 @@ EXTERNAL SOURCES:
:podspec: "../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EthersRS:
:path: "../../../node_modules/@uniswap/ethers-rs-mobile"
EXAV:
:path: "../../../node_modules/expo-av/ios"
EXBarCodeScanner:
:path: "../../../node_modules/expo-barcode-scanner/ios"
EXFont:
Expand Down Expand Up @@ -2408,7 +2402,6 @@ SPEC CHECKSUMS:
BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
EthersRS: 56b70e73d22d4e894b7e762eef1129159bcd3135
EXAV: 07e50f934907fa8274dd06fbcd20ee4b9478c619
EXBarCodeScanner: d59fd943cebee3f913ebf4ffde0d05d344da8b78
EXFont: f20669cb266ef48b004f1eb1f2b20db96cd1df9f
EXImageLoader: 55080616b2fe9da19ef8c7f706afd9814e279b6b
Expand Down
16 changes: 8 additions & 8 deletions apps/mobile/ios/Uniswap.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2536,7 +2536,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.28.2;
MARKETING_VERSION = 1.28;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.widgets;
Expand Down Expand Up @@ -2628,7 +2628,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.28.2;
MARKETING_VERSION = 1.28;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.beta.widgets;
Expand Down Expand Up @@ -2713,7 +2713,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.28.2;
MARKETING_VERSION = 1.28;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.WidgetIntentExtension;
Expand Down Expand Up @@ -2799,7 +2799,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.28.2;
MARKETING_VERSION = 1.28;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.beta.WidgetIntentExtension;
Expand Down Expand Up @@ -2873,7 +2873,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.28.2;
MARKETING_VERSION = 1.28;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -3103,7 +3103,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.28.2;
MARKETING_VERSION = 1.28;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.OneSignalNotificationServiceExtension;
Expand Down Expand Up @@ -3207,7 +3207,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.28.2;
MARKETING_VERSION = 1.28;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -3278,7 +3278,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.28.2;
MARKETING_VERSION = 1.28;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.uniswap.mobile.beta.OneSignalNotificationServiceExtension;
Expand Down
11 changes: 0 additions & 11 deletions apps/mobile/jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ import { localizeMock as mockRNLocalize } from 'react-native-localize/mock'
import { AppearanceSettingType } from 'wallet/src/features/appearance/slice'
import { mockLocalizationContext } from 'wallet/src/test/mocks/utils'

// avoids polluting console in test runs, while keeping important log levels
global.console = {
...console,
// uncomment to ignore a specific log level
log: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
// warn: jest.fn(),
// error: jest.fn(),
}

// Mock Sentry crash reporting
jest.mock('@sentry/react-native', () => ({
init: () => jest.fn(),
Expand Down
1 change: 0 additions & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"dayjs": "1.11.7",
"ethers": "5.7.2",
"expo": "50.0.15",
"expo-av": "13.10.5",
"expo-barcode-scanner": "12.9.3",
"expo-blur": "12.9.2",
"expo-camera": "14.1.2",
Expand Down
8 changes: 4 additions & 4 deletions apps/mobile/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import { selectFavoriteTokens } from 'wallet/src/features/favorites/selectors'
import { useAppFiatCurrencyInfo } from 'wallet/src/features/fiatCurrency/hooks'
import { LocalizationContextProvider } from 'wallet/src/features/language/LocalizationContext'
import { useCurrentLanguageInfo } from 'wallet/src/features/language/hooks'
import { updateLanguage } from 'wallet/src/features/language/slice'
import { syncAppWithDeviceLanguage } from 'wallet/src/features/language/slice'
import { clearNotificationQueue } from 'wallet/src/features/notifications/slice'
import { TransactionHistoryUpdater } from 'wallet/src/features/transactions/TransactionHistoryUpdater'
import { Account } from 'wallet/src/features/wallet/accounts/types'
Expand Down Expand Up @@ -255,11 +255,11 @@ function AppInner(): JSX.Element {
useEffect(() => {
if (allowAnalytics) {
appsFlyer.startSdk()
logger.info('AppsFlyer', 'status', 'started')
logger.debug('AppsFlyer', 'status', 'started')
} else {
appsFlyer.stop(!allowAnalytics, (res: unknown) => {
if (typeof res === 'string' && res === 'Success') {
logger.info('AppsFlyer', 'status', 'stopped')
logger.debug('AppsFlyer', 'status', 'stopped')
} else {
logger.warn(
'AppsFlyer',
Expand All @@ -273,7 +273,7 @@ function AppInner(): JSX.Element {

useEffect(() => {
dispatch(clearNotificationQueue()) // clear all in-app toasts on app start
dispatch(updateLanguage(null))
dispatch(syncAppWithDeviceLanguage())
}, [dispatch])

useEffect(() => {
Expand Down
25 changes: 5 additions & 20 deletions apps/mobile/src/app/migrations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import {
} from 'wallet/src/features/wallet/accounts/types'
import { initialWalletState, SwapProtectionSetting } from 'wallet/src/features/wallet/slice'
import { createMigrate } from 'wallet/src/state/createMigrate'
import { getAllKeysOfNestedObject } from 'wallet/src/state/testUtils'
import {
fiatPurchaseTransactionInfo,
signerMnemonicAccount,
Expand All @@ -124,26 +125,6 @@ const fiatOnRampTxDetailsFailed = transactionDetails({
}),
})

// helps with object assignment
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const getAllKeysOfNestedObject = (obj: any, prefix = ''): string[] => {
const keys = Object.keys(obj)
if (!keys.length && prefix !== '') {
return [prefix.slice(0, -1)]
}
return keys.reduce<string[]>((res, el) => {
if (Array.isArray(obj[el])) {
return [...res]
}

if (typeof obj[el] === 'object' && obj[el] !== null) {
return [...res, ...getAllKeysOfNestedObject(obj[el], prefix + el + '.')]
}

return [...res, prefix + el]
}, [])
}

describe('Redux state migrations', () => {
it('is able to perform all migrations starting from the initial schema', async () => {
const initialSchemaStub = {
Expand Down Expand Up @@ -204,6 +185,10 @@ describe('Redux state migrations', () => {
},
}

if (!migratedSchema) {
throw new Error('Migrated schema is undefined')
}

const migratedSchemaKeys = new Set(getAllKeysOfNestedObject(migratedSchema))
const latestSchemaKeys = new Set(getAllKeysOfNestedObject(getSchema()))
const initialStateKeys = new Set(getAllKeysOfNestedObject(initialState))
Expand Down
10 changes: 4 additions & 6 deletions apps/mobile/src/app/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from 'wallet/src/features/transactions/types'
import { Account, AccountType } from 'wallet/src/features/wallet/accounts/types'
import { SwapProtectionSetting } from 'wallet/src/features/wallet/slice'
import { removeWalletIsUnlockedState } from 'wallet/src/state/sharedMigrations'

export const OLD_DEMO_ACCOUNT_ADDRESS = '0xdd0E380579dF30E38524F9477808d9eE37E2dEa6'

Expand Down Expand Up @@ -876,10 +877,7 @@ export const migrations = {
return newState
},

63: function removeWalletIsUnlockedState(state: any) {
const newState = { ...state }
delete newState.wallet.isUnlocked

return newState
},
63: removeWalletIsUnlockedState,
}

export const MOBILE_STATE_VERSION = 63
2 changes: 1 addition & 1 deletion apps/mobile/src/app/modals/AccountSwitcherModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ElementName, MobileEventName, ModalName } from 'uniswap/src/features/te
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { ImportType, OnboardingEntryPoint } from 'uniswap/src/types/onboarding'
import { MobileScreens, OnboardingScreens } from 'uniswap/src/types/screens/mobile'
import { isAndroid } from 'uniswap/src/utils/platform'
import { isAndroid } from 'utilities/src/platform'
import { AddressDisplay } from 'wallet/src/components/accounts/AddressDisplay'
import { ActionSheetModal, MenuItemProp } from 'wallet/src/components/modals/ActionSheetModal'
import { BottomSheetModal } from 'wallet/src/components/modals/BottomSheetModal'
Expand Down
14 changes: 11 additions & 3 deletions apps/mobile/src/app/modals/AppModals.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useCallback } from 'react'
import { AccountSwitcherModal } from 'src/app/modals/AccountSwitcherModal'
import { ExperimentsModal } from 'src/app/modals/ExperimentsModal'
import { ExploreModal } from 'src/app/modals/ExploreModal'
Expand All @@ -15,14 +15,22 @@ import { LockScreenModal } from 'src/features/authentication/LockScreenModal'
import { ExchangeTransferModal } from 'src/features/fiatOnRamp/ExchangeTransferModal'
import { FiatOnRampAggregatorModal } from 'src/features/fiatOnRamp/FiatOnRampAggregatorModal'
import { FiatOnRampModal } from 'src/features/fiatOnRamp/FiatOnRampModal'
import { closeModal } from 'src/features/modals/modalSlice'
import { ExtensionWaitlistModal } from 'src/features/scantastic/ExtensionWaitlistModal'
import { ScantasticModal } from 'src/features/scantastic/ScantasticModal'
import { ReceiveCryptoModal } from 'src/screens/ReceiveCryptoModal'
import { SettingsFiatCurrencyModal } from 'src/screens/SettingsFiatCurrencyModal'
import { SettingsLanguageModal } from 'src/screens/SettingsLanguageModal'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { SettingsLanguageModal } from 'wallet/src/components/settings/language/SettingsLanguageModal'
import { useAppDispatch } from 'wallet/src/state'

export function AppModals(): JSX.Element {
const dispatch = useAppDispatch()

const onCloseLanguageModal = useCallback(() => {
dispatch(closeModal({ name: ModalName.LanguageSelector }))
}, [dispatch])

return (
<>
<LazyModalRenderer name={ModalName.ExchangeTransferModal}>
Expand Down Expand Up @@ -84,7 +92,7 @@ export function AppModals(): JSX.Element {
</LazyModalRenderer>

<LazyModalRenderer name={ModalName.LanguageSelector}>
<SettingsLanguageModal />
<SettingsLanguageModal onClose={onCloseLanguageModal} />
</LazyModalRenderer>

<LazyModalRenderer name={ModalName.FiatCurrencySelector}>
Expand Down
Loading

0 comments on commit 687ae57

Please sign in to comment.