fix: replace puloon list with F56

This commit is contained in:
Nikola Ubavic 2022-03-09 02:00:16 +01:00
parent 348260931e
commit a9b7221a38
4 changed files with 361 additions and 155 deletions

View file

@ -56,7 +56,7 @@ const Wizard = ({ machine, locale, onClose, save, error }) => {
display: `Cassette ${it}`, display: `Cassette ${it}`,
component: Autocomplete, component: Autocomplete,
inputProps: { inputProps: {
options: R.map(it => ({ code: it, display: it }))(options), options: options,
labelProp: 'display', labelProp: 'display',
valueProp: 'code' valueProp: 'code'
} }

View file

@ -229,9 +229,7 @@ const overrides = (auxData, currency, auxElements) => {
const percentMax = 100 const percentMax = 100
const getSchema = locale => { const getSchema = locale => {
const bills = getBillOptions(locale, denominations).map(it => const bills = getBillOptions(locale, denominations).map(it => it.code)
parseInt(it.code)
)
const highestBill = R.isEmpty(bills) ? CURRENCY_MAX : Math.max(...bills) const highestBill = R.isEmpty(bills) ? CURRENCY_MAX : Math.max(...bills)
return Yup.object().shape({ return Yup.object().shape({

View file

@ -1,189 +1,397 @@
const denomiations = { export default {
AUD: { AED: {
5: 130, thickness: 0x0c,
10: 137, lengths: {
20: 144, 5: [0x99, 0x85],
50: 151, 10: [0x9d, 0x89],
100: 158 20: [0x9f, 0x8b],
50: [0xa1, 0x8d],
100: [0xa5, 0x91],
200: [0xa7, 0x93],
500: [0xa9, 0x95],
1000: [0xad, 0x99]
},
polymer: false
}, },
BBD: { ANG: {
2: 150, thickness: 0x0c,
5: 150, lengths: {
10: 150, 10: [0x98, 0x8e],
20: 150, 25: [0x98, 0x8e],
50: 150, 50: [0x98, 0x8e],
100: 150 100: [0x98, 0x8e]
},
polymer: false
},
AUD: {
thickness: 0x0d,
lengths: {
5: [0x8c, 0x78],
10: [0x93, 0x7f],
20: [0x9a, 0x86],
50: [0xa1, 0x8d],
100: [0xa8, 0x94]
},
polymer: true
},
BGN: {
thickness: 0x0d,
lengths: {
1: [0x75, 0x6b],
2: [0x79, 0x6f],
5: [0x7e, 0x74],
10: [0x83, 0x79],
20: [0x88, 0x7e],
50: [0x8d, 0x83],
100: [0x92, 0x88]
},
polymer: false
}, },
CAD: { CAD: {
5: 152, thickness: 0x0d,
10: 152, lengths: {
20: 152, 5: [0xa2, 0x8e],
50: 152, 10: [0xa2, 0x8e],
100: 152 20: [0xa2, 0x8e],
50: [0xa2, 0x8e],
100: [0xa2, 0x8e]
},
polymer: true
}, },
CHF: { CHF: {
10: 126, thickness: 0x0d,
20: 137, lengths: {
50: 148, 10: [0x85, 0x71],
100: 159, 20: [0x8c, 0x78],
200: 170, 50: [0x93, 0x7f],
1000: 181 100: [0x9a, 0x86],
200: [0xa1, 0x8d],
1000: [0xa8, 0x94]
},
polymer: false
}, },
DKK: { CNY: {
50: 125, thickness: 0x0d,
100: 135, lengths: {
200: 145, 1: [0x8c, 0x78],
500: 155, 5: [0x91, 0x7d],
1000: 165 10: [0x96, 0x82],
20: [0x9b, 0x87],
50: [0xa0, 0x8c],
100: [0x91, 0xa5]
},
polymer: false
},
COP: {
thickness: 0x0d,
lengths: {
2000: [0x8a, 0x76],
5000: [0x8f, 0x7b],
10000: [0x94, 0x80],
20000: [0x99, 0x85],
50000: [0x9e, 0x8a],
100000: [0xa3, 0x8f]
},
polymer: false
},
CZK: {
thickness: 0x0c,
lengths: {
100: [0x96, 0x82],
200: [0x9c, 0x88],
500: [0xa2, 0x8e],
1000: [0xa8, 0x94],
2000: [0xae, 0x9a],
5000: [0xb4, 0xa0]
},
polymer: false
}, },
EUR: { EUR: {
5: 120, thickness: 0x0c,
10: 127, lengths: {
20: 133, 5: [0x82, 0x6e],
50: 140, 10: [0x89, 0x75],
100: 147, 20: [0x8f, 0x7b],
200: 153, 50: [0x96, 0x82],
500: 160 100: [0x9d, 0x89],
200: [0xa3, 0x8f],
500: [0xaa, 0x96]
},
polymer: false
}, },
GBP: { GBP: {
5: 135, thickness: 0x0d,
10: 142, lengths: {
20: 149, 5: [0x91, 0x7d],
50: 156 10: [0x98, 0x84],
20: [0x95, 0x81],
50: [0xa6, 0x92]
},
polymer: true
},
GHS: {
thickness: 0x0c,
lengths: {
1: [0x93, 0x7f],
2: [0x96, 0x82],
5: [0x97, 0x83],
10: [0x9b, 0x87],
20: [0x9f, 0x8b],
50: [0xa3, 0x8f]
},
polymer: false
},
GIP: {
thickness: 0x0c,
lengths: {
5: [0x8a, 0x80],
10: [0x92, 0x88],
20: [0x9b, 0x91],
50: [0xa2, 0x98],
100: [0xa9, 0x9f]
},
polymer: false
},
GTQ: {
thickness: 0x0c,
lengths: {
1: [0xa0, 0x96],
5: [0xa0, 0x96],
10: [0xa0, 0x96],
20: [0xa0, 0x96],
50: [0xa0, 0x96],
100: [0xa1, 0x97],
200: [0xa0, 0x96]
},
polymer: true
}, },
HKD: { HKD: {
10: 134, thickness: 0x0d,
20: 143, lengths: {
50: 148, 10: [0x90, 0x7c],
100: 153, 20: [0x99, 0x85],
500: 158, 50: [0x9e, 0x8a],
1000: 163 100: [0xa3, 0x8f],
500: [0xa8, 0x94],
1000: [0xae, 0x9a]
},
polymer: false
}, },
HUF: { HNL: {
200: 154, thickness: 0x0c,
500: 154, lengths: {
1000: 154, 1: [0xa6, 0x92],
2000: 154, 2: [0xa6, 0x92],
5000: 154, 5: [0xa6, 0x92],
10000: 154, 10: [0xa6, 0x92],
20000: 154 20: [0xa6, 0x92],
50: [0xa6, 0x92],
100: [0xa6, 0x92],
200: [0xa6, 0x92],
500: [0xa6, 0x92]
},
polymer: false
},
HRK: {
thickness: 0x0c,
lengths: {
5: [0x7f, 0x75],
10: [0x83, 0x79],
20: [0x87, 0x7d],
50: [0x8b, 0x81],
100: [0x8f, 0x85],
200: [0x93, 0x89],
500: [0x97, 0x8d],
1000: [0x9b, 0x91]
},
polymer: false
}, },
ILS: { ILS: {
20: 129, thickness: 0x0d,
50: 136, lengths: {
100: 143, 20: [0x8b, 0x77],
200: 150 50: [0x92, 0x7e],
}, 100: [0x99, 0x85],
JMD: { 200: [0xa0, 0x8c]
50: 145, },
100: 145, polymer: false
500: 145,
1000: 145,
5000: 145
}, },
JPY: { JPY: {
1000: 150, thickness: 0x0d,
2000: 154, lengths: {
5000: 156, 1000: [0x99, 0x93],
10000: 160 2000: [0x9c, 0x98],
5000: [0x9d, 0x9a],
10000: [0xa3, 0x9e]
},
polymer: false
}, },
KZT: { KRW: {
200: 126, thickness: 0x0d,
500: 130, lengths: {
1000: 134, 1000: [0x92, 0x7e],
2000: 139, 2000: [0x96, 0x82],
5000: 144, 5000: [0x98, 0x84],
10000: 155, 10000: [0x9e, 0x8a],
20000: 155 50000: [0xa4, 0x90]
},
polymer: false
},
MDL: {
thickness: 0x0c,
lengths: {
1: [0x7c, 0x6e],
5: [0x7c, 0x6e],
10: [0x83, 0x6f],
20: [0x83, 0x6f],
50: [0x83, 0x6f],
100: [0x83, 0x6f],
200: [0x8f, 0x7b],
500: [0x8f, 0x7b],
1000: [0x8f, 0x7b]
},
polymer: false
}, },
MXN: { MXN: {
20: 120, thickness: 0x0c,
50: 127, lengths: {
100: 134, 20: [0x7d, 0x73],
200: 141, 50: [0x82, 0x78],
500: 148, 100: [0x89, 0x7f],
1000: 155 200: [0x90, 0x86],
500: [0x97, 0x8d],
1000: [0x9e, 0x94]
},
polymer: true
}, },
MYR: { MYR: {
1: 120, thickness: 0x0c,
5: 135, lengths: {
10: 140, 1: [0x82, 0x6e],
20: 145, 5: [0x91, 0x7d],
50: 145, 10: [0x96, 0x82],
100: 150 20: [0x9b, 0x87],
50: [0x9b, 0x87],
100: [0xa0, 0x8c]
},
polymer: false
},
NAD: {
thickness: 0x0c,
lengths: {
10: [0x86, 0x7c],
20: [0x8b, 0x81],
50: [0x91, 0x87],
100: [0x97, 0x8d],
200: [0x9d, 0x93]
},
polymer: false
}, },
NZD: { NZD: {
5: 135, thickness: 0x0c,
10: 140, lengths: {
20: 145, 5: [0x8c, 0x82],
50: 150, 10: [0x91, 0x87],
100: 155 20: [0x96, 0x8c],
50: [0x9b, 0x91],
100: [0xa0, 0x96]
},
polymer: true
}, },
PHP: { PHP: {
20: 160, thickness: 0x0c,
50: 160, lengths: {
100: 160, 20: [0xaa, 0x96],
200: 160, 100: [0xaa, 0x96],
500: 160, 200: [0xaa, 0x96],
1000: 160 500: [0xaa, 0x96],
1000: [0xaa, 0x96]
},
polymer: false
}, },
PLN: { PLN: {
10: 120, thickness: 0x0c,
20: 126, lengths: {
50: 132, 10: [0x7d, 0x73],
100: 138, 20: [0x83, 0x79],
200: 144, 50: [0x89, 0x7f],
500: 150 100: [0x8f, 0x85],
200: [0x95, 0x8b],
500: [0x9b, 0x91]
},
polymer: false
},
RON: {
thickness: 0x0c,
lengths: {
1: [0x82, 0x6e],
5: [0x89, 0x75],
10: [0x8f, 0x7b],
50: [0x96, 0x82],
100: [0x9d, 0x89],
200: [0xa0, 0x8c],
500: [0xa3, 0x8f]
},
polymer: true
}, },
SGD: { SGD: {
2: 126, thickness: 0x0c,
5: 133, lengths: {
10: 141, 2: [0x88, 0x74],
50: 156, 5: [0x8f, 0x7b],
100: 162, 10: [0x97, 0x83],
1000: 170 50: [0xa6, 0x92],
100: [0xac, 0x98],
1000: [0xb4, 0xa0]
},
polymer: false
}, },
TWD: { TWD: {
100: 145, thickness: 0x0d,
200: 150, lengths: {
500: 155, 100: [0x9b, 0x87],
1000: 160, 200: [0xa0, 0x8c],
2000: 165 500: [0xa5, 0x91],
}, 1000: [0xaa, 0x96],
UAH: { 2000: [0xaf, 0x9b]
1: 118, },
2: 118, polymer: false
5: 118,
10: 124,
20: 130,
50: 136,
100: 142,
200: 148,
500: 154
}, },
USD: { USD: {
1: 156, thickness: 0x0d,
5: 156, lengths: {
10: 156, 1: [0xa6, 0x92],
20: 156, 2: [0xa6, 0x92],
50: 156, 5: [0xa6, 0x92],
100: 156 10: [0xa6, 0x92],
20: [0xa6, 0x92],
50: [0xa6, 0x92],
100: [0xa6, 0x92]
},
polymer: false
}, },
VND: { UYU: {
10000: 132, thickness: 0x0d,
20000: 136, lengths: {
50000: 140, 20: [0xa4, 0x9a],
100000: 144, 50: [0x96, 0x8c],
200000: 148, 100: [0xa4, 0x9a],
500000: 152 200: [0xa4, 0x9a],
500: [0xa4, 0x9a],
1000: [0xa4, 0x9a],
2000: [0xa4, 0x9a]
},
polymer: false
}, },
ZAR: { ZAR: {
10: 128, thickness: 0x0c,
20: 134, lengths: {
50: 140, 10: [0x8a, 0x76],
100: 146, 20: [0x90, 0x7c],
200: 152 50: [0x96, 0x82],
100: [0x9c, 0x88],
200: [0xa2, 0x8e]
},
polymer: false
} }
} }
export default denomiations

View file

@ -5,7 +5,7 @@ const getBillOptions = R.curry((locale, denomiations) => {
return R.compose( return R.compose(
R.map(code => ({ code: parseInt(code), display: code })), R.map(code => ({ code: parseInt(code), display: code })),
R.keys, R.keys,
R.path([currency]) R.path([currency, 'lengths'])
)(denomiations) )(denomiations)
}) })