fix: moved coin filter from the front-end to the server

This commit is contained in:
Liordino Neto 2020-10-07 18:20:43 -03:00 committed by Josh Harvey
parent 9577d3548e
commit d065baeda9
3 changed files with 3 additions and 3 deletions

View file

@ -136,7 +136,7 @@ function massageCurrencies (currencies) {
const codeToRec = code => _.find(_.matchesProperty('code', code), mapped)
const top5 = _.map(codeToRec, top5Codes)
const raw = _.uniqBy(_.get('code'), _.concat(top5, mapped))
return raw.filter(r => r.code[0] !== 'X' && r.display.indexOf('(') === -1)
return raw.filter(r => r.code !== '' && r.code[0] !== 'X' && r.display.indexOf('(') === -1)
}
const mapLanguage = lang => {

View file

@ -17,7 +17,7 @@ function massageCurrencies (currencies) {
const codeToRec = code => _.find(_.matchesProperty('code', code), mapped)
const top5 = _.map(codeToRec, top5Codes)
const raw = _.uniqBy(_.get('code'), _.concat(top5, mapped))
return raw.filter(r => r.code[0] !== 'X' && r.display.indexOf('(') === -1)
return raw.filter(r => r.code !== '' && r.code[0] !== 'X' && r.display.indexOf('(') === -1)
}
const mapLanguage = lang => {

View file

@ -73,7 +73,7 @@ const allFields = (getData, auxElements = []) => {
view: getView(currencyData, 'code'),
input: Autocomplete,
inputProps: {
options: currencyData?.filter(c => c.code !== ''),
options: currencyData,
valueProp: 'code',
getLabel: R.path(['code'])
}