Skip to content

Commit ac6fb2e

Browse files
ci(release): publish latest release
1 parent 5ab5356 commit ac6fb2e

File tree

1,166 files changed

+20897
-14840
lines changed

Some content is hidden

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

1,166 files changed

+20897
-14840
lines changed

.prettierignore

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ __mocks__
1414
*.inc
1515
*.json
1616
*.md
17-
*.test.ts
1817
*.yml
1918
babel.config.js
2019
build

.yarn/patches/detox-npm-20.18.1-b532b310b4.patch

-14
This file was deleted.
2.15 KB
Binary file not shown.

RELEASE

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
Developed by Uniswap Labs, the Uniswap Extension allows you to access and explore onchain apps while maintaining full control of your crypto assets. The Uniswap Extension is the first wallet extension to live in your browser’s sidebar, persisting no matter where you are on the web. So you can explore crypto without obstructing your window or losing your place.
2-
3-
- Connect to thousands of onchain apps across Ethereum, Base, Arbitrum and many other EVM blockchains
4-
- Explore tokens directly on Uniswap, one of the most trusted DeFi protocols with over $2 trillion in volume
5-
- View all of your crypto assets without switching, across Ethereum and other EVM-compatible blockchains
6-
- Easily create a new wallet or import your existing wallet
7-
- Safely send and receive crypto tokens with other wallets
8-
9-
The Uniswap Extension’s source code is audited by the security firm Trail of Bits as an added measure to ensure that your crypto assets are safe.
1+
- UI fixes across various pages
2+
- UniswapX UI/UX improvements
3+
- Internal code organization improvements

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
extension/1.0.3
1+
extension/1.1.0

apps/extension/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"@svgr/webpack": "8.0.1",
1414
"@tamagui/core": "1.95.1",
1515
"@types/uuid": "9.0.1",
16-
"@uniswap/analytics-events": "2.32.0",
16+
"@uniswap/analytics-events": "2.34.0",
17+
"@uniswap/sdk-core": "5.3.0",
1718
"@uniswap/universal-router-sdk": "2.2.0",
1819
"@uniswap/v3-sdk": "3.13.0",
1920
"dotenv-webpack": "8.0.1",

apps/extension/src/app/SidebarApp.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'src/app/Global.css'
33

