Skip to content

Commit 48d760c

Browse files
ci(release): publish latest release
1 parent 1153f60 commit 48d760c

File tree

3 files changed

+29
-67
lines changed

3 files changed

+29
-67
lines changed

RELEASE

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IPFS hash of the deployment:
2-
- CIDv0: `QmQ2hU8vjNncmKCmEU6cU1DNpokWPfMtBRLj9fQpJRzCu2`
3-
- CIDv1: `bafybeiazdyfabltg5ykqliad3cflnjagpxmrkdv2bwagwtbjasovu2uftu`
2+
- CIDv0: `QmbuG2Jv2nvtxg1RbUA8SEh6kb6bzdsGdqEZFBj2SZr11B`
3+
- CIDv1: `bafybeigjqjzaoz33uqg3dcvpmoyi2fwgwxau22tjdrur2gln7f6k3pu5si`
44

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

@@ -10,14 +10,14 @@ 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://bafybeiazdyfabltg5ykqliad3cflnjagpxmrkdv2bwagwtbjasovu2uftu.ipfs.dweb.link/
14-
- [ipfs://QmQ2hU8vjNncmKCmEU6cU1DNpokWPfMtBRLj9fQpJRzCu2/](ipfs://QmQ2hU8vjNncmKCmEU6cU1DNpokWPfMtBRLj9fQpJRzCu2/)
13+
- https://bafybeigjqjzaoz33uqg3dcvpmoyi2fwgwxau22tjdrur2gln7f6k3pu5si.ipfs.dweb.link/
14+
- [ipfs://QmbuG2Jv2nvtxg1RbUA8SEh6kb6bzdsGdqEZFBj2SZr11B/](ipfs://QmbuG2Jv2nvtxg1RbUA8SEh6kb6bzdsGdqEZFBj2SZr11B/)
1515

16-
### 5.74.1 (2025-02-27)
16+
### 5.74.2 (2025-03-05)
1717

1818

1919
### Bug Fixes
2020

21-
* **web:** wait for statsig init to check ff (#16802) af389dd
21+
* **web:** include priority orders in polling [production] (#16944) 0a19865
2222

2323

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web/5.74.1
1+
web/5.74.2

apps/web/src/state/activity/polling/orders.ts

+22-60
Original file line numberDiff line numberDiff line change
@@ -35,39 +35,29 @@ export function getQuickPollingInterval(orderStartTime: number) {
3535
return QUICK_POLL_MAX_INTERVAL
3636
}
3737

38-
function isUniswapXOrder(order: UniswapXOrderDetails): boolean {
39-
return (
40-
order.type === SignatureType.SIGN_UNISWAPX_ORDER ||
41-
order.type === SignatureType.SIGN_UNISWAPX_V2_ORDER ||
42-
order.type === SignatureType.SIGN_UNISWAPX_V3_ORDER
43-
)
44-
}
45-
4638
async function fetchStatuses(
39+
endpoint: 'limit-orders' | 'orders',
4740
orders: UniswapXOrderDetails[],
48-
filter: (order: UniswapXOrderDetails) => boolean,
49-
path: (hashes: string[]) => string,
41+
swapper: string,
5042
): Promise<UniswapXBackendOrder[]> {
51-
const hashes = orders.filter(filter).map((order) => order.orderHash)
52-
if (!hashes || hashes.length === 0) {
43+
const hashes = orders.map((order) => order.orderHash)
44+
if (hashes.length === 0) {
5345
return []
5446
}
55-
const baseURL = UNISWAP_GATEWAY_DNS_URL
56-
const result = await global.fetch(`${baseURL}${path(hashes)}`)
47+
48+
const result = await global.fetch(`${UNISWAP_GATEWAY_DNS_URL}/${endpoint}?swapper=${swapper}&orderHashes=${hashes}`)
5749
const statuses = (await result.json()) as OrderQueryResponse
5850
return statuses.orders
5951
}
6052

6153
async function fetchLimitStatuses(account: string, orders: UniswapXOrderDetails[]): Promise<UniswapXBackendOrder[]> {
62-
return fetchStatuses(
63-
orders,
64-
(order) => order.type === SignatureType.SIGN_LIMIT,
65-
(hashes) => `/limit-orders?swapper=${account}&orderHashes=${hashes}`,
66-
)
54+
const limitOrders = orders.filter((order) => order.type === SignatureType.SIGN_LIMIT)
55+
return fetchStatuses('limit-orders', limitOrders, account)
6756
}
6857

6958
async function fetchOrderStatuses(account: string, orders: UniswapXOrderDetails[]): Promise<UniswapXBackendOrder[]> {
70-
return fetchStatuses(orders, isUniswapXOrder, (hashes) => `/orders?swapper=${account}&orderHashes=${hashes}`)
59+
const uniswapXOrders = orders.filter((order) => order.type !== SignatureType.SIGN_LIMIT)
60+
return fetchStatuses('orders', uniswapXOrders, account)
7161
}
7262

7363
function updateOrders(
@@ -135,31 +125,21 @@ function useQuickPolling({
135125
let timeout: NodeJS.Timeout
136126

137127
async function poll() {
138-
if (!account.address || pendingOrders.length === 0) {
128+
const l2Orders = pendingOrders.filter((order) => isL2ChainId(order.chainId))
129+
if (!account.address || l2Orders.length === 0) {
139130
return
140131
}
141132

142-
const orders = pendingOrders.filter(
143-
(order) =>
144-
(isUniswapXOrder(order) && isL2ChainId(order.chainId)) || order.type === SignatureType.SIGN_PRIORITY_ORDER,
145-
)
146-
if (orders.length === 0) {
147-
return
148-
}
149-
150-
if (orders.every((order) => isFinalizedOrder(order))) {
133+
if (l2Orders.every((order) => isFinalizedOrder(order))) {
151134
clearTimeout(timeout)
152135
return
153136
}
154137

155138
try {
156-
const statuses = await Promise.all([fetchOrderStatuses(account.address, orders.filter(isUniswapXOrder))]).then(
157-
(results) => results.flat(),
158-
)
159-
139+
const statuses = await fetchOrderStatuses(account.address, l2Orders)
160140
updateOrders(pendingOrders, statuses, onActivityUpdate)
161141

162-
const earliestOrder = orders.find((order) => !isFinalizedOrder(order))
142+
const earliestOrder = l2Orders.find((order) => !isFinalizedOrder(order))
163143
if (earliestOrder) {
164144
const newDelay = getQuickPollingInterval(earliestOrder.addedTime)
165145
setDelay(newDelay)
@@ -199,29 +179,20 @@ function useStandardPolling({
199179
let timeout: NodeJS.Timeout
200180

201181
async function poll() {
202-
if (!account.address || pendingOrders.length === 0) {
182+
const mainnetOrders = pendingOrders.filter((order) => !isL2ChainId(order.chainId))
183+
if (!account.address || mainnetOrders.length === 0) {
203184
return
204185
}
205186

206-
const orders = pendingOrders.filter(
207-
(order) => (isUniswapXOrder(order) && !isL2ChainId(order.chainId)) || order.type === SignatureType.SIGN_LIMIT,
208-
)
209-
if (orders.length === 0) {
210-
return
211-
}
212-
213-
if (orders.every((order) => isFinalizedOrder(order))) {
187+
if (mainnetOrders.every((order) => isFinalizedOrder(order))) {
214188
clearTimeout(timeout)
215189
return
216190
}
217191

218192
try {
219193
const statuses = await Promise.all([
220-
fetchOrderStatuses(account.address, orders.filter(isUniswapXOrder)),
221-
fetchLimitStatuses(
222-
account.address,
223-
orders.filter((order) => order.type === SignatureType.SIGN_LIMIT),
224-
),
194+
fetchOrderStatuses(account.address, mainnetOrders),
195+
fetchLimitStatuses(account.address, mainnetOrders),
225196
]).then((results) => results.flat())
226197

227198
updateOrders(pendingOrders, statuses, onActivityUpdate)
@@ -243,17 +214,8 @@ export function usePollPendingOrders(onActivityUpdate: OnActivityUpdate) {
243214
const account = useAccount()
244215
const pendingOrders = usePendingOrders()
245216

246-
useQuickPolling({
247-
account,
248-
pendingOrders,
249-
onActivityUpdate,
250-
})
251-
252-
useStandardPolling({
253-
account,
254-
pendingOrders,
255-
onActivityUpdate,
256-
})
217+
useQuickPolling({ account, pendingOrders, onActivityUpdate })
218+
useStandardPolling({ account, pendingOrders, onActivityUpdate })
257219

258220
return null
259221
}

0 commit comments

Comments
 (0)