diff --git a/web/components/contracts-list.tsx b/web/components/contracts-list.tsx
index 0246e092..f9e48636 100644
--- a/web/components/contracts-list.tsx
+++ b/web/components/contracts-list.tsx
@@ -219,8 +219,13 @@ export function SearchableGrid(props: {
check(c.creatorUsername)
)
- if (sort === 'newest' || sort === 'resolved' || sort === 'all') {
+ if (sort === 'newest' || sort === 'all') {
matches.sort((a, b) => b.createdTime - a.createdTime)
+ } else if (sort === 'resolved') {
+ matches = _.sortBy(
+ matches,
+ (contract) => -1 * (contract.resolutionTime ?? 0)
+ )
} else if (sort === 'most-traded') {
matches.sort(
(a, b) => contractMetrics(b).truePool - contractMetrics(a).truePool
@@ -266,7 +271,7 @@ export function SearchableGrid(props: {
{sort === 'tag' ? (
- ) : !byOneCreator && (sort === 'creator' || sort === 'resolved') ? (
+ ) : !byOneCreator && sort === 'creator' ? (
) : (