Skip to content

Commit

Permalink
Fix 0 in answer edit panel
Browse files Browse the repository at this point in the history
  • Loading branch information
sipec committed Jul 31, 2024
1 parent dbb0b69 commit 78d7a91
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions common/src/supabase/contracts.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { chunk, groupBy, mapValues, sortBy } from 'lodash'
import {
millisToTs,
Row,
run,
SupabaseClient,
tsToMillis,
} from './utils'
import { millisToTs, Row, run, SupabaseClient, tsToMillis } from './utils'
import { Contract } from '../contract'
import { Answer } from 'common/answer'
import { Json } from 'common/supabase/schema'
Expand Down Expand Up @@ -147,7 +141,9 @@ export const convertAnswer = (row: Row<'answers'>): Answer => ({

// resolutions
resolution: row.resolution as any,
resolutionTime: row.resolution_time ? tsToMillis(row.resolution_time) : 0,
resolutionTime: row.resolution_time
? tsToMillis(row.resolution_time)
: undefined,
resolutionProbability: row.resolution_probability!,
resolverId: row.resolver_id!,

Expand Down

0 comments on commit 78d7a91

Please sign in to comment.