diff --git a/src/app/components/Balance.jsx b/src/app/components/Balance.jsx index 6016272..12019c9 100644 --- a/src/app/components/Balance.jsx +++ b/src/app/components/Balance.jsx @@ -5,7 +5,6 @@ import { AppContext } from '../store/createContext' import { cryptoFormatter } from '../../utils' import './Balance.css' import { fadeIn } from './Animations' -import { cryptoFormatter } from '../../utils' const Animation = posed.h1(fadeIn) diff --git a/src/app/components/Ticker.jsx b/src/app/components/Ticker.jsx index a2eb431..88ea657 100644 --- a/src/app/components/Ticker.jsx +++ b/src/app/components/Ticker.jsx @@ -4,7 +4,6 @@ import { AppContext } from '../store/createContext' import { cryptoFormatter } from '../../utils' import './Ticker.css' import { fadeIn } from './Animations' -import { cryptoFormatter } from '../../utils' const Item = posed.div(fadeIn) diff --git a/src/utils.js b/src/utils.js index c4d5a7b..5515a21 100644 --- a/src/utils.js +++ b/src/utils.js @@ -15,7 +15,7 @@ const rgbaToHex = color => { } const locale = - typeof navigator !== 'undefined' ? navigator.language : app.getLocale() + typeof navigator !== 'undefined' ? navigator.language : () => app.getLocale() // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat const numberFormatter = value => @@ -39,7 +39,7 @@ const cryptoFormatter = (value, currency) => { if (currency === 'ocean') { return formatOcean(value) } else { - return formatCurrency(value, currency.toUpperCase(), locale.split('-')[0]) + return formatCurrency(value, currency.toUpperCase(), locale) .replace(/BTC/, 'Ƀ') .replace(/ETH/, 'Ξ') }