fix: features filter

This commit is contained in:
DomWane 2024-10-02 15:08:47 +02:00
parent 7d2d9a4292
commit 96687973bd

View file

@ -159,9 +159,23 @@ export const useData = defineStore('data', () => {
} }
if (selectedFeature) { if (selectedFeature) {
const features = project.technology?.features?.map(f => f.toLowerCase()) || [] switch (selectedFeature) {
if (!features.includes(selectedFeature)) case 'no-compliance':
return false return project.compliance ? false : true
case 'non-kyc':
return project.tracebility?.kyc ? false : true
case 'private-by-default':
return project.default_privacy
case 'non-custodial':
return project.blockchain_features?.asset_custody_type === 'non-custody'
case 'opensource':
return project.blockchain_features?.opensource
case 'live-on-mainnet':
return project.project_phase === 'mainnet'
}
// const features = project.technology?.features?.map(f => f.toLowerCase()) || []
// if (!features.includes(selectedFeature))
// return false
} }
return true return true