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 Oct 10, 2024
1 parent 8f97706 commit b18fcc0
Show file tree
Hide file tree
Showing 662 changed files with 10,161 additions and 9,382 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ dist/out-tsc/*

# Locale backup/generated files
packages/uniswap/src/i18n/locales/source/*_old.json
packages/uniswap/src/i18n/locales/@types/resources.d.ts

# ci
.ci-cache/
Expand Down
62 changes: 55 additions & 7 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
IPFS hash of the deployment:
- CIDv0: `QmdrE1xXozbrZCb5iS5iGpjWkdJh4y7iBGHqSC1rGPcH6i`
- CIDv1: `bafybeihgolhp73f4twnioaonb2dvdyu2t44mxjdqx7pvnxfb7ibcosxcam`
- CIDv0: `QmbKgKkW8gPc6Fc4CCbruxzdbgE968pGuSMwaFPPS57kdg`
- CIDv1: `bafybeiga5awmbukdwmpf4jskzekpy76rzhk4blbqcmzvr745un6k6qulvm`

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

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

IPFS gateways:
- https://bafybeihgolhp73f4twnioaonb2dvdyu2t44mxjdqx7pvnxfb7ibcosxcam.ipfs.dweb.link/
- https://bafybeihgolhp73f4twnioaonb2dvdyu2t44mxjdqx7pvnxfb7ibcosxcam.ipfs.cf-ipfs.com/
- [ipfs://QmdrE1xXozbrZCb5iS5iGpjWkdJh4y7iBGHqSC1rGPcH6i/](ipfs://QmdrE1xXozbrZCb5iS5iGpjWkdJh4y7iBGHqSC1rGPcH6i/)
- https://bafybeiga5awmbukdwmpf4jskzekpy76rzhk4blbqcmzvr745un6k6qulvm.ipfs.dweb.link/
- https://bafybeiga5awmbukdwmpf4jskzekpy76rzhk4blbqcmzvr745un6k6qulvm.ipfs.cf-ipfs.com/
- [ipfs://QmbKgKkW8gPc6Fc4CCbruxzdbgE968pGuSMwaFPPS57kdg/](ipfs://QmbKgKkW8gPc6Fc4CCbruxzdbgE968pGuSMwaFPPS57kdg/)

### 5.50.4 (2024-10-10)
## 5.51.0 (2024-10-10)


### Features

* **web:** add network costs to the addliquidity modal (#12557) 9beb5ce
* **web:** add steps to the modal (#12431) 65639b4
* **web:** add support for permit (#12575) b9d9579
* **web:** add testnet modal (#12636) 350d97e
* **web:** adding create modal (#12441) 3150f48
* **web:** balance fetch switch on testnet mode (#12576) dfa44bd
* **web:** call TradingAPI claim fees endpoint for v3/v4 (#12444) 8acafa7
* **web:** deposit tokens step (#12377) 4c747d8
* **web:** disable testnet on disconnect (#12750) 9f0bdbb
* **web:** disable tx flows on explore pages (#12656) 6ed0b42
* **web:** enable testnet mode on web with flag (#12505) dd7f272
* **web:** hook up LP saga + confirm steps to the decrease flow (#12508) 3f0ff49
* **web:** integrate with trading API for create flow (v2,v3) (#12434) 7283d2e
* **web:** loading state for new PosDP (#12634) 688ea88
* **web:** LP migrate page - update query and loading state (#12652) 88b336e
* **web:** positions pagination and claim fees modal (#12341) 5f1eba2
* **web:** testnet mode (#12566) abe823d
* **web:** testnet portfolio row (#12616) ae5e5f5
* **web:** unichain intro modal (#12554) 16fdb94
* **web:** use single position query for PosDP (#12517) e242d90
* **web:** use universe currency logo for testnets (#12607) d0767bd
* **web:** use v3 uncollected fee values from Data API (#12555) 2a376be
* **web:** v4 create position v2 (#12419) be27df2
* **web:** v4 price range charts (#12525) cf9f515


### Bug Fixes

* **web:** pass account to getSigner instead of using default [prod] (#12883) 688582d
* **web:** 10 08 fix web log step and original error on web staging (#12825) c895745
* **web:** add requestId and quoteId to post /order request (#12612) e08233f
* **web:** astro chain ui info (#12671) 6923e48
* **web:** default to crypto in send when on testnet (#12758) 5839f86
* **web:** dont respect url flag overrides on prod (#12545) 3a68877
* **web:** fix tick formatting + position details page (#12648) b606211
* **web:** fixing v4 create bugs (#12514) 9da665d
* **web:** hide gas for testnet unichain eth (#12759) 2dfd2d5
* **web:** invalidate local activity cache for updates to transaction or signature state (#12650) f119f63
* **web:** move connected wallet chain logic to universe (#12717) 5f78d74
* **web:** native currency logo fetching on web (#12387) 81eb2ac
* **web:** pass account to getSigner instead of using default [staging] (#12884) a11364b
* **web:** rm prod arb+eth quicknode urls (#12646) d36d711
* **web:** simplify/combine the liquidity saga logic (#12540) 5b72b61
* **web:** ui nits and bugs (#12718) 6330bd4
* **web:** uniswapx toasts/polling (#12658) 53dc7b1


### Continuous Integration

* **web:** update sitemaps 82367d7


2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web/5.50.4
web/5.51.0
7 changes: 4 additions & 3 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
"@svgr/webpack": "8.0.1",
"@tamagui/core": "1.108.4",
"@types/uuid": "9.0.1",
"@uniswap/analytics-events": "2.37.0",
"@uniswap/analytics-events": "2.38.0",
"@uniswap/uniswapx-sdk": "^2.1.0-beta.14",
"@uniswap/universal-router-sdk": "2.2.0",
"@uniswap/v3-sdk": "3.14.0",
"@uniswap/universal-router-sdk": "4.2.0",
"@uniswap/v3-sdk": "3.17.0",
"@uniswap/v4-sdk": "1.10.0",
"dotenv-webpack": "8.0.1",
"ethers": "5.7.2",
"eventemitter3": "5.0.1",
Expand Down
2 changes: 2 additions & 0 deletions apps/extension/src/app/PopupApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import i18n from 'uniswap/src/i18n/i18n'
import { ExtensionScreens } from 'uniswap/src/types/screens/extension'
import { logger } from 'utilities/src/logger/logger'
import { ErrorBoundary } from 'wallet/src/components/ErrorBoundary/ErrorBoundary'
import { useTestnetModeForLoggingAndAnalytics } from 'wallet/src/features/testnetMode/hooks'
import { SharedWalletProvider } from 'wallet/src/providers/SharedWalletProvider'

getLocalUserId()
Expand Down Expand Up @@ -54,6 +55,7 @@ function PopupContent(): JSX.Element {
useEffect(() => {
dispatch(syncAppWithDeviceLanguage())
}, [dispatch])
useTestnetModeForLoggingAndAnalytics()

const searchParams = new URLSearchParams(window.location.search)
const tabId = searchParams.get('tabId')
Expand Down
2 changes: 2 additions & 0 deletions apps/extension/src/app/SidebarApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import { logger } from 'utilities/src/logger/logger'
import { ONE_SECOND_MS } from 'utilities/src/time/time'
import { useInterval } from 'utilities/src/time/timing'
import { ErrorBoundary } from 'wallet/src/components/ErrorBoundary/ErrorBoundary'
import { useTestnetModeForLoggingAndAnalytics } from 'wallet/src/features/testnetMode/hooks'
import { SharedWalletProvider } from 'wallet/src/providers/SharedWalletProvider'

getLocalUserId()
Expand Down Expand Up @@ -202,6 +203,7 @@ function useDappRequestPortListener(): void {
function SidebarWrapper(): JSX.Element {
const dispatch = useDispatch()
useDappRequestPortListener()
useTestnetModeForLoggingAndAnalytics()

useEffect(() => {
dispatch(syncAppWithDeviceLanguage())
Expand Down
2 changes: 2 additions & 0 deletions apps/extension/src/app/UnitagClaimApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { UnitagUpdaterContextProvider } from 'uniswap/src/features/unitags/conte
import i18n from 'uniswap/src/i18n/i18n'
import { logger } from 'utilities/src/logger/logger'
import { ErrorBoundary } from 'wallet/src/components/ErrorBoundary/ErrorBoundary'
import { useTestnetModeForLoggingAndAnalytics } from 'wallet/src/features/testnetMode/hooks'
import { SharedWalletProvider } from 'wallet/src/providers/SharedWalletProvider'

getLocalUserId()
Expand Down Expand Up @@ -58,6 +59,7 @@ router.subscribe((state) => {
setRouter(router)

function UnitagClaimAppInner(): JSX.Element {
useTestnetModeForLoggingAndAnalytics()
return (
<Flex alignItems="center" justifyContent="center" minHeight="100vh" width="100%">
<OnboardingStepsProvider
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
Expand Up @@ -8,14 +8,14 @@ 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 { WalletChainId } from 'uniswap/src/types/chains'
import { UniverseChainId } from 'uniswap/src/types/chains'
import { useActiveAccountAddress } from 'wallet/src/features/wallet/hooks'

type DappContextState = {
dappUrl: string
dappIconUrl?: string
isConnected: boolean
lastChainId?: WalletChainId
lastChainId?: UniverseChainId
}

const DappContext = createContext<DappContextState | undefined>(undefined)
Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/app/features/dapp/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
UpdateConnectionRequest,
} from 'src/background/messagePassing/types/requests'
import { chainIdToHexadecimalString } from 'uniswap/src/features/chains/utils'
import { WalletChainId } from 'uniswap/src/types/chains'
import { UniverseChainId } from 'uniswap/src/types/chains'
import { Account } from 'wallet/src/features/wallet/accounts/types'
import { getProviderSync } from 'wallet/src/features/wallet/context'

export async function saveDappChain(dappUrl: string, chainId: WalletChainId): Promise<void> {
export async function saveDappChain(dappUrl: string, chainId: UniverseChainId): Promise<void> {
dappStore.updateDappLatestChainId(dappUrl, chainId)
const provider = getProviderSync(chainId)

Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/app/features/dapp/changeChain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DappResponseType } from 'src/app/features/dappRequests/types/DappReques
import { chainIdToHexadecimalString } from 'uniswap/src/features/chains/utils'
import { ExtensionEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { WalletChainId } from 'uniswap/src/types/chains'
import { UniverseChainId } from 'uniswap/src/types/chains'

// Mock dependencies
jest.mock('@ethersproject/providers')
Expand All @@ -18,7 +18,7 @@ jest.mock('uniswap/src/features/chains/utils')
describe('changeChain', () => {
const mockRequestId = 'test-request-id'
const mockProviderUrl = 'http://localhost:8545'
const mockChainId = 1 as WalletChainId
const mockChainId = 1 as UniverseChainId

let mockProvider: JsonRpcProvider

Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/app/features/dapp/changeChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { chainIdToHexadecimalString } from 'uniswap/src/features/chains/utils'
import { ExtensionEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { WalletChainId } from 'uniswap/src/types/chains'
import { UniverseChainId } from 'uniswap/src/types/chains'

export function changeChain({
activeConnectedAddress,
Expand All @@ -22,7 +22,7 @@ export function changeChain({
dappUrl: string | undefined
provider: JsonRpcProvider | undefined | null
requestId: string
updatedChainId: WalletChainId | null
updatedChainId: UniverseChainId | null
}): ChangeChainResponse | ErrorResponse {
if (!updatedChainId) {
return {
Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/app/features/dapp/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useReducer, useState } from 'react'
import { DappInfo, DappStoreEvent, dappStore } from 'src/app/features/dapp/store'
import { WalletChainId } from 'uniswap/src/types/chains'
import { UniverseChainId } from 'uniswap/src/types/chains'
import { Account } from 'wallet/src/features/wallet/accounts/types'
import { useActiveAccountAddress } from 'wallet/src/features/wallet/hooks'

Expand All @@ -26,7 +26,7 @@ export function useDappInfo(dappUrl: string | undefined): DappInfo | undefined {
return info
}

export function useDappLastChainId(dappUrl: string | undefined): WalletChainId | undefined {
export function useDappLastChainId(dappUrl: string | undefined): UniverseChainId | undefined {
return useDappInfo(dappUrl)?.lastChainId
}

Expand Down
7 changes: 4 additions & 3 deletions apps/extension/src/app/features/dapp/store.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { cloneDeep } from '@apollo/client/utilities'
import EventEmitter from 'eventemitter3'
import { getOrderedConnectedAddresses, isConnectedAccount } from 'src/app/features/dapp/utils'
import { UniverseChainId, WalletChainId } from 'uniswap/src/types/chains'
import { UniverseChainId } from 'uniswap/src/types/chains'
import { Account } from 'wallet/src/features/wallet/accounts/types'

const STATE_STORAGE_KEY = 'dappState'

export interface DappInfo {
lastChainId: WalletChainId
lastChainId: UniverseChainId
connectedAccounts: Account[]
activeConnectedAddress: Address
iconUrl?: string
Expand Down Expand Up @@ -153,7 +153,7 @@ function updateDappIconUrl(dappUrl: string, newIconUrl?: string): void {
}

// TODO(WALL-4643): if we migrate to immer, let's avoid iterating over the the object here
function updateDappLatestChainId(dappUrl: string, chainId: WalletChainId): void {
function updateDappLatestChainId(dappUrl: string, chainId: UniverseChainId): void {
// Never directly mutate state, as some of its fields could have `writable: false`
state = Object.fromEntries(
Object.entries(state).map(([key, dappUrlState]) => {
Expand All @@ -172,6 +172,7 @@ function saveDappActiveAccount(dappUrl: string, account: Account, initialPropert
...state,
[dappUrl]: {
...state[dappUrl],
// TODO: WALL-4919: Remove hardcoded Mainnet
lastChainId: state[dappUrl]?.lastChainId ?? UniverseChainId.Mainnet,
activeConnectedAddress: account.address,
connectedAccounts: ((): Account[] => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { PropsWithChildren, useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import { useDappLastChainId } from 'src/app/features/dapp/hooks'
import { useDappRequestQueueContext } from 'src/app/features/dappRequests/DappRequestQueueContext'
import { NetworksFooter } from 'src/app/features/dappRequests/requestContent/NetworksFooter'
import { DappRequestStoreItem } from 'src/app/features/dappRequests/slice'
import { Anchor, AnimatePresence, Button, Flex, Text, UniversalImage, UniversalImageResizeMode, styled } from 'ui/src'
import { borderRadii, iconSizes } from 'ui/src/theme'
import { useUSDValue } from 'uniswap/src/features/gas/hooks'
import { useUSDValueOfGasFee } from 'uniswap/src/features/gas/hooks'
import { GasFeeResult } from 'uniswap/src/features/gas/types'
import { hasSufficientFundsIncludingGas } from 'uniswap/src/features/gas/utils'
import { useOnChainNativeCurrencyBalance } from 'uniswap/src/features/portfolio/api'
import { useEnabledChains } from 'uniswap/src/features/settings/hooks'
import { TransactionTypeInfo } from 'uniswap/src/features/transactions/types/transactionDetails'
import { UniverseChainId, WalletChainId } from 'uniswap/src/types/chains'
import { UniverseChainId } from 'uniswap/src/types/chains'
import { extractNameFromUrl } from 'utilities/src/format/extractNameFromUrl'
import { formatDappURL } from 'utilities/src/format/urls'
import { logger } from 'utilities/src/logger/logger'
Expand All @@ -26,7 +26,7 @@ interface DappRequestHeaderProps {
}

interface DappRequestFooterProps {
chainId?: WalletChainId
chainId?: UniverseChainId
connectedAccountAddress?: string
confirmText: string
maybeCloseOnConfirm?: boolean
Expand Down Expand Up @@ -150,13 +150,13 @@ export function DappRequestFooter({
maybeCloseOnConfirm,
onCancel,
onConfirm,
showAllNetworks,
showNetworkCost,
transactionGasFeeResult,
isUniswapX,
}: DappRequestFooterProps): JSX.Element {
const { t } = useTranslation()
const activeAccount = useActiveAccountWithThrow()
const { defaultChainId } = useEnabledChains()
const {
dappUrl,
currentAccount,
Expand All @@ -174,8 +174,8 @@ export function DappRequestFooter({
throw error
}

const currentChainId = chainId || activeChain || UniverseChainId.Mainnet
const gasFeeUSD = useUSDValue(currentChainId, transactionGasFeeResult?.value)
const currentChainId = chainId || activeChain || defaultChainId
const { value: gasFeeUSD } = useUSDValueOfGasFee(currentChainId, transactionGasFeeResult?.value)
const { balance: nativeBalance } = useOnChainNativeCurrencyBalance(currentChainId, currentAccount.address)

const hasSufficientGas = hasSufficientFundsIncludingGas({
Expand Down Expand Up @@ -225,12 +225,11 @@ export function DappRequestFooter({
{showNetworkCost && (
<NetworkFeeFooter
chainId={currentChainId}
gasFeeUSD={transactionGasFeeResult ? gasFeeUSD : '0'}
gasFee={transactionGasFeeResult}
isUniswapX={isUniswapX}
showNetworkLogo={!!transactionGasFeeResult}
/>
)}
{showAllNetworks && <NetworksFooter />}
<AddressFooter
activeAccountAddress={activeAccount.address}
connectedAccountAddress={connectedAccountAddress || currentAccount.address}
Expand Down
10 changes: 6 additions & 4 deletions apps/extension/src/app/features/dappRequests/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ import { extractBaseUrl } from 'src/app/features/dappRequests/utils'
import { dappResponseMessageChannel } from 'src/background/messagePassing/messageChannels'
import { call, put, select } from 'typed-redux-saga'
import { chainIdToHexadecimalString } from 'uniswap/src/features/chains/utils'
import { getEnabledChainIdsSaga } from 'uniswap/src/features/settings/saga'
import { ExtensionEventName } from 'uniswap/src/features/telemetry/constants'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
import { UniverseChainId, WalletChainId } from 'uniswap/src/types/chains'
import { UniverseChainId } from 'uniswap/src/types/chains'
import { pushNotification } from 'wallet/src/features/notifications/slice'
import { AppNotificationType } from 'wallet/src/features/notifications/types'
import { getProvider } from 'wallet/src/features/wallet/context'
import { selectActiveAccount } from 'wallet/src/features/wallet/selectors'

function getAccountResponse(
chainId: WalletChainId,
chainId: UniverseChainId,
dappRequest: DappRequest,
provider: JsonRpcProvider,
dappInfo: DappInfo,
Expand All @@ -47,7 +48,7 @@ function getAccountResponse(

function sendAccountResponseAnalyticsEvent(
senderUrl: string,
chainId: WalletChainId,
chainId: UniverseChainId,
dappInfo: DappInfo,
accountResponse: AccountResponse,
): void {
Expand Down Expand Up @@ -86,6 +87,7 @@ export function* saveAccount({ url, favIconUrl }: SenderTabInfo) {
const activeAccount = yield* select(selectActiveAccount)
const dappUrl = extractBaseUrl(url)
const dappInfo = yield* call(dappStore.getDappInfo, dappUrl)
const { defaultChainId } = yield* call(getEnabledChainIdsSaga)

if (!dappUrl || !activeAccount) {
return undefined
Expand All @@ -102,7 +104,7 @@ export function* saveAccount({ url, favIconUrl }: SenderTabInfo) {
)
}

const chainId = dappInfo?.lastChainId ?? UniverseChainId.Mainnet
const chainId = dappInfo?.lastChainId ?? defaultChainId
const provider = yield* call(getProvider, chainId)
const connectedAddresses = (dappUrl && (yield* call(dappStore.getDappOrderedConnectedAddresses, dappUrl))) || []

Expand Down
Loading

0 comments on commit b18fcc0

Please sign in to comment.