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 Jul 24, 2024
1 parent 5ab5356 commit ac6fb2e
Show file tree
Hide file tree
Showing 1,166 changed files with 20,897 additions and 14,840 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ __mocks__
*.inc
*.json
*.md
*.test.ts
*.yml
babel.config.js
build
Expand Down
14 changes: 0 additions & 14 deletions .yarn/patches/detox-npm-20.18.1-b532b310b4.patch

This file was deleted.

Binary file added .yarn/patches/detox-npm-20.23.0-6d61110e63.patch
Binary file not shown.
12 changes: 3 additions & 9 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
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.

- Connect to thousands of onchain apps across Ethereum, Base, Arbitrum and many other EVM blockchains
- Explore tokens directly on Uniswap, one of the most trusted DeFi protocols with over $2 trillion in volume
- View all of your crypto assets without switching, across Ethereum and other EVM-compatible blockchains
- Easily create a new wallet or import your existing wallet
- Safely send and receive crypto tokens with other wallets

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.
- UI fixes across various pages
- UniswapX UI/UX improvements
- Internal code organization improvements
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
extension/1.0.3
extension/1.1.0
3 changes: 2 additions & 1 deletion apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"@svgr/webpack": "8.0.1",
"@tamagui/core": "1.95.1",
"@types/uuid": "9.0.1",
"@uniswap/analytics-events": "2.32.0",
"@uniswap/analytics-events": "2.34.0",
"@uniswap/sdk-core": "5.3.0",
"@uniswap/universal-router-sdk": "2.2.0",
"@uniswap/v3-sdk": "3.13.0",
"dotenv-webpack": "8.0.1",
Expand Down
7 changes: 4 additions & 3 deletions apps/extension/src/app/SidebarApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'src/app/Global.css'

