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 16, 2024
1 parent 993a9c6 commit e4e4547
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 28 deletions.
17 changes: 6 additions & 11 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
IPFS hash of the deployment:
- CIDv0: `QmRCNHQbxqepJmwKTbTjue67sfn3LqusjoTaeJ1WsBUzmv`
- CIDv1: `bafybeibkoplw7hlmdmxl7shx3c7w47twsz42qpmm3bss54r2wdk5mvyrre`
- CIDv0: `QmWVe33WD9yQ38iTfGMAT3s8eejpztReHAdc5Nd356uaMs`
- CIDv1: `bafybeidzfl3a6qljvfeawwzdyywlfgia3fuanjegwpgczxnctmq764h5zy`

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

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

IPFS gateways:
- https://bafybeibkoplw7hlmdmxl7shx3c7w47twsz42qpmm3bss54r2wdk5mvyrre.ipfs.dweb.link/
- https://bafybeibkoplw7hlmdmxl7shx3c7w47twsz42qpmm3bss54r2wdk5mvyrre.ipfs.cf-ipfs.com/
- [ipfs://QmRCNHQbxqepJmwKTbTjue67sfn3LqusjoTaeJ1WsBUzmv/](ipfs://QmRCNHQbxqepJmwKTbTjue67sfn3LqusjoTaeJ1WsBUzmv/)
- https://bafybeidzfl3a6qljvfeawwzdyywlfgia3fuanjegwpgczxnctmq764h5zy.ipfs.dweb.link/
- https://bafybeidzfl3a6qljvfeawwzdyywlfgia3fuanjegwpgczxnctmq764h5zy.ipfs.cf-ipfs.com/
- [ipfs://QmWVe33WD9yQ38iTfGMAT3s8eejpztReHAdc5Nd356uaMs/](ipfs://QmWVe33WD9yQ38iTfGMAT3s8eejpztReHAdc5Nd356uaMs/)

### 5.53.2 (2024-10-16)


### Bug Fixes

* **web:** Only poll for bridging status updates if pending txs - prod (#13069) 694cac0
### 5.53.3 (2024-10-16)


2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web/5.53.2
web/5.53.3
2 changes: 1 addition & 1 deletion apps/web/src/components/SearchModal/CurrencySearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function CurrencySearch({ currencyField, onCurrencySelect, onDismiss }: C
return
}

showSwapNetworkNotification(chainId, prevChainId)
showSwapNetworkNotification({ chainId, prevChainId })
}, [currentTab, chainId, prevChainId, multichainUXEnabled, showSwapNetworkNotification])

return (
Expand Down
18 changes: 12 additions & 6 deletions apps/web/src/hooks/useShowSwapNetworkNotification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,34 @@ import { useAddPopup, useRemovePopup } from 'state/application/hooks'
import { PopupType } from 'state/application/reducer'
import { SwapTab } from 'uniswap/src/types/screens/interface'

type SwapNetworkNotificationCallbackType = {
chainId?: number // The chainId to show notif for, can be input or output chain
prevChainId?: number // The previous chainId the user was swapping on, not used for bridging notifications
outputChainId?: number // The output chainId the user is swapping to
}

export function useShowSwapNetworkNotification() {
const addPopup = useAddPopup()
const removePopup = useRemovePopup()

return useCallback(
(chainId?: number, prevChainId?: number) => {
if (!chainId || chainId === prevChainId) {
({ chainId, prevChainId, outputChainId }: SwapNetworkNotificationCallbackType) => {
if (!chainId || chainId === prevChainId || chainId === outputChainId) {
return
}
const isBridgeNotification = chainId && prevChainId
const isBridgeNotification = chainId && outputChainId
removePopup(`switchNetwork-${prevChainId}`)
if (isBridgeNotification) {
addPopup(
{
type: PopupType.Bridge,
inputChainId: chainId,
outputChainId: prevChainId,
outputChainId,
},
`bridge-${chainId}-to-${prevChainId}`,
`bridge-${chainId}-to-${outputChainId}`,
3000,
)
} else {
} else if (prevChainId) {
addPopup(
{
type: PopupType.SwitchNetwork,
Expand Down
20 changes: 16 additions & 4 deletions packages/uniswap/src/contexts/UniswapContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ interface UniswapContext {
connector?: Connector
navigateToBuyOrReceiveWithEmptyWallet?: () => void
navigateToFiatOnRamp: (args: { prefilledCurrency?: FiatOnRampCurrency }) => void
onSwapChainsChanged: (inputChainId: UniverseChainId, outputChainId?: UniverseChainId) => void
onSwapChainsChanged: (args: {
chainId: UniverseChainId
prevChainId?: UniverseChainId
outputChainId?: UniverseChainId
}) => void
swapInputChainId?: UniverseChainId
signer: Signer | undefined
useProviderHook: (chainId: number) => JsonRpcProvider | undefined
Expand Down Expand Up @@ -44,9 +48,17 @@ export function UniswapProvider({
account,
connector,
navigateToBuyOrReceiveWithEmptyWallet,
onSwapChainsChanged: (inputChainId: UniverseChainId, outputChanId?: UniverseChainId): void => {
onSwapChainsChanged(inputChainId, outputChanId)
setSwapInputChainId(inputChainId)
onSwapChainsChanged: ({
chainId,
prevChainId,
outputChainId,
}: {
chainId: UniverseChainId
prevChainId?: UniverseChainId
outputChainId?: UniverseChainId
}): void => {
onSwapChainsChanged({ chainId, prevChainId, outputChainId })
setSwapInputChainId(chainId)
},
signer,
useProviderHook,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function useSwapNetworkNotification({

useEffect(() => {
const { inputChainId: lastInputChainId, outputChainId: lastOutputChainId } = lastNetworkNotification.current
const prevChainId = lastInputChainId ?? lastOutputChainId

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

// Determine notification type and trigger
if (inputChainId && outputChainId && inputChainId !== outputChainId) {
onSwapChainsChanged(inputChainId, outputChainId) // Bridging notification
} else if (inputChainId && (hasInputChanged || (hasOutputChanged && inputChainId === outputChainId))) {
onSwapChainsChanged(inputChainId) // Non-bridging notification
onSwapChainsChanged({ chainId: inputChainId, outputChainId }) // Bridging notification
} else if (inputChainId || (outputChainId && prevChainId)) {
const chainId = inputChainId ?? outputChainId
// User is swapping on the same chain, don't show notification
if (!chainId || chainId === prevChainId) {
return
}
onSwapChainsChanged({ chainId, prevChainId }) // Non-bridging notification
}

// Update last notification state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ const HIDE_DELAY = ONE_SECOND_MS * 2
* Shows a network notification for a swap.
* Depending on chain inputs passed, shows a bridging or non-bridging notification.
*/
export function useShowSwapNetworkNotification(): (chainId: UniverseChainId, outputChainId?: UniverseChainId) => void {
export function useShowSwapNetworkNotification(): ({
chainId,
outputChainId,
}: {
chainId: UniverseChainId
outputChainId?: UniverseChainId
}) => void {
const appDispatch = useDispatch()
return useCallback(
(chainId: UniverseChainId, outputChainId?: UniverseChainId) => {
({ chainId, outputChainId }: { chainId: UniverseChainId; outputChainId?: UniverseChainId }) => {
// Output chain should only be passed when bridging
if (outputChainId && chainId !== outputChainId) {
appDispatch(
Expand Down

0 comments on commit e4e4547

Please sign in to comment.