fixed negative shares bug
This commit is contained in:
parent
6232284e92
commit
43d3662db1
|
@ -26,10 +26,8 @@ export const useSaveShares = (
|
|||
_.sumBy(noBets, (bet) => bet.shares),
|
||||
]
|
||||
|
||||
const [yesFloorShares, noFloorShares] = [
|
||||
Math.floor(yesShares),
|
||||
Math.floor(noShares),
|
||||
]
|
||||
const yesFloorShares = Math.round(yesShares) === 0 ? 0 : Math.floor(yesShares)
|
||||
const noFloorShares = Math.round(noShares) === 0 ? 0 : Math.floor(noShares)
|
||||
|
||||
useEffect(() => {
|
||||
// Save yes and no shares to local storage.
|
||||
|
|
Loading…
Reference in New Issue
Block a user