Update resolveMarket with numeric type

This commit is contained in:
James Grugett 2022-05-06 16:33:49 -04:00
parent db2156f6b9
commit ca7e9541d7

View File

@ -45,6 +45,9 @@ export const resolveMarket = functions
outcome !== 'CANCEL'
)
return { status: 'error', message: 'Invalid outcome' }
} else if (outcomeType === 'NUMERIC') {
if (isNaN(+outcome) && outcome !== 'CANCEL')
return { status: 'error', message: 'Invalid outcome' }
} else {
return { status: 'error', message: 'Invalid contract outcomeType' }
}