import { useEffect, useRef, useState } from 'react'
import { I18nextProvider } from 'react-i18next'
import { useDispatch } from 'react-redux'
import { RouterProvider, ScrollRestoration } from 'react-router-dom'
import { PersistGate } from 'redux-persist/integration/react'
import { ExtensionStatsigProvider } from 'src/app/StatsigProvider'
Expand Down Expand Up @@ -36,7 +37,7 @@ import {
} from 'src/background/messagePassing/messageChannels'
import { BackgroundToSidePanelRequestType } from 'src/background/messagePassing/types/requests'
import { PrimaryAppInstanceDebuggerLazy } from 'src/store/PrimaryAppInstanceDebuggerLazy'
import { getReduxPersistor, getReduxStore, useAppDispatch } from 'src/store/store'
import { getReduxPersistor, getReduxStore } from 'src/store/store'
import Trace from 'uniswap/src/features/telemetry/Trace'
import { ExtensionEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
Expand Down Expand Up @@ -134,7 +135,7 @@ const router = sentryCreateHashRouter([

const PORT_PING_INTERVAL = 5 * ONE_SECOND_MS
function useDappRequestPortListener(): void {
const dispatch = useAppDispatch()
const dispatch = useDispatch()
const [currentPortChannel, setCurrentPortChannel] = useState<DappBackgroundPortChannel | undefined>()
const [windowId, setWindowId] = useState<string | undefined>()

Expand Down Expand Up @@ -194,7 +195,7 @@ function useDappRequestPortListener(): void {
}

function SidebarWrapper(): JSX.Element {
const dispatch = useAppDispatch()
const dispatch = useDispatch()
useDappRequestPortListener()

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { t } from 'i18next'
import { useDispatch } from 'react-redux'
import { Button, Flex, Text, useSporeColors } from 'ui/src'
import { MessageStar } from 'ui/src/components/icons'
import { BottomSheetModal } from 'uniswap/src/components/modals/BottomSheetModal'
import { uniswapUrls } from 'uniswap/src/constants/urls'
import { ModalName } from 'uniswap/src/features/telemetry/constants'
import { selectExtensionBetaFeedbackState } from 'wallet/src/features/behaviorHistory/selectors'
import { ExtensionBetaFeedbackState, setExtensionBetaFeedbackState } from 'wallet/src/features/behaviorHistory/slice'
import { useAppDispatch, useAppSelector } from 'wallet/src/state'
import { useAppSelector } from 'wallet/src/state'

export function FeedbackRequestModal(): JSX.Element {
const dispatch = useAppDispatch()
const dispatch = useDispatch()
const colors = useSporeColors()

const onDismiss = (): void => {
Expand Down
9 changes: 3 additions & 6 deletions apps/extension/src/app/components/tabs/ActivityTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@ import { ScrollView } from 'ui/src'
import { useActivityData } from 'wallet/src/features/activity/useActivityData'

export const ActivityTab = memo(function _ActivityTab({ address }: { address: Address }): JSX.Element {
const { maybeLoaderComponent, maybeEmptyComponent, renderActivityItem, sectionData } = useActivityData({
const { maybeEmptyComponent, renderActivityItem, sectionData } = useActivityData({
owner: address,
})

if (maybeLoaderComponent) {
return maybeLoaderComponent
}

if (maybeEmptyComponent) {
return maybeEmptyComponent
}

return (
<ScrollView showsVerticalScrollIndicator={false} width="100%">
{(sectionData ?? []).map((item) => renderActivityItem({ item }))}
{/* `sectionData` will be either an array of transactions or an array of loading skeletons */}
{(sectionData ?? []).map((item, index) => renderActivityItem({ item, index }))}
</ScrollView>
)
})
6 changes: 3 additions & 3 deletions apps/extension/src/app/features/accounts/AccountItem.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { SharedEventName } from '@uniswap/analytics-events'
import { BaseSyntheticEvent, useCallback, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useDispatch } from 'react-redux'
import { EditLabelModal } from 'src/app/features/accounts/EditLabelModal'
import { removeAllDappConnectionsForAccount } from 'src/app/features/dapp/actions'
import { ContextMenu, Flex, MenuContentItem, Text, TouchableArea } from 'ui/src'
import { CopySheets, Edit, TrashFilled, TripleDots } from 'ui/src/components/icons'
import { iconSizes } from 'ui/src/theme'
import { ElementName, ModalName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { setClipboard } from 'uniswap/src/utils/clipboard'
import { NumberType } from 'utilities/src/format/types'
import { AddressDisplay } from 'wallet/src/components/accounts/AddressDisplay'
import { WarningModal } from 'wallet/src/components/modals/WarningModal/WarningModal'
Expand All @@ -19,8 +21,6 @@ import { WarningSeverity } from 'wallet/src/features/transactions/WarningModal/t
import { EditAccountAction, editAccountActions } from 'wallet/src/features/wallet/accounts/editAccountSaga'
import { useActiveAccountWithThrow, useDisplayName, useSignerAccounts } from 'wallet/src/features/wallet/hooks'
import { DisplayNameType } from 'wallet/src/features/wallet/types'
import { useAppDispatch } from 'wallet/src/state'
import { setClipboard } from 'wallet/src/utils/clipboard'

type AccountItemProps = {
address: Address
Expand All @@ -29,7 +29,7 @@ type AccountItemProps = {

export function AccountItem({ address, onAccountSelect }: AccountItemProps): JSX.Element {
const { t } = useTranslation()
const dispatch = useAppDispatch()
const dispatch = useDispatch()
const { data, loading, error } = usePortfolioTotalValue({ address })
const { balanceUSD } = data || {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
import { useDispatch, useSelector } from 'react-redux'
import { ComingSoon } from 'src/app/components/ComingSoon'
import { ScreenHeader } from 'src/app/components/layout/ScreenHeader'
import { AccountItem } from 'src/app/features/accounts/AccountItem'
Expand All @@ -13,7 +13,6 @@ import { isConnectedAccount } from 'src/app/features/dapp/utils'
import { PopupName, openPopup } from 'src/app/features/popups/slice'
import { AppRoutes, RemoveRecoveryPhraseRoutes, SettingsRoutes } from 'src/app/navigation/constants'
import { navigate } from 'src/app/navigation/state'
import { useAppDispatch } from 'src/store/store'
import { Button, Flex, MenuContent, MenuContentItem, Popover, ScrollView, Text, useSporeColors } from 'ui/src'
import { WalletFilled, X } from 'ui/src/components/icons'
import { spacing } from 'ui/src/theme'
Expand All @@ -40,7 +39,7 @@ const MIN_MENU_WIDTH = 200

export function AccountSwitcherScreen(): JSX.Element {
const colors = useSporeColors()
const dispatch = useAppDispatch()
const dispatch = useDispatch()
const { t } = useTranslation()

const activeAccount = useActiveAccountWithThrow()
Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/app/features/accounts/EditLabelModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useDispatch } from 'react-redux'
import { Button, Flex, Text } from 'ui/src'
import { iconSizes } from 'ui/src/theme'
import { TextInput } from 'uniswap/src/components/input/TextInput'
Expand All @@ -10,7 +11,6 @@ import { AccountIcon } from 'wallet/src/components/accounts/AccountIcon'
import { EditAccountAction, editAccountActions } from 'wallet/src/features/wallet/accounts/editAccountSaga'
import { useDisplayName } from 'wallet/src/features/wallet/hooks'
import { DisplayNameType } from 'wallet/src/features/wallet/types'
import { useAppDispatch } from 'wallet/src/state'

type EditLabelModalProps = {
address: Address
Expand All @@ -19,7 +19,7 @@ type EditLabelModalProps = {

export function EditLabelModal({ address, onClose }: EditLabelModalProps): JSX.Element {
const { t } = useTranslation()
const dispatch = useAppDispatch()
const dispatch = useDispatch()

const displayName = useDisplayName(address)
const defaultText = displayName?.type === DisplayNameType.Local ? displayName.name : ''
Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/app/features/dapp/DappContext.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { createContext, ReactNode, useContext, useEffect, useState } from 'react'
import { useDispatch } from 'react-redux'
import { useDappConnectedAccounts, useDappLastChainId } from 'src/app/features/dapp/hooks'
import { isConnectedAccount } from 'src/app/features/dapp/utils'
import { extractBaseUrl } from 'src/app/features/dappRequests/utils'
import { closePopup, PopupName } from 'src/app/features/popups/slice'
import { backgroundToSidePanelMessageChannel } from 'src/background/messagePassing/messageChannels'
import { BackgroundToSidePanelRequestType } from 'src/background/messagePassing/types/requests'
import { useAppDispatch } from 'src/store/store'
import { WalletChainId } from 'uniswap/src/types/chains'
import { useActiveAccountAddress } from 'wallet/src/features/wallet/hooks'

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

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

Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/app/features/dapp/changeChain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('changeChain', () => {
providerErrors.custom({
code: 4902,
message: 'Uniswap Wallet does not support switching to this chain.',
})
}),
),
requestId: mockRequestId,
})
Expand Down
10 changes: 2 additions & 8 deletions apps/extension/src/app/features/dapp/hooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ import {
import { DappState, dappStore } from 'src/app/features/dapp/store'
import { act, renderHook, waitFor } from 'src/test/test-utils'
import { UniverseChainId } from 'uniswap/src/types/chains'
import {
ACCOUNT,
ACCOUNT2,
ACCOUNT3,
SAMPLE_SEED_ADDRESS_1,
SAMPLE_SEED_ADDRESS_3,
} from 'wallet/src/test/fixtures'
import { ACCOUNT, ACCOUNT2, ACCOUNT3, SAMPLE_SEED_ADDRESS_1, SAMPLE_SEED_ADDRESS_3 } from 'wallet/src/test/fixtures'

const SAMPLE_DAPP = 'http://example.com'
const SAMPLE_DAPP_2 = 'http://uniswap.org'
Expand Down Expand Up @@ -78,7 +72,7 @@ describe('Dapp hooks', () => {
lastChainId: UniverseChainId.ArbitrumOne,
connectedAccounts: [ACCOUNT, ACCOUNT2],
activeConnectedAddress: SAMPLE_SEED_ADDRESS_1,
})
}),
)
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { PropsWithChildren, memo, useCallback } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { useDispatch } from 'react-redux'
import { useDappLastChainId } from 'src/app/features/dapp/hooks'
import { useDappRequestQueueContext } from 'src/app/features/dappRequests/DappRequestQueueContext'
import { ConnectionRequestContent } from 'src/app/features/dappRequests/requestContent/Connection/ConnectionRequestContent'
Expand All @@ -17,7 +18,6 @@ import {
isSignMessageRequest,
isSignTypedDataRequest,
} from 'src/app/features/dappRequests/types/DappRequestTypes'
import { useAppDispatch } from 'src/store/store'
import {
Anchor,
AnimatePresence,
Expand Down Expand Up @@ -60,6 +60,7 @@ interface DappRequestFooterProps {
showAllNetworks?: boolean
showNetworkCost?: boolean
transactionGasFeeResult?: GasFeeResult
isUniswapX?: boolean
}

type DappRequestContentProps = DappRequestHeaderProps & DappRequestFooterProps
Expand Down Expand Up @@ -94,7 +95,7 @@ const AnimatedPane = styled(Flex, {
export function DappRequestWrapper(): JSX.Element {
const { t } = useTranslation()
const colors = useSporeColors()
const dispatch = useAppDispatch()
const dispatch = useDispatch()

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

Expand Down Expand Up @@ -268,6 +269,7 @@ export function DappRequestContent({
showNetworkCost,
transactionGasFeeResult,
children,
isUniswapX,
}: PropsWithChildren<DappRequestContentProps>): JSX.Element {
const { forwards, currentIndex } = useDappRequestQueueContext()

Expand All @@ -283,6 +285,7 @@ export function DappRequestContent({
chainId={chainId}
confirmText={confirmText}
connectedAccountAddress={connectedAccountAddress}
isUniswapX={isUniswapX}
maybeCloseOnConfirm={maybeCloseOnConfirm}
showAllNetworks={showAllNetworks}
showNetworkCost={showNetworkCost}
Expand Down Expand Up @@ -340,6 +343,7 @@ export function DappRequestFooter({
showAllNetworks,
showNetworkCost,
transactionGasFeeResult,
isUniswapX,
}: DappRequestFooterProps): JSX.Element {
const { t } = useTranslation()
const activeAccount = useActiveAccountWithThrow()
Expand Down Expand Up @@ -396,13 +400,15 @@ export function DappRequestFooter({
<NetworkFeeFooter
chainId={currentChainId}
gasFeeUSD={transactionGasFeeResult ? gasFeeUSD : '0'}
isUniswapX={isUniswapX}
showNetworkLogo={!!transactionGasFeeResult}
/>
)}
{showAllNetworks && <NetworksFooter />}
<AddressFooter
activeAccountAddress={activeAccount.address}
connectedAccountAddress={connectedAccountAddress || currentAccount.address}
px="$spacing8"
/>
<Flex row gap="$spacing12" pt="$spacing8">
<Button flex={1} flexBasis={1} size="small" theme="secondary" onPress={handleOnCancel}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { providerErrors, serializeError } from '@metamask/rpc-errors'
import { PropsWithChildren, createContext, useContext, useEffect, useRef, useState } from 'react'
import { useDispatch } from 'react-redux'
import {
confirmRequest,
confirmRequestNoDappInfo,
Expand All @@ -9,7 +10,7 @@ import {
import { DappRequestStoreItem } from 'src/app/features/dappRequests/slice'
import { DappResponseType } from 'src/app/features/dappRequests/types/DappRequestTypes'
import { extractBaseUrl } from 'src/app/features/dappRequests/utils'
import { useAppDispatch, useAppSelector } from 'src/store/store'
import { useAppSelector } from 'src/store/store'
import { TransactionTypeInfo } from 'wallet/src/features/transactions/types'
import { Account } from 'wallet/src/features/wallet/accounts/types'
import { useActiveAccountWithThrow } from 'wallet/src/features/wallet/hooks'
Expand All @@ -32,7 +33,7 @@ interface DappRequestQueueContextValue {
const DappRequestQueueContext = createContext<DappRequestQueueContextValue | undefined>(undefined)

export function DappRequestQueueProvider({ children }: PropsWithChildren): JSX.Element {
const dispatch = useAppDispatch()
const dispatch = useDispatch()
const [currentIndex, setCurrentIndex] = useState(0)

// Show the top most pending request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {
import { Flex, Text } from 'ui/src'
import { iconSizes } from 'ui/src/theme'
import { CurrencyLogo } from 'uniswap/src/components/CurrencyLogo/CurrencyLogo'
import { LearnMoreLink } from 'uniswap/src/components/text/LearnMoreLink'
import { uniswapUrls } from 'uniswap/src/constants/urls'
import { CurrencyInfo } from 'uniswap/src/features/dataApi/types'
import { buildCurrencyId } from 'uniswap/src/utils/currencyId'
import { LearnMoreLink } from 'wallet/src/components/text/LearnMoreLink'
import { GasFeeResult } from 'wallet/src/features/gas/types'
import { useCurrencyInfo } from 'wallet/src/features/tokens/useCurrencyInfo'
import { TransactionType, TransactionTypeInfo } from 'wallet/src/features/transactions/types'
Expand Down
Loading

0 comments on commit ac6fb2e

Please sign in to comment.