Merge pull request #279 from pablodip/currency-filter-or

Currency filter should use OR
This commit is contained in:
P 2018-02-15 08:39:34 +01:00 committed by GitHub
commit 88016a2ad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,10 +87,12 @@
::bounty-filter-type.category ::bounty-filter-type-category|multiple-dynamic-options
::bounty-filter-type.re-frame-subs-key-for-options :commiteth.subscriptions/open-bounties-currencies
::bounty-filter-type.predicate (fn [filter-value bounty]
(and (or (not-any? #{"ETH"} filter-value)
(or (and (contains? #{"ETH"} filter-value)
(< 0 (:balance-eth bounty)))
(set/subset? (->> filter-value (remove #{"ETH"}) set)
(-> bounty :tokens keys set))))}
(not-empty
(set/intersection
(->> filter-value (remove #{"ETH"}) set)
(-> bounty :tokens keys set)))))}
::bounty-filter-type|date
{::bounty-filter-type.name "Date"