From b04597e6cc9e42c741f228048a50321592f1a548 Mon Sep 17 00:00:00 2001 From: CrypticaScriptura <7396812+CrypticaScriptura@users.noreply.github.com> Date: Thu, 19 Oct 2023 14:50:54 -0400 Subject: [PATCH] fix: display XCD, remove non-currencies and filter --- data/currencies.json | 144 ------------------ lib/new-admin/config/index.js | 2 +- .../src/utils/bill-denominations.js | 11 ++ 3 files changed, 12 insertions(+), 145 deletions(-) diff --git a/data/currencies.json b/data/currencies.json index 6261e780..36dd92f5 100644 --- a/data/currencies.json +++ b/data/currencies.json @@ -2420,150 +2420,6 @@ "Fund": "", "": "" }, - { - "ENTITY": "ZZ01_Bond Markets Unit European_EURCO", - "Currency": "Bond Markets Unit European Composite Unit (EURCO)", - "Alphabetic Code": "XBA", - "Numeric Code": 955, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "ZZ02_Bond Markets Unit European_EMU-6", - "Currency": "Bond Markets Unit European Monetary Unit (E.M.U.-6)", - "Alphabetic Code": "XBB", - "Numeric Code": 956, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "ZZ03_Bond Markets Unit European_EUA-9", - "Currency": "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)", - "Alphabetic Code": "XBC", - "Numeric Code": 957, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "ZZ04_Bond Markets Unit European_EUA-17", - "Currency": "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)", - "Alphabetic Code": "XBD", - "Numeric Code": 958, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "ZZ06_Testing_Code", - "Currency": "Codes specifically reserved for testing purposes", - "Alphabetic Code": "XTS", - "Numeric Code": 963, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "ZZ07_No_Currency", - "Currency": "The codes assigned for transactions where no currency is involved", - "Alphabetic Code": "XXX", - "Numeric Code": 999, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "ZZ08_Gold", - "Currency": "Gold", - "Alphabetic Code": "XAU", - "Numeric Code": 959, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "ZZ09_Palladium", - "Currency": "Palladium", - "Alphabetic Code": "XPD", - "Numeric Code": 964, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "ZZ10_Platinum", - "Currency": "Platinum", - "Alphabetic Code": "XPT", - "Numeric Code": 962, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "ZZ11_Silver", - "Currency": "Silver", - "Alphabetic Code": "XAG", - "Numeric Code": 961, - "Minor unit": "N.A.", - "Fund": "", - "": "" - }, - { - "ENTITY": "", - "Currency": "", - "Alphabetic Code": "", - "Numeric Code": "", - "Minor unit": "", - "Fund": "", - "": "" - }, - { - "ENTITY": "", - "Currency": "", - "Alphabetic Code": "", - "Numeric Code": "", - "Minor unit": "", - "Fund": "", - "": "" - }, - { - "ENTITY": "", - "Currency": "", - "Alphabetic Code": "", - "Numeric Code": "", - "Minor unit": "", - "Fund": "", - "": "" - }, - { - "ENTITY": "", - "Currency": "", - "Alphabetic Code": "", - "Numeric Code": "", - "Minor unit": "", - "Fund": "", - "": "" - }, - { - "ENTITY": "", - "Currency": "", - "Alphabetic Code": "", - "Numeric Code": "", - "Minor unit": "", - "Fund": "", - "": "" - }, - { - "ENTITY": "", - "Currency": "", - "Alphabetic Code": "", - "Numeric Code": "", - "Minor unit": "", - "Fund": "", - "": "" - }, { "ENTITY": "", "Currency": "", diff --git a/lib/new-admin/config/index.js b/lib/new-admin/config/index.js index 589de2b4..d64a6246 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 !== '' && r.code[0] !== 'X' && r.display.indexOf('(') === -1) + return raw.filter(r => r.code !== '' && r.display.indexOf('(') === -1) } const mapLanguage = lang => { diff --git a/new-lamassu-admin/src/utils/bill-denominations.js b/new-lamassu-admin/src/utils/bill-denominations.js index a6dda1ea..508a26fd 100644 --- a/new-lamassu-admin/src/utils/bill-denominations.js +++ b/new-lamassu-admin/src/utils/bill-denominations.js @@ -408,6 +408,17 @@ export default { }, polymer: false }, + XCD: { + thickness: 0x0c, + lengths: { + 5: [0x9b, 0x87], + 10: [0x9b, 0x87], + 20: [0x9b, 0x87], + 50: [0x9b, 0x87], + 100: [0x9b, 0x87] + }, + polymer: true + }, ZAR: { thickness: 0x0c, lengths: {