redemption for pseudo numeric markets
This commit is contained in:
parent
f45d7f2913
commit
301d9d8538
|
@ -16,7 +16,11 @@ export const redeemShares = async (userId: string, contractId: string) => {
|
|||
return { status: 'error', message: 'Invalid contract' }
|
||||
|
||||
const contract = contractSnap.data() as Contract
|
||||
if (contract.outcomeType !== 'BINARY' || contract.mechanism !== 'cpmm-1')
|
||||
const { mechanism, outcomeType } = contract
|
||||
if (
|
||||
!(outcomeType === 'BINARY' || outcomeType === 'PSEUDO_NUMERIC') ||
|
||||
mechanism !== 'cpmm-1'
|
||||
)
|
||||
return { status: 'success' }
|
||||
|
||||
const betsSnap = await transaction.get(
|
||||
|
|
Loading…
Reference in New Issue
Block a user