restricted automatic resolution to binary markets
This commit is contained in:
		
							parent
							
								
									45d7bdd0cd
								
							
						
					
					
						commit
						831591b080
					
				|  | @ -97,6 +97,7 @@ export function NewContract(props: { question: string; tag?: string }) { | ||||||
|   const [isSubmitting, setIsSubmitting] = useState(false) |   const [isSubmitting, setIsSubmitting] = useState(false) | ||||||
| 
 | 
 | ||||||
|   const closeTime = closeDate ? dayjs(closeDate).valueOf() : undefined |   const closeTime = closeDate ? dayjs(closeDate).valueOf() : undefined | ||||||
|  |   const resolutionTime = resolutionDate ? dayjs(resolutionDate).valueOf() : undefined | ||||||
| 
 | 
 | ||||||
|   const balance = creator?.balance || 0 |   const balance = creator?.balance || 0 | ||||||
| 
 | 
 | ||||||
|  | @ -152,6 +153,8 @@ export function NewContract(props: { question: string; tag?: string }) { | ||||||
|           tags: category ? [category] : undefined, |           tags: category ? [category] : undefined, | ||||||
|           min, |           min, | ||||||
|           max, |           max, | ||||||
|  |           automaticResolution, | ||||||
|  |           resolutionTime | ||||||
|         }) |         }) | ||||||
|       ) |       ) | ||||||
|       await router.push(contractPath(result as Contract)) |       await router.push(contractPath(result as Contract)) | ||||||
|  | @ -372,6 +375,8 @@ export function NewContract(props: { question: string; tag?: string }) { | ||||||
|         )} |         )} | ||||||
|       </div> |       </div> | ||||||
| 
 | 
 | ||||||
|  |       {outcomeType === 'BINARY' && ( | ||||||
|  |         <div> | ||||||
|           <Spacer h={4} /> |           <Spacer h={4} /> | ||||||
|           <div className="form-control mb-1 items-start"> |           <div className="form-control mb-1 items-start"> | ||||||
|             <label className="label mt-1 gap-2"> |             <label className="label mt-1 gap-2"> | ||||||
|  | @ -405,12 +410,13 @@ export function NewContract(props: { question: string; tag?: string }) { | ||||||
|                 <span className="label-text">Combined (experimental)</span> |                 <span className="label-text">Combined (experimental)</span> | ||||||
|               </label> |               </label> | ||||||
|             </Row> |             </Row> | ||||||
|  |           </div> | ||||||
| 
 | 
 | ||||||
|           {resolutionType === 'COMBINED' && ( |           {resolutionType === 'COMBINED' && ( | ||||||
|             <div className="form-control mb-1 items-start"> |             <div className="form-control mb-1 items-start"> | ||||||
|               <label className="label mb-1 gap-2"> |               <label className="label mb-1 gap-2"> | ||||||
|                 <span>Question resolves automatically as:</span> |                 <span>Question resolves automatically as:</span> | ||||||
|               <InfoTooltip text="The market will be resolved as ... on this date (local timezone)." /> |                 <InfoTooltip text="The market will be resolved automatically on this date (local timezone)." /> | ||||||
|               </label> |               </label> | ||||||
|               <Row className={'w-full items-center gap-2'}> |               <Row className={'w-full items-center gap-2'}> | ||||||
|                 <ChoicesToggleGroup |                 <ChoicesToggleGroup | ||||||
|  | @ -436,8 +442,9 @@ export function NewContract(props: { question: string; tag?: string }) { | ||||||
|               /> |               /> | ||||||
|             </div> |             </div> | ||||||
|           )} |           )} | ||||||
| 
 |  | ||||||
|         </div> |         </div> | ||||||
|  |       )} | ||||||
|  | 
 | ||||||
|       <Spacer h={4} /> |       <Spacer h={4} /> | ||||||
| 
 | 
 | ||||||
|       <div className="form-control mb-1 items-start"> |       <div className="form-control mb-1 items-start"> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user