diff --git a/app/connectors/cryptocompare/api.js b/app/connectors/cryptocompare/api.js index 1f3e32eb..bd992b6b 100644 --- a/app/connectors/cryptocompare/api.js +++ b/app/connectors/cryptocompare/api.js @@ -98,6 +98,7 @@ export function getSymbolListApi() { 'USD', 'GBP', 'BTC', + 'ETH', ], }); } diff --git a/app/helpers/formatPrice.js b/app/helpers/formatPrice.js index 7c3a65a5..8cd18e7e 100644 --- a/app/helpers/formatPrice.js +++ b/app/helpers/formatPrice.js @@ -1,10 +1,18 @@ +import { has } from 'lodash'; + function formatPrice(price, currency) { const symbols = { USD: '$', EUR: '€', GBP: '£', + BTC: '฿', + ETH: 'Ξ', }; + if (!has(symbols, currency)) { + return `${currency} ${price}`; + } + return `${symbols[currency]}${price}`; } diff --git a/app/package.json b/app/package.json index e5d028e2..ba557da6 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "CoinWatch", "productName": "CoinWatch", - "version": "0.2.1", + "version": "0.2.2", "description": "Electron application boilerplate based on React, React Router, Webpack, React Hot Loader for rapid application development", "main": "./main.prod.js", "author": { diff --git a/package.json b/package.json index a6030269..b530f17b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coinwatch", "productName": "CoinWatch", - "version": "0.2.1", + "version": "0.2.2", "description": "Follow your cryptocurrencies from your Osx menubar", "scripts": { "build": "concurrently \"npm run build-main\" \"npm run build-renderer\"", diff --git a/yarn.lock b/yarn.lock index 6ef199f5..aff8e3ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1963,7 +1963,7 @@ buffers@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb" -builder-util-runtime@2.5.0, builder-util-runtime@^2.5.0, builder-util-runtime@~2.5.0: +builder-util-runtime@2.5.0, builder-util-runtime@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-2.5.0.tgz#22373d4faab8d89e0b077630aef76538deb38476" dependencies: @@ -1972,6 +1972,15 @@ builder-util-runtime@2.5.0, builder-util-runtime@^2.5.0, builder-util-runtime@~2 fs-extra-p "^4.4.4" sax "^1.2.4" +builder-util-runtime@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-3.1.0.tgz#60ec66d3c49f028655230a09d7767e77ff6f15b8" + dependencies: + bluebird-lst "^1.0.5" + debug "^3.1.0" + fs-extra-p "^4.4.4" + sax "^1.2.4" + builder-util@3.2.0, builder-util@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-3.2.0.tgz#08900f046c6b09c22a1f235f18644ae9eb963bc4" @@ -3323,8 +3332,8 @@ electron-publish@19.43.0: mime "^2.0.3" electron-settings@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/electron-settings/-/electron-settings-3.1.3.tgz#4e26fac0587ab74472dae56ab7c7b867f5c6fa54" + version "3.1.4" + resolved "https://registry.yarnpkg.com/electron-settings/-/electron-settings-3.1.4.tgz#1b670837fd00626395714210291fb4af8ff52880" dependencies: clone "^2.1.1" jsonfile "^4.0.0" @@ -3338,11 +3347,11 @@ electron-to-chromium@^1.3.24: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.25.tgz#453b21009836d0997d86035601ff6cae4791c460" electron-updater@^2.15.0: - version "2.15.1" - resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-2.15.1.tgz#9cd218d5960b4e36b2528e92aff102d05911f9ae" + version "2.16.1" + resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-2.16.1.tgz#29e85589ec31ae817ca05bcaf10358bd66119188" dependencies: bluebird-lst "^1.0.5" - builder-util-runtime "~2.5.0" + builder-util-runtime "~3.1.0" electron-is-dev "^0.3.0" fs-extra-p "^4.4.4" js-yaml "^3.10.0" @@ -4796,26 +4805,6 @@ highlight.js@^9.3.0: version "9.12.0" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e" -history@^4.5.1: - version "4.6.3" - resolved "https://registry.yarnpkg.com/history/-/history-4.6.3.tgz#6d723a8712c581d6bef37e8c26f4aedc6eb86967" - dependencies: - invariant "^2.2.1" - loose-envify "^1.2.0" - resolve-pathname "^2.0.0" - value-equal "^0.2.0" - warning "^3.0.0" - -history@^4.6.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/history/-/history-4.6.1.tgz#911cf8eb65728555a94f2b12780a0c531a14d2fd" - dependencies: - invariant "^2.2.1" - loose-envify "^1.2.0" - resolve-pathname "^2.0.0" - value-equal "^0.2.0" - warning "^3.0.0" - history@^4.7.2: version "4.7.2" resolved "https://registry.yarnpkg.com/history/-/history-4.7.2.tgz#22b5c7f31633c5b8021c7f4a8a954ac139ee8d5b" @@ -4842,10 +4831,6 @@ hoek@4.x.x: version "4.2.0" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" -hoist-non-react-statics@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" - hoist-non-react-statics@^2.2.1, hoist-non-react-statics@^2.3.0, hoist-non-react-statics@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0" @@ -7201,7 +7186,7 @@ path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" -path-to-regexp@^1.5.3, path-to-regexp@^1.7.0: +path-to-regexp@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" dependencies: @@ -7999,24 +7984,12 @@ react-router-dom@^4.2.2: warning "^3.0.0" react-router-redux@^5.0.0-alpha.6: - version "5.0.0-alpha.6" - resolved "https://registry.yarnpkg.com/react-router-redux/-/react-router-redux-5.0.0-alpha.6.tgz#7418663c2ecd3c51be856fcf28f3d1deecc1a576" + version "5.0.0-alpha.8" + resolved "https://registry.yarnpkg.com/react-router-redux/-/react-router-redux-5.0.0-alpha.8.tgz#5242c705730b2ac862aff7a8e90f870d0cf45e12" dependencies: - history "^4.5.1" - prop-types "^15.5.4" - react-router "^4.1.1" - -react-router@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.1.1.tgz#d448f3b7c1b429a6fbb03395099949c606b1fe95" - dependencies: - history "^4.6.0" - hoist-non-react-statics "^1.2.0" - invariant "^2.2.2" - loose-envify "^1.3.1" - path-to-regexp "^1.5.3" - prop-types "^15.5.4" - warning "^3.0.0" + history "^4.7.2" + prop-types "^15.6.0" + react-router "^4.2.0" react-router@^4.2.0: version "4.2.0" @@ -8468,10 +8441,6 @@ resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" -resolve-pathname@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.1.0.tgz#e8358801b86b83b17560d4e3c382d7aef2100944" - resolve-pathname@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" @@ -9929,10 +9898,6 @@ validator@~7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/validator/-/validator-7.0.0.tgz#c74deb8063512fac35547938e6f0b1504a282fd2" -value-equal@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.2.1.tgz#c220a304361fce6994dbbedaa3c7e1a1b895871d" - value-equal@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7"