Skip to content

Commit e4e4547

Browse files
ci(release): publish latest release
1 parent 993a9c6 commit e4e4547

File tree

7 files changed

+53
-28
lines changed

7 files changed

+53
-28
lines changed

RELEASE

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IPFS hash of the deployment:
2-
- CIDv0: `QmRCNHQbxqepJmwKTbTjue67sfn3LqusjoTaeJ1WsBUzmv`
3-
- CIDv1: `bafybeibkoplw7hlmdmxl7shx3c7w47twsz42qpmm3bss54r2wdk5mvyrre`
2+
- CIDv0: `QmWVe33WD9yQ38iTfGMAT3s8eejpztReHAdc5Nd356uaMs`
3+
- CIDv1: `bafybeidzfl3a6qljvfeawwzdyywlfgia3fuanjegwpgczxnctmq764h5zy`
44

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

@@ -10,15 +10,10 @@ 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://bafybeibkoplw7hlmdmxl7shx3c7w47twsz42qpmm3bss54r2wdk5mvyrre.ipfs.dweb.link/
14-
- https://bafybeibkoplw7hlmdmxl7shx3c7w47twsz42qpmm3bss54r2wdk5mvyrre.ipfs.cf-ipfs.com/
15-
- [ipfs://QmRCNHQbxqepJmwKTbTjue67sfn3LqusjoTaeJ1WsBUzmv/](ipfs://QmRCNHQbxqepJmwKTbTjue67sfn3LqusjoTaeJ1WsBUzmv/)
13+
- https://bafybeidzfl3a6qljvfeawwzdyywlfgia3fuanjegwpgczxnctmq764h5zy.ipfs.dweb.link/
14+
- https://bafybeidzfl3a6qljvfeawwzdyywlfgia3fuanjegwpgczxnctmq764h5zy.ipfs.cf-ipfs.com/
15+
- [ipfs://QmWVe33WD9yQ38iTfGMAT3s8eejpztReHAdc5Nd356uaMs/](ipfs://QmWVe33WD9yQ38iTfGMAT3s8eejpztReHAdc5Nd356uaMs/)
1616

17-
### 5.53.2 (2024-10-16)
18-
19-
20-
### Bug Fixes
21-
22-
* **web:** Only poll for bridging status updates if pending txs - prod (#13069) 694cac0
17+
### 5.53.3 (2024-10-16)
2318

2419

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web/5.53.2
1+
web/5.53.3

apps/web/src/components/SearchModal/CurrencySearch.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function CurrencySearch({ currencyField, onCurrencySelect, onDismiss }: C
5353
return
5454
}
5555

56-
showSwapNetworkNotification(chainId, prevChainId)
56+
showSwapNetworkNotification({ chainId, prevChainId })
5757
}, [currentTab, chainId, prevChainId, multichainUXEnabled, showSwapNetworkNotification])
5858

5959
return (

apps/web/src/hooks/useShowSwapNetworkNotification.ts

+12-6
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,34 @@ import { useAddPopup, useRemovePopup } from 'state/application/hooks'
33
import { PopupType } from 'state/application/reducer'
44
import { SwapTab } from 'uniswap/src/types/screens/interface'
55

6+
type SwapNetworkNotificationCallbackType = {
7+
chainId?: number // The chainId to show notif for, can be input or output chain
8+
prevChainId?: number // The previous chainId the user was swapping on, not used for bridging notifications
9+
outputChainId?: number // The output chainId the user is swapping to
10+
}
11+
612
export function useShowSwapNetworkNotification() {
713
const addPopup = useAddPopup()
814
const removePopup = useRemovePopup()
915

1016
return useCallback(
11-
(chainId?: number, prevChainId?: number) => {
12-
if (!chainId || chainId === prevChainId) {
17+
({ chainId, prevChainId, outputChainId }: SwapNetworkNotificationCallbackType) => {
18+
if (!chainId || chainId === prevChainId || chainId === outputChainId) {
1319
return
1420
}
15-
const isBridgeNotification = chainId && prevChainId
21+
const isBridgeNotification = chainId && outputChainId
1622
removePopup(`switchNetwork-${prevChainId}`)
1723
if (isBridgeNotification) {
1824
addPopup(
1925
{
2026
type: PopupType.Bridge,
2127
inputChainId: chainId,
22-
outputChainId: prevChainId,
28+
outputChainId,
2329
},
24-
`bridge-${chainId}-to-${prevChainId}`,
30+
`bridge-${chainId}-to-${outputChainId}`,
2531
3000,
2632
)
27-
} else {
33+
} else if (prevChainId) {
2834
addPopup(
2935
{
3036
type: PopupType.SwitchNetwork,

packages/uniswap/src/contexts/UniswapContext.tsx

+16-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ interface UniswapContext {
1212
connector?: Connector
1313
navigateToBuyOrReceiveWithEmptyWallet?: () => void
1414
navigateToFiatOnRamp: (args: { prefilledCurrency?: FiatOnRampCurrency }) => void
15-
onSwapChainsChanged: (inputChainId: UniverseChainId, outputChainId?: UniverseChainId) => void
15+
onSwapChainsChanged: (args: {
16+
chainId: UniverseChainId
17+
prevChainId?: UniverseChainId
18+
outputChainId?: UniverseChainId
19+
}) => void
1620
swapInputChainId?: UniverseChainId
1721
signer: Signer | undefined
1822
useProviderHook: (chainId: number) => JsonRpcProvider | undefined
@@ -44,9 +48,17 @@ export function UniswapProvider({
4448
account,
4549
connector,
4650
navigateToBuyOrReceiveWithEmptyWallet,
47-
onSwapChainsChanged: (inputChainId: UniverseChainId, outputChanId?: UniverseChainId): void => {
48-
onSwapChainsChanged(inputChainId, outputChanId)
49-
setSwapInputChainId(inputChainId)
51+
onSwapChainsChanged: ({
52+
chainId,
53+
prevChainId,
54+
outputChainId,
55+
}: {
56+
chainId: UniverseChainId
57+
prevChainId?: UniverseChainId
58+
outputChainId?: UniverseChainId
59+
}): void => {
60+
onSwapChainsChanged({ chainId, prevChainId, outputChainId })
61+
setSwapInputChainId(chainId)
5062
},
5163
signer,
5264
useProviderHook,

packages/uniswap/src/features/transactions/swap/hooks/useSwapNetworkNotification.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export function useSwapNetworkNotification({
2222

2323
useEffect(() => {
2424
const { inputChainId: lastInputChainId, outputChainId: lastOutputChainId } = lastNetworkNotification.current
25+
const prevChainId = lastInputChainId ?? lastOutputChainId
2526

2627
// Set initial values but don't fire notification for first network selection
2728
if (!lastInputChainId && !lastOutputChainId) {
@@ -40,9 +41,14 @@ export function useSwapNetworkNotification({
4041

4142
// Determine notification type and trigger
4243
if (inputChainId && outputChainId && inputChainId !== outputChainId) {
43-
onSwapChainsChanged(inputChainId, outputChainId) // Bridging notification
44-
} else if (inputChainId && (hasInputChanged || (hasOutputChanged && inputChainId === outputChainId))) {
45-
onSwapChainsChanged(inputChainId) // Non-bridging notification
44+
onSwapChainsChanged({ chainId: inputChainId, outputChainId }) // Bridging notification
45+
} else if (inputChainId || (outputChainId && prevChainId)) {
46+
const chainId = inputChainId ?? outputChainId
47+
// User is swapping on the same chain, don't show notification
48+
if (!chainId || chainId === prevChainId) {
49+
return
50+
}
51+
onSwapChainsChanged({ chainId, prevChainId }) // Non-bridging notification
4652
}
4753

4854
// Update last notification state

packages/wallet/src/features/transactions/swap/hooks/useShowSwapNetworkNotification.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@ const HIDE_DELAY = ONE_SECOND_MS * 2
1111
* Shows a network notification for a swap.
1212
* Depending on chain inputs passed, shows a bridging or non-bridging notification.
1313
*/
14-
export function useShowSwapNetworkNotification(): (chainId: UniverseChainId, outputChainId?: UniverseChainId) => void {
14+
export function useShowSwapNetworkNotification(): ({
15+
chainId,
16+
outputChainId,
17+
}: {
18+
chainId: UniverseChainId
19+
outputChainId?: UniverseChainId
20+
}) => void {
1521
const appDispatch = useDispatch()
1622
return useCallback(
17-
(chainId: UniverseChainId, outputChainId?: UniverseChainId) => {
23+
({ chainId, outputChainId }: { chainId: UniverseChainId; outputChainId?: UniverseChainId }) => {
1824
// Output chain should only be passed when bridging
1925
if (outputChainId && chainId !== outputChainId) {
2026
appDispatch(

0 commit comments

Comments
 (0)