diff --git a/lib/admin/config.js b/lib/admin/config.js index ca10ab3e..716b3eed 100644 --- a/lib/admin/config.js +++ b/lib/admin/config.js @@ -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 => { diff --git a/lib/new-admin/config/index.js b/lib/new-admin/config/index.js index 45ff7b63..3ca48355 100644 --- a/lib/new-admin/config/index.js +++ b/lib/new-admin/config/index.js @@ -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 => { diff --git a/new-lamassu-admin/src/pages/Locales/helper.js b/new-lamassu-admin/src/pages/Locales/helper.js index 8f015757..2688045a 100644 --- a/new-lamassu-admin/src/pages/Locales/helper.js +++ b/new-lamassu-admin/src/pages/Locales/helper.js @@ -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']) }