Portfolio: Consistently filter out contracts you have sold out of.
This commit is contained in:
parent
e5ce17c2ad
commit
15d203977a
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user