Portfolio: Consistently filter out contracts you have sold out of.

This commit is contained in:
James Grugett 2022-05-27 15:40:47 -05:00
parent e5ce17c2ad
commit 15d203977a

View File

@ -122,8 +122,7 @@ export function BetsList(props: { user: User }) {
.reverse() .reverse()
.filter(FILTERS[filter]) .filter(FILTERS[filter])
.filter((c) => { .filter((c) => {
if (sort === 'profit') return true // TODO: Expose a user setting to toggle whether to show contracts you sold out of.
// Filter out contracts where you don't have shares anymore. // Filter out contracts where you don't have shares anymore.
const metrics = contractsMetrics[c.id] const metrics = contractsMetrics[c.id]
return metrics.payout > 0 return metrics.payout > 0