Skip to content

Commit

Permalink
Merge pull request #768 from juanky201271/dev_history_filter_amount_g…
Browse files Browse the repository at this point in the history
…reater_than_zero

History screen filter with funds estrictly > 0
  • Loading branch information
juanky201271 authored Feb 7, 2025
2 parents 24cf975 + 6b21183 commit ee37f35
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/History/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,9 @@ const History: React.FunctionComponent<HistoryProps> = ({
if (!valueTransfers) {
return [] as ValueTransferType[];
}
// strictly show VT's with some amount on it.
return valueTransfers
.filter((vt: ValueTransferType) =>
filter === FilterEnum.withFunds
? vt.amount > Utils.parseStringLocaleToNumberFloat(Utils.getZenniesDonationAmount())
: true,
)
.filter((vt: ValueTransferType) => (filter === FilterEnum.withFunds ? vt.amount > 0 : true))
.slice(0, numVt);
}, [valueTransfers, numVt, filter]);

Expand Down

0 comments on commit ee37f35

Please sign in to comment.