remove fees for sold shares

This commit is contained in:
mantikoros 2022-04-22 12:26:47 -05:00
parent 4e4ffe8e20
commit bfbcde4dfc

View File

@ -174,17 +174,19 @@ export function calculateCpmmSale(
throw new Error('Cannot sell non-positive shares')
}
const rawSaleValue = calculateCpmmShareValue(
const saleValue = calculateCpmmShareValue(
contract,
shares,
outcome as 'YES' | 'NO'
)
const { fees, remainingBet: saleValue } = getCpmmLiquidityFee(
contract,
rawSaleValue,
outcome === 'YES' ? 'NO' : 'YES'
)
const fees = noFees
// const { fees, remainingBet: saleValue } = getCpmmLiquidityFee(
// contract,
// rawSaleValue,
// outcome === 'YES' ? 'NO' : 'YES'
// )
const { pool } = contract
const { YES: y, NO: n } = pool