feat: more fields to shopping card

This commit is contained in:
Vlad Stan 2023-07-06 17:19:39 +03:00
parent 21aa44a44f
commit 52c987b88e
3 changed files with 61 additions and 7 deletions

View file

@ -136,4 +136,11 @@ function isValidKey(key, prefix = 'n') {
function isValidKeyHex(key) {
return key?.toLowerCase()?.match(/^[0-9a-f]{64}$/)
}
function formatCurrency(value, currency) {
return new Intl.NumberFormat(window.LOCALE, {
style: 'currency',
currency: currency
}).format(value)
}