ci(release): publish latest release

parent 1153f602
IPFS hash of the deployment: IPFS hash of the deployment:
- CIDv0: `QmQ2hU8vjNncmKCmEU6cU1DNpokWPfMtBRLj9fQpJRzCu2` - CIDv0: `QmbuG2Jv2nvtxg1RbUA8SEh6kb6bzdsGdqEZFBj2SZr11B`
- CIDv1: `bafybeiazdyfabltg5ykqliad3cflnjagpxmrkdv2bwagwtbjasovu2uftu` - CIDv1: `bafybeigjqjzaoz33uqg3dcvpmoyi2fwgwxau22tjdrur2gln7f6k3pu5si`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org). The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
...@@ -10,14 +10,14 @@ You can also access the Uniswap Interface from an IPFS gateway. ...@@ -10,14 +10,14 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs. Your Uniswap settings are never remembered across different URLs.
IPFS gateways: IPFS gateways:
- https://bafybeiazdyfabltg5ykqliad3cflnjagpxmrkdv2bwagwtbjasovu2uftu.ipfs.dweb.link/ - https://bafybeigjqjzaoz33uqg3dcvpmoyi2fwgwxau22tjdrur2gln7f6k3pu5si.ipfs.dweb.link/
- [ipfs://QmQ2hU8vjNncmKCmEU6cU1DNpokWPfMtBRLj9fQpJRzCu2/](ipfs://QmQ2hU8vjNncmKCmEU6cU1DNpokWPfMtBRLj9fQpJRzCu2/) - [ipfs://QmbuG2Jv2nvtxg1RbUA8SEh6kb6bzdsGdqEZFBj2SZr11B/](ipfs://QmbuG2Jv2nvtxg1RbUA8SEh6kb6bzdsGdqEZFBj2SZr11B/)
### 5.74.1 (2025-02-27) ### 5.74.2 (2025-03-05)
### Bug Fixes ### Bug Fixes
* **web:** wait for statsig init to check ff (#16802) af389dd * **web:** include priority orders in polling [production] (#16944) 0a19865
web/5.74.1 web/5.74.2
\ No newline at end of file \ No newline at end of file
...@@ -35,39 +35,29 @@ export function getQuickPollingInterval(orderStartTime: number) { ...@@ -35,39 +35,29 @@ export function getQuickPollingInterval(orderStartTime: number) {
return QUICK_POLL_MAX_INTERVAL return QUICK_POLL_MAX_INTERVAL
} }
function isUniswapXOrder(order: UniswapXOrderDetails): boolean {
return (
order.type === SignatureType.SIGN_UNISWAPX_ORDER ||
order.type === SignatureType.SIGN_UNISWAPX_V2_ORDER ||
order.type === SignatureType.SIGN_UNISWAPX_V3_ORDER
)
}
async function fetchStatuses( async function fetchStatuses(
endpoint: 'limit-orders' | 'orders',
orders: UniswapXOrderDetails[], orders: UniswapXOrderDetails[],
filter: (order: UniswapXOrderDetails) => boolean, swapper: string,
path: (hashes: string[]) => string,
): Promise<UniswapXBackendOrder[]> { ): Promise<UniswapXBackendOrder[]> {
const hashes = orders.filter(filter).map((order) => order.orderHash) const hashes = orders.map((order) => order.orderHash)
if (!hashes || hashes.length === 0) { if (hashes.length === 0) {
return [] return []
} }
const baseURL = UNISWAP_GATEWAY_DNS_URL
const result = await global.fetch(`${baseURL}${path(hashes)}`) const result = await global.fetch(`${UNISWAP_GATEWAY_DNS_URL}/${endpoint}?swapper=${swapper}&orderHashes=${hashes}`)
const statuses = (await result.json()) as OrderQueryResponse const statuses = (await result.json()) as OrderQueryResponse
return statuses.orders return statuses.orders
} }
async function fetchLimitStatuses(account: string, orders: UniswapXOrderDetails[]): Promise<UniswapXBackendOrder[]> { async function fetchLimitStatuses(account: string, orders: UniswapXOrderDetails[]): Promise<UniswapXBackendOrder[]> {
return fetchStatuses( const limitOrders = orders.filter((order) => order.type === SignatureType.SIGN_LIMIT)
orders, return fetchStatuses('limit-orders', limitOrders, account)
(order) => order.type === SignatureType.SIGN_LIMIT,
(hashes) => `/limit-orders?swapper=${account}&orderHashes=${hashes}`,
)
} }
async function fetchOrderStatuses(account: string, orders: UniswapXOrderDetails[]): Promise<UniswapXBackendOrder[]> { async function fetchOrderStatuses(account: string, orders: UniswapXOrderDetails[]): Promise<UniswapXBackendOrder[]> {
return fetchStatuses(orders, isUniswapXOrder, (hashes) => `/orders?swapper=${account}&orderHashes=${hashes}`) const uniswapXOrders = orders.filter((order) => order.type !== SignatureType.SIGN_LIMIT)
return fetchStatuses('orders', uniswapXOrders, account)
} }
function updateOrders( function updateOrders(
...@@ -135,31 +125,21 @@ function useQuickPolling({ ...@@ -135,31 +125,21 @@ function useQuickPolling({
let timeout: NodeJS.Timeout let timeout: NodeJS.Timeout
async function poll() { async function poll() {
if (!account.address || pendingOrders.length === 0) { const l2Orders = pendingOrders.filter((order) => isL2ChainId(order.chainId))
if (!account.address || l2Orders.length === 0) {
return return
} }
const orders = pendingOrders.filter( if (l2Orders.every((order) => isFinalizedOrder(order))) {
(order) =>
(isUniswapXOrder(order) && isL2ChainId(order.chainId)) || order.type === SignatureType.SIGN_PRIORITY_ORDER,
)
if (orders.length === 0) {
return
}
if (orders.every((order) => isFinalizedOrder(order))) {
clearTimeout(timeout) clearTimeout(timeout)
return return
} }
try { try {
const statuses = await Promise.all([fetchOrderStatuses(account.address, orders.filter(isUniswapXOrder))]).then( const statuses = await fetchOrderStatuses(account.address, l2Orders)
(results) => results.flat(),
)
updateOrders(pendingOrders, statuses, onActivityUpdate) updateOrders(pendingOrders, statuses, onActivityUpdate)
const earliestOrder = orders.find((order) => !isFinalizedOrder(order)) const earliestOrder = l2Orders.find((order) => !isFinalizedOrder(order))
if (earliestOrder) { if (earliestOrder) {
const newDelay = getQuickPollingInterval(earliestOrder.addedTime) const newDelay = getQuickPollingInterval(earliestOrder.addedTime)
setDelay(newDelay) setDelay(newDelay)
...@@ -199,29 +179,20 @@ function useStandardPolling({ ...@@ -199,29 +179,20 @@ function useStandardPolling({
let timeout: NodeJS.Timeout let timeout: NodeJS.Timeout
async function poll() { async function poll() {
if (!account.address || pendingOrders.length === 0) { const mainnetOrders = pendingOrders.filter((order) => !isL2ChainId(order.chainId))
if (!account.address || mainnetOrders.length === 0) {
return return
} }
const orders = pendingOrders.filter( if (mainnetOrders.every((order) => isFinalizedOrder(order))) {
(order) => (isUniswapXOrder(order) && !isL2ChainId(order.chainId)) || order.type === SignatureType.SIGN_LIMIT,
)
if (orders.length === 0) {
return
}
if (orders.every((order) => isFinalizedOrder(order))) {
clearTimeout(timeout) clearTimeout(timeout)
return return
} }
try { try {
const statuses = await Promise.all([ const statuses = await Promise.all([
fetchOrderStatuses(account.address, orders.filter(isUniswapXOrder)), fetchOrderStatuses(account.address, mainnetOrders),
fetchLimitStatuses( fetchLimitStatuses(account.address, mainnetOrders),
account.address,
orders.filter((order) => order.type === SignatureType.SIGN_LIMIT),
),
]).then((results) => results.flat()) ]).then((results) => results.flat())
updateOrders(pendingOrders, statuses, onActivityUpdate) updateOrders(pendingOrders, statuses, onActivityUpdate)
...@@ -243,17 +214,8 @@ export function usePollPendingOrders(onActivityUpdate: OnActivityUpdate) { ...@@ -243,17 +214,8 @@ export function usePollPendingOrders(onActivityUpdate: OnActivityUpdate) {
const account = useAccount() const account = useAccount()
const pendingOrders = usePendingOrders() const pendingOrders = usePendingOrders()
useQuickPolling({ useQuickPolling({ account, pendingOrders, onActivityUpdate })
account, useStandardPolling({ account, pendingOrders, onActivityUpdate })
pendingOrders,
onActivityUpdate,
})
useStandardPolling({
account,
pendingOrders,
onActivityUpdate,
})
return null return null
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment