Skip to content

Commit

Permalink
fix: dont crash app processing error responses in limit orders list q…
Browse files Browse the repository at this point in the history
…uery
  • Loading branch information
woodenfurniture committed Jan 13, 2025
1 parent c351ae7 commit 556468b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { AccountId } from '@shapeshiftoss/caip'
import { fromAccountId } from '@shapeshiftoss/caip'
import { assertGetCowNetwork, getCowNetwork } from '@shapeshiftoss/swapper'
import type { Order } from '@shapeshiftoss/types'
import { isSome } from '@shapeshiftoss/utils'
import { useQueries } from '@tanstack/react-query'
import axios from 'axios'
import { getConfig } from 'config'
Expand Down Expand Up @@ -52,7 +53,7 @@ export const useGetLimitOrdersQuery = () => {
})),
combine: queries =>
mergeQueryOutputs(queries, results =>
orderBy(results.flat(), ({ order }) => order.creationDate, 'desc'),
orderBy(results.flat().filter(isSome), ({ order }) => order.creationDate, 'desc'),
),
})

Expand Down

0 comments on commit 556468b

Please sign in to comment.