44
import { useEffect, useRef, useState } from 'react'
55
import { I18nextProvider } from 'react-i18next'
6+
import { useDispatch } from 'react-redux'
67
import { RouterProvider, ScrollRestoration } from 'react-router-dom'
78
import { PersistGate } from 'redux-persist/integration/react'
89
import { ExtensionStatsigProvider } from 'src/app/StatsigProvider'
@@ -36,7 +37,7 @@ import {
3637
} from 'src/background/messagePassing/messageChannels'
3738
import { BackgroundToSidePanelRequestType } from 'src/background/messagePassing/types/requests'
3839
import { PrimaryAppInstanceDebuggerLazy } from 'src/store/PrimaryAppInstanceDebuggerLazy'
39-
import { getReduxPersistor, getReduxStore, useAppDispatch } from 'src/store/store'
40+
import { getReduxPersistor, getReduxStore } from 'src/store/store'
4041
import Trace from 'uniswap/src/features/telemetry/Trace'
4142
import { ExtensionEventName } from 'uniswap/src/features/telemetry/constants'
4243
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
@@ -134,7 +135,7 @@ const router = sentryCreateHashRouter([
134135

135136
const PORT_PING_INTERVAL = 5 * ONE_SECOND_MS
136137
function useDappRequestPortListener(): void {
137-
const dispatch = useAppDispatch()
138+
const dispatch = useDispatch()
138139
const [currentPortChannel, setCurrentPortChannel] = useState<DappBackgroundPortChannel | undefined>()
139140
const [windowId, setWindowId] = useState<string | undefined>()
140141

@@ -194,7 +195,7 @@ function useDappRequestPortListener(): void {
194195
}
195196

196197
function SidebarWrapper(): JSX.Element {
197-
const dispatch = useAppDispatch()
198+
const dispatch = useDispatch()
198199
useDappRequestPortListener()
199200

200201
useEffect(() => {

apps/extension/src/app/components/modal/FeedbackRequestModal.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import { t } from 'i18next'
2+
import { useDispatch } from 'react-redux'
23
import { Button, Flex, Text, useSporeColors } from 'ui/src'
34
import { MessageStar } from 'ui/src/components/icons'
45
import { BottomSheetModal } from 'uniswap/src/components/modals/BottomSheetModal'
56
import { uniswapUrls } from 'uniswap/src/constants/urls'
67
import { ModalName } from 'uniswap/src/features/telemetry/constants'
78
import { selectExtensionBetaFeedbackState } from 'wallet/src/features/behaviorHistory/selectors'
89
import { ExtensionBetaFeedbackState, setExtensionBetaFeedbackState } from 'wallet/src/features/behaviorHistory/slice'
9-
import { useAppDispatch, useAppSelector } from 'wallet/src/state'
10+
import { useAppSelector } from 'wallet/src/state'
1011

1112
export function FeedbackRequestModal(): JSX.Element {
12-
const dispatch = useAppDispatch()
13+
const dispatch = useDispatch()
1314
const colors = useSporeColors()
1415

1516
const onDismiss = (): void => {

apps/extension/src/app/components/tabs/ActivityTab.tsx

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@ import { ScrollView } from 'ui/src'
33
import { useActivityData } from 'wallet/src/features/activity/useActivityData'
44

55
export const ActivityTab = memo(function _ActivityTab({ address }: { address: Address }): JSX.Element {
6-
const { maybeLoaderComponent, maybeEmptyComponent, renderActivityItem, sectionData } = useActivityData({
6+
const { maybeEmptyComponent, renderActivityItem, sectionData } = useActivityData({
77
owner: address,
88
})
99

10-
if (maybeLoaderComponent) {
11-
return maybeLoaderComponent
12-
}
13-
1410
if (maybeEmptyComponent) {
1511
return maybeEmptyComponent
1612
}
1713

1814
return (
1915
<ScrollView showsVerticalScrollIndicator={false} width="100%">
20-
{(sectionData ?? []).map((item) => renderActivityItem({ item }))}
16+
{/* `sectionData` will be either an array of transactions or an array of loading skeletons */}
17+
{(sectionData ?? []).map((item, index) => renderActivityItem({ item, index }))}
2118
</ScrollView>
2219
)
2320
})

apps/extension/src/app/features/accounts/AccountItem.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { SharedEventName } from '@uniswap/analytics-events'
22
import { BaseSyntheticEvent, useCallback, useMemo, useState } from 'react'
33
import { useTranslation } from 'react-i18next'
4+
import { useDispatch } from 'react-redux'
45
import { EditLabelModal } from 'src/app/features/accounts/EditLabelModal'
56
import { removeAllDappConnectionsForAccount } from 'src/app/features/dapp/actions'
67
import { ContextMenu, Flex, MenuContentItem, Text, TouchableArea } from 'ui/src'
78
import { CopySheets, Edit, TrashFilled, TripleDots } from 'ui/src/components/icons'
89
import { iconSizes } from 'ui/src/theme'
910
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
1011
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
12+
import { setClipboard } from 'uniswap/src/utils/clipboard'
1113
import { NumberType } from 'utilities/src/format/types'
1214
import { AddressDisplay } from 'wallet/src/components/accounts/AddressDisplay'
1315
import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal'
@@ -19,8 +21,6 @@ import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/t
1921
import { EditAccountAction, editAccountActions } from 'wallet/src/features/wallet/accounts/editAccountSaga'
2022
import { useActiveAccountWithThrow, useDisplayName, useSignerAccounts } from 'wallet/src/features/wallet/hooks'
2123
import { DisplayNameType } from 'wallet/src/features/wallet/types'
22-
import { useAppDispatch } from 'wallet/src/state'
23-
import { setClipboard } from 'wallet/src/utils/clipboard'
2424

2525
type AccountItemProps = {
2626
address: Address
@@ -29,7 +29,7 @@ type AccountItemProps = {
2929

3030
export function AccountItem({ address, onAccountSelect }: AccountItemProps): JSX.Element {
3131
const { t } = useTranslation()
32-
const dispatch = useAppDispatch()
32+
const dispatch = useDispatch()
3333
const { data, loading, error } = usePortfolioTotalValue({ address })
3434
const { balanceUSD } = data || {}
3535

apps/extension/src/app/features/accounts/AccountSwitcherScreen.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useCallback, useEffect, useMemo, useState } from 'react'
22
import { useTranslation } from 'react-i18next'
3-
import { useSelector } from 'react-redux'
3+
import { useDispatch, useSelector } from 'react-redux'
44
import { ComingSoon } from 'src/app/components/ComingSoon'
55
import { ScreenHeader } from 'src/app/components/layout/ScreenHeader'
66
import { AccountItem } from 'src/app/features/accounts/AccountItem'
@@ -13,7 +13,6 @@ import { isConnectedAccount } from 'src/app/features/dapp/utils'
1313
import { PopupName, openPopup } from 'src/app/features/popups/slice'
1414
import { AppRoutes, RemoveRecoveryPhraseRoutes, SettingsRoutes } from 'src/app/navigation/constants'
1515
import { navigate } from 'src/app/navigation/state'
16-
import { useAppDispatch } from 'src/store/store'
1716
import { Button, Flex, MenuContent, MenuContentItem, Popover, ScrollView, Text, useSporeColors } from 'ui/src'
1817
import { WalletFilled, X } from 'ui/src/components/icons'
1918
import { spacing } from 'ui/src/theme'
@@ -40,7 +39,7 @@ const MIN_MENU_WIDTH = 200
4039

4140
export function AccountSwitcherScreen(): JSX.Element {
4241
const colors = useSporeColors()
43-
const dispatch = useAppDispatch()
42+
const dispatch = useDispatch()
4443
const { t } = useTranslation()
4544

4645
const activeAccount = useActiveAccountWithThrow()

apps/extension/src/app/features/accounts/EditLabelModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useCallback, useState } from 'react'
22
import { useTranslation } from 'react-i18next'
3+
import { useDispatch } from 'react-redux'
34
import { Button, Flex, Text } from 'ui/src'
45
import { iconSizes } from 'ui/src/theme'
56
import { TextInput } from 'uniswap/src/components/input/TextInput'
@@ -10,7 +11,6 @@ import { AccountIcon } from 'wallet/src/components/accounts/AccountIcon'
1011
import { EditAccountAction, editAccountActions } from 'wallet/src/features/wallet/accounts/editAccountSaga'
1112
import { useDisplayName } from 'wallet/src/features/wallet/hooks'
1213
import { DisplayNameType } from 'wallet/src/features/wallet/types'
13-
import { useAppDispatch } from 'wallet/src/state'
1414

1515
type EditLabelModalProps = {
1616
address: Address
@@ -19,7 +19,7 @@ type EditLabelModalProps = {
1919

2020
export function EditLabelModal({ address, onClose }: EditLabelModalProps): JSX.Element {
2121
const { t } = useTranslation()
22-
const dispatch = useAppDispatch()
22+
const dispatch = useDispatch()
2323

2424
const displayName = useDisplayName(address)
2525
const defaultText = displayName?.type === DisplayNameType.Local ? displayName.name : ''

apps/extension/src/app/features/dapp/DappContext.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { createContext, ReactNode, useContext, useEffect, useState } from 'react'
2+
import { useDispatch } from 'react-redux'
23
import { useDappConnectedAccounts, useDappLastChainId } from 'src/app/features/dapp/hooks'
34
import { isConnectedAccount } from 'src/app/features/dapp/utils'
45
import { extractBaseUrl } from 'src/app/features/dappRequests/utils'
56
import { closePopup, PopupName } from 'src/app/features/popups/slice'
67
import { backgroundToSidePanelMessageChannel } from 'src/background/messagePassing/messageChannels'
78
import { BackgroundToSidePanelRequestType } from 'src/background/messagePassing/types/requests'
8-
import { useAppDispatch } from 'src/store/store'
99
import { WalletChainId } from 'uniswap/src/types/chains'
1010
import { useActiveAccountAddress } from 'wallet/src/features/wallet/hooks'
1111

@@ -25,7 +25,7 @@ export function DappContextProvider({ children }: { children: ReactNode }): JSX.
2525
const activeAddress = useActiveAccountAddress()
2626
const connectedAccounts = useDappConnectedAccounts(dappUrl)
2727
const lastChainId = useDappLastChainId(dappUrl)
28-
const dispatch = useAppDispatch()
28+
const dispatch = useDispatch()
2929

3030
const isConnected = !!activeAddress && isConnectedAccount(connectedAccounts, activeAddress)
3131

apps/extension/src/app/features/dapp/changeChain.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('changeChain', () => {
4747
providerErrors.custom({
4848
code: 4902,
4949
message: 'Uniswap Wallet does not support switching to this chain.',
50-
})
50+
}),
5151
),
5252
requestId: mockRequestId,
5353
})

apps/extension/src/app/features/dapp/hooks.test.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ import {
77
import { DappState, dappStore } from 'src/app/features/dapp/store'
88
import { act, renderHook, waitFor } from 'src/test/test-utils'
99
import { UniverseChainId } from 'uniswap/src/types/chains'
10-
import {
11-
ACCOUNT,
12-
ACCOUNT2,
13-
ACCOUNT3,
14-
SAMPLE_SEED_ADDRESS_1,
15-
SAMPLE_SEED_ADDRESS_3,
16-
} from 'wallet/src/test/fixtures'
10+
import { ACCOUNT, ACCOUNT2, ACCOUNT3, SAMPLE_SEED_ADDRESS_1, SAMPLE_SEED_ADDRESS_3 } from 'wallet/src/test/fixtures'
1711

1812
const SAMPLE_DAPP = 'http://example.com'
1913
const SAMPLE_DAPP_2 = 'http://uniswap.org'
@@ -78,7 +72,7 @@ describe('Dapp hooks', () => {
7872
lastChainId: UniverseChainId.ArbitrumOne,
7973
connectedAccounts: [ACCOUNT, ACCOUNT2],
8074
activeConnectedAddress: SAMPLE_SEED_ADDRESS_1,
81-
})
75+
}),
8276
)
8377
})
8478

apps/extension/src/app/features/dappRequests/DappRequestContent.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { PropsWithChildren, memo, useCallback } from 'react'
22
import { Trans, useTranslation } from 'react-i18next'
3+
import { useDispatch } from 'react-redux'
34
import { useDappLastChainId } from 'src/app/features/dapp/hooks'
45
import { useDappRequestQueueContext } from 'src/app/features/dappRequests/DappRequestQueueContext'
56
import { ConnectionRequestContent } from 'src/app/features/dappRequests/requestContent/Connection/ConnectionRequestContent'
@@ -17,7 +18,6 @@ import {
1718
isSignMessageRequest,
1819
isSignTypedDataRequest,
1920
} from 'src/app/features/dappRequests/types/DappRequestTypes'
20-
import { useAppDispatch } from 'src/store/store'
2121
import {
2222
Anchor,
2323
AnimatePresence,
@@ -60,6 +60,7 @@ interface DappRequestFooterProps {
6060
showAllNetworks?: boolean
6161
showNetworkCost?: boolean
6262
transactionGasFeeResult?: GasFeeResult
63+
isUniswapX?: boolean
6364
}
6465

6566
type DappRequestContentProps = DappRequestHeaderProps & DappRequestFooterProps
@@ -94,7 +95,7 @@ const AnimatedPane = styled(Flex, {
9495
export function DappRequestWrapper(): JSX.Element {
9596
const { t } = useTranslation()
9697
const colors = useSporeColors()
97-
const dispatch = useAppDispatch()
98+
const dispatch = useDispatch()
9899

99100
const { totalRequestCount, onPressPrevious, onPressNext, currentIndex, increasing } = useDappRequestQueueContext()
100101

@@ -268,6 +269,7 @@ export function DappRequestContent({
268269
showNetworkCost,
269270
transactionGasFeeResult,
270271
children,
272+
isUniswapX,
271273
}: PropsWithChildren<DappRequestContentProps>): JSX.Element {
272274
const { forwards, currentIndex } = useDappRequestQueueContext()
273275

@@ -283,6 +285,7 @@ export function DappRequestContent({
283285
chainId={chainId}
284286
confirmText={confirmText}
285287
connectedAccountAddress={connectedAccountAddress}
288+
isUniswapX={isUniswapX}
286289
maybeCloseOnConfirm={maybeCloseOnConfirm}
287290
showAllNetworks={showAllNetworks}
288291
showNetworkCost={showNetworkCost}
@@ -340,6 +343,7 @@ export function DappRequestFooter({
340343
showAllNetworks,
341344
showNetworkCost,
342345
transactionGasFeeResult,
346+
isUniswapX,
343347
}: DappRequestFooterProps): JSX.Element {
344348
const { t } = useTranslation()
345349
const activeAccount = useActiveAccountWithThrow()
@@ -396,13 +400,15 @@ export function DappRequestFooter({
396400
<NetworkFeeFooter
397401
chainId={currentChainId}
398402
gasFeeUSD={transactionGasFeeResult ? gasFeeUSD : '0'}
403+
isUniswapX={isUniswapX}
399404
showNetworkLogo={!!transactionGasFeeResult}
400405
/>
401406
)}
402407
{showAllNetworks && <NetworksFooter />}
403408
<AddressFooter
404409
activeAccountAddress={activeAccount.address}
405410
connectedAccountAddress={connectedAccountAddress || currentAccount.address}
411+
px="$spacing8"
406412
/>
407413
<Flex row gap="$spacing12" pt="$spacing8">
408414
<Button flex={1} flexBasis={1} size="small" theme="secondary" onPress={handleOnCancel}>

apps/extension/src/app/features/dappRequests/DappRequestQueueContext.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { providerErrors, serializeError } from '@metamask/rpc-errors'
22
import { PropsWithChildren, createContext, useContext, useEffect, useRef, useState } from 'react'
3+
import { useDispatch } from 'react-redux'
34
import {
45
confirmRequest,
56
confirmRequestNoDappInfo,
@@ -9,7 +10,7 @@ import {
910
import { DappRequestStoreItem } from 'src/app/features/dappRequests/slice'
1011
import { DappResponseType } from 'src/app/features/dappRequests/types/DappRequestTypes'
1112
import { extractBaseUrl } from 'src/app/features/dappRequests/utils'
12-
import { useAppDispatch, useAppSelector } from 'src/store/store'
13+
import { useAppSelector } from 'src/store/store'
1314
import { TransactionTypeInfo } from 'wallet/src/features/transactions/types'
1415
import { Account } from 'wallet/src/features/wallet/accounts/types'
1516
import { useActiveAccountWithThrow } from 'wallet/src/features/wallet/hooks'
@@ -32,7 +33,7 @@ interface DappRequestQueueContextValue {
3233
const DappRequestQueueContext = createContext<DappRequestQueueContextValue | undefined>(undefined)
3334

3435
export function DappRequestQueueProvider({ children }: PropsWithChildren): JSX.Element {
35-
const dispatch = useAppDispatch()
36+
const dispatch = useDispatch()
3637
const [currentIndex, setCurrentIndex] = useState(0)
3738

3839
// Show the top most pending request

apps/extension/src/app/features/dappRequests/requestContent/EthSend/Approve/ApproveRequestContent.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import {
1010
import { Flex, Text } from 'ui/src'
1111
import { iconSizes } from 'ui/src/theme'
1212
import { CurrencyLogo } from 'uniswap/src/components/CurrencyLogo/CurrencyLogo'
13+
import { LearnMoreLink } from 'uniswap/src/components/text/LearnMoreLink'
1314
import { uniswapUrls } from 'uniswap/src/constants/urls'
1415
import { CurrencyInfo } from 'uniswap/src/features/dataApi/types'
1516
import { buildCurrencyId } from 'uniswap/src/utils/currencyId'
16-
import { LearnMoreLink } from 'wallet/src/components/text/LearnMoreLink'
1717
import { GasFeeResult } from 'wallet/src/features/gas/types'
1818
import { useCurrencyInfo } from 'wallet/src/features/tokens/useCurrencyInfo'
1919
import { TransactionType, TransactionTypeInfo } from 'wallet/src/features/transactions/types'

0 commit comments

Comments
 (0)