diff --git a/src/components/MultiHopTrade/components/LimitOrder/hooks/useGetLimitOrdersForAccountQuery.tsx b/src/components/MultiHopTrade/components/LimitOrder/hooks/useGetLimitOrdersForAccountQuery.tsx index 1114338b965..75c0c4ae5e2 100644 --- a/src/components/MultiHopTrade/components/LimitOrder/hooks/useGetLimitOrdersForAccountQuery.tsx +++ b/src/components/MultiHopTrade/components/LimitOrder/hooks/useGetLimitOrdersForAccountQuery.tsx @@ -5,6 +5,7 @@ import type { Order } from '@shapeshiftoss/types' import { useQueries } from '@tanstack/react-query' import axios from 'axios' import { getConfig } from 'config' +import orderBy from 'lodash/orderBy' import { useCallback } from 'react' import { mergeQueryOutputs } from 'react-queries/helpers' import { selectEvmAccountIds } from 'state/slices/common-selectors' @@ -49,7 +50,10 @@ export const useGetLimitOrdersQuery = () => { queryFn: getQueryFn(accountId), refetchInterval: 15_000, })), - combine: queries => mergeQueryOutputs(queries, results => results.flat()), + combine: queries => + mergeQueryOutputs(queries, results => + orderBy(results.flat(), ({ order }) => order.creationDate, 'desc'), + ), }) return customTokenQueries