fixed negative shares bug

This commit is contained in:
mantikoros 2022-05-02 12:16:29 -04:00
parent 6232284e92
commit 43d3662db1

View File

@ -26,10 +26,8 @@ export const useSaveShares = (
_.sumBy(noBets, (bet) => bet.shares), _.sumBy(noBets, (bet) => bet.shares),
] ]
const [yesFloorShares, noFloorShares] = [ const yesFloorShares = Math.round(yesShares) === 0 ? 0 : Math.floor(yesShares)
Math.floor(yesShares), const noFloorShares = Math.round(noShares) === 0 ? 0 : Math.floor(noShares)
Math.floor(noShares),
]
useEffect(() => { useEffect(() => {
// Save yes and no shares to local storage. // Save yes and no shares to local storage.