From 1bba368f093e541bad75b5c5de1788308eb6d22b Mon Sep 17 00:00:00 2001 From: max Date: Wed, 7 Aug 2019 01:33:58 +0300 Subject: [PATCH 1/3] Add Source Sans font to import --- public/index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/index.html b/public/index.html index bbfcd5e0c..c7f3e2054 100644 --- a/public/index.html +++ b/public/index.html @@ -20,6 +20,12 @@ integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous" /> + + + Plasma Burner Date: Wed, 7 Aug 2019 01:35:34 +0300 Subject: [PATCH 2/3] Refactor currencyDisplay use. Slightly adjust styles --- src/components/SimpleBalance.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/SimpleBalance.js b/src/components/SimpleBalance.js index ad98817dd..7ce5b5aca 100644 --- a/src/components/SimpleBalance.js +++ b/src/components/SimpleBalance.js @@ -16,7 +16,8 @@ const StyledBalance = styled.div` } span { - font-size: 200%; + font-size: 2.5em; + font-weight: 700; } .integer { @@ -49,14 +50,11 @@ export default ({ mainAmount, otherAmounts, currencyDisplay }) => { (acc, curr) => acc + parseInt(curr, 10), 0 ); - const parts = currencyDisplay(mainAmount, true); return ( <> - {parts.map(({ type, value }) => ( - {value} - ))} + {currencyDisplay(mainAmount)} {otherAssetsTotal > 0 && ( +{currencyDisplay(otherAssetsTotal)} in other assets From 0e51aa85934fd16429132d1e071b2a41d2fed975 Mon Sep 17 00:00:00 2001 From: max Date: Wed, 7 Aug 2019 01:36:14 +0300 Subject: [PATCH 3/3] Remove toParts portion of function, since it's not supported in Safari --- src/App.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 59acfa880..96314f3a6 100644 --- a/src/App.js +++ b/src/App.js @@ -161,7 +161,7 @@ export default class App extends Component { // NOTE: This function is for _displaying_ a currency value to a user. It // adds a currency unit to the beginning or end of the number! - currencyDisplay(amount, toParts=false, convert=true) { + currencyDisplay(amount, convert=true) { const { account } = this.state; const locale = getStoredValue('i18nextLng'); const symbol = getStoredValue('currency', account) || CONFIG.CURRENCY.DEFAULT_CURRENCY; @@ -175,7 +175,8 @@ export default class App extends Component { currency: symbol, maximumFractionDigits: 2 }); - return toParts ? formatter.formatToParts(amount) : formatter.format(amount); + + return formatter.format(amount); } /*