@celo/base
Advanced tools
Comparing version 1.2.1 to 1.2.2-beta
export declare enum CURRENCY_ENUM { | ||
GOLD = "Celo Gold", | ||
DOLLAR = "Celo Dollar" | ||
DOLLAR = "Celo Dollar", | ||
EURO = "Celo Euro" | ||
} | ||
@@ -17,3 +18,4 @@ interface Currency { | ||
DOLLAR = "dollar", | ||
GOLD = "gold" | ||
GOLD = "gold", | ||
EURO = "euro" | ||
} | ||
@@ -23,3 +25,4 @@ export declare const currencyToShortMap: { | ||
"Celo Gold": SHORT_CURRENCIES; | ||
"Celo Euro": SHORT_CURRENCIES; | ||
}; | ||
export {}; |
@@ -8,2 +8,3 @@ "use strict"; | ||
CURRENCY_ENUM["DOLLAR"] = "Celo Dollar"; | ||
CURRENCY_ENUM["EURO"] = "Celo Euro"; | ||
})(CURRENCY_ENUM = exports.CURRENCY_ENUM || (exports.CURRENCY_ENUM = {})); | ||
@@ -21,2 +22,7 @@ exports.CURRENCIES = (_a = {}, | ||
}, | ||
_a[CURRENCY_ENUM.EURO] = { | ||
symbol: '€', | ||
code: 'cEUR', | ||
displayDecimals: 2, | ||
}, | ||
_a); | ||
@@ -27,2 +33,5 @@ exports.resolveCurrency = function (label) { | ||
} | ||
else if (label && label.toLowerCase().includes('euro')) { | ||
return CURRENCY_ENUM.EURO; | ||
} | ||
else if (label && label.toLowerCase().includes('gold')) { | ||
@@ -40,2 +49,3 @@ return CURRENCY_ENUM.GOLD; | ||
SHORT_CURRENCIES["GOLD"] = "gold"; | ||
SHORT_CURRENCIES["EURO"] = "euro"; | ||
})(SHORT_CURRENCIES = exports.SHORT_CURRENCIES || (exports.SHORT_CURRENCIES = {})); | ||
@@ -45,3 +55,4 @@ exports.currencyToShortMap = (_b = {}, | ||
_b[CURRENCY_ENUM.GOLD] = SHORT_CURRENCIES.GOLD, | ||
_b[CURRENCY_ENUM.EURO] = SHORT_CURRENCIES.EURO, | ||
_b); | ||
//# sourceMappingURL=currencies.js.map |
{ | ||
"name": "@celo/base", | ||
"version": "1.2.1", | ||
"version": "1.2.2-beta", | ||
"description": "Celo base common utils, no dependencies", | ||
@@ -5,0 +5,0 @@ "author": "Celo", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
190663
2918
2