track limit orders
This commit is contained in:
		
							parent
							
								
									24896e44b4
								
							
						
					
					
						commit
						dd9fdc381f
					
				|  | @ -54,6 +54,10 @@ export function BetPanel(props: { | ||||||
|   const { sharesOutcome } = useSaveBinaryShares(contract, userBets) |   const { sharesOutcome } = useSaveBinaryShares(contract, userBets) | ||||||
| 
 | 
 | ||||||
|   const [isLimitOrder, setIsLimitOrder] = useState(false) |   const [isLimitOrder, setIsLimitOrder] = useState(false) | ||||||
|  |   const toggleLimitOrder = () => { | ||||||
|  |     setIsLimitOrder(!isLimitOrder) | ||||||
|  |     track('toggle limit order') | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|   return ( |   return ( | ||||||
|     <Col className={className}> |     <Col className={className}> | ||||||
|  | @ -75,7 +79,7 @@ export function BetPanel(props: { | ||||||
|           </div> |           </div> | ||||||
|           <button |           <button | ||||||
|             className="btn btn-ghost btn-sm text-sm normal-case" |             className="btn btn-ghost btn-sm text-sm normal-case" | ||||||
|             onClick={() => setIsLimitOrder(!isLimitOrder)} |             onClick={toggleLimitOrder} | ||||||
|           > |           > | ||||||
|             <SwitchHorizontalIcon className="inline h-6 w-6" /> |             <SwitchHorizontalIcon className="inline h-6 w-6" /> | ||||||
|           </button> |           </button> | ||||||
|  | @ -242,6 +246,8 @@ function BuyPanel(props: { | ||||||
|       contractId: contract.id, |       contractId: contract.id, | ||||||
|       amount: betAmount, |       amount: betAmount, | ||||||
|       outcome: betChoice, |       outcome: betChoice, | ||||||
|  |       isLimitOrder, | ||||||
|  |       limitProb: limitProbScaled, | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user