UNPKG

275 BJavaScriptView Raw
1const DEFAULT_CURRENCY_CODE = 'USD';
2
3const getCurrencyCode = cart => {
4 let result;
5
6 try {
7 result = cart.details.currency.quote_currency_code;
8 } catch {
9 result = DEFAULT_CURRENCY_CODE;
10 }
11
12 return result;
13};
14
15export default getCurrencyCode;