diff --git a/common/calculate-cpmm.ts b/common/calculate-cpmm.ts index d36d2f21..4c0d30eb 100644 --- a/common/calculate-cpmm.ts +++ b/common/calculate-cpmm.ts @@ -172,7 +172,7 @@ export function calculateCpmmSale( shares: number, outcome: string ) { - if (shares < 0) { + if (Math.round(shares) < 0) { throw new Error('Cannot sell non-positive shares') }