diff --git a/.env b/.env index 792892f..81430f7 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ NODE_ENV=development BTC_API_URL=http://insight.bitcoin.com/api -BCC_API_URL=http://cashexplorer.bitcoin.com/api +BCH_API_URL=http://cashexplorer.bitcoin.com/api diff --git a/app/chains/selectors.js b/app/chains/selectors.js index 67618b7..427d7bf 100644 --- a/app/chains/selectors.js +++ b/app/chains/selectors.js @@ -1,6 +1,6 @@ import { getChainPreference } from '~/preferences/selectors'; -export const DEFAULT_CHAIN = 'bcc'; +export const DEFAULT_CHAIN = 'bch'; export const getChain = (state, txid) => { const chainName = getChainPreference(state) || DEFAULT_CHAIN; diff --git a/app/core/components/Header/NavField.js b/app/core/components/Header/NavField.js index 8137a27..b41805c 100644 --- a/app/core/components/Header/NavField.js +++ b/app/core/components/Header/NavField.js @@ -181,7 +181,7 @@ export default class NavField extends React.Component { } } .button :global(.caret path) { - fill: ${getPrimaryColor("bcc")}; + fill: ${getPrimaryColor("bch")}; } .button :global(.caret[data-chain="btc"] path) { fill: ${getPrimaryColor("btc")}; diff --git a/app/core/components/Header/index.js b/app/core/components/Header/index.js index c91c883..f94cd51 100644 --- a/app/core/components/Header/index.js +++ b/app/core/components/Header/index.js @@ -4,7 +4,7 @@ import ClickOutside from 'react-click-outside'; import SettingsIcon from '~/ui/images/settings.svg'; import LogomarkIcon from '~/core/images/logos/logomark.svg'; -import BccLogotextIcon from '~/core/images/logos/bcc-logotext.svg'; +import BchLogotextIcon from '~/core/images/logos/bch-logotext.svg'; import BtcLogotextIcon from '~/core/images/logos/btc-logotext.svg'; import { getPrimaryColor, getHeaderTextColor } from '~/ui/colors'; @@ -57,7 +57,7 @@ class Header extends React.Component { const { chain } = this.props; const { showNav } = this.state; - const LogotextIcon = (chain == "btc") ? BtcLogotextIcon : BccLogotextIcon; + const LogotextIcon = (chain == "btc") ? BtcLogotextIcon : BchLogotextIcon; return (
@@ -135,12 +135,12 @@ class Header extends React.Component { stroke: none; fill: ${getPrimaryColor("btc")}; } - .logo-container :global(.logomark[data-chain="bcc"] path) { - stroke: ${getPrimaryColor("bcc")}; + .logo-container :global(.logomark[data-chain="bch"] path) { + stroke: ${getPrimaryColor("bch")}; } - .logo-container :global(.logomark[data-chain="bcc"] path:last-child) { + .logo-container :global(.logomark[data-chain="bch"] path:last-child) { stroke: none; - fill: ${getPrimaryColor("bcc")}; + fill: ${getPrimaryColor("bch")}; } .logo-container :global(.logotext) { margin-left: 20px; @@ -149,8 +149,8 @@ class Header extends React.Component { .logo-container :global(.logotext[data-chain="btc"] path) { fill: ${getPrimaryColor("btc")}; } - .logo-container :global(.logotext[data-chain="bcc"] path) { - fill: ${getPrimaryColor("bcc")}; + .logo-container :global(.logotext[data-chain="bch"] path) { + fill: ${getPrimaryColor("bch")}; } .settings-btn { diff --git a/app/core/components/Money.js b/app/core/components/Money.js index 0652080..87f573a 100644 --- a/app/core/components/Money.js +++ b/app/core/components/Money.js @@ -8,9 +8,9 @@ import { setCurrency } from '~/preferences/actions'; Decimal.set({ precision: 8, rounding: 8 }); const getValueInBTC = (chain, amount, rates) => { - const BCH_TO_BTC_RATE = rates.filter(rateObj => rateObj.code === "BCC")[0].rate; + const BCH_TO_BTC_RATE = rates.filter(rateObj => rateObj.code === "BCH")[0].rate; - return (chain === "bcc") ? (amount * BCH_TO_BTC_RATE) : amount; + return (chain === "bch") ? (amount * BCH_TO_BTC_RATE) : amount; }; const getValueInCurrency = (chain, currency, amount, rates) => { @@ -22,7 +22,7 @@ const getValueInCurrency = (chain, currency, amount, rates) => { })[0]; // Since we only have the BCH_TO_BTC rate, we need to reverse it if we want BTC_TO_BCH - const toMultiplier = (toRateObj.code === "BCC") ? (1 / toRateObj.rate) : toRateObj.rate; + const toMultiplier = (toRateObj.code === "BCH") ? (1 / toRateObj.rate) : toRateObj.rate; return valueInBTC * toMultiplier; }; diff --git a/app/core/fetch.js b/app/core/fetch.js index 18b4d40..c4a4b32 100644 --- a/app/core/fetch.js +++ b/app/core/fetch.js @@ -1,13 +1,13 @@ import fetch from 'isomorphic-fetch'; const BTC_API_URL = process.env.BTC_API_URL; -const BCC_API_URL = process.env.BCC_API_URL; +const BCH_API_URL = process.env.BCH_API_URL; const isNode = (typeof window === 'undefined'); -const getDomain = (chain = 'bcc') => { +const getDomain = (chain = 'bch') => { if (isNode) { - return (chain === "btc") ? BTC_API_URL : BCC_API_URL; + return (chain === "btc") ? BTC_API_URL : BCH_API_URL; } else { return `/${chain}/api`; } diff --git a/app/core/images/bcc.svg b/app/core/images/bcc.svg deleted file mode 100644 index 8e90f39..0000000 --- a/app/core/images/bcc.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - btc-icon - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file diff --git a/app/core/images/bch.svg b/app/core/images/bch.svg new file mode 100644 index 0000000..e3f56d0 --- /dev/null +++ b/app/core/images/bch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/core/images/block.svg b/app/core/images/block.svg index 48dcb5b..01b22cd 100644 --- a/app/core/images/block.svg +++ b/app/core/images/block.svg @@ -1,27 +1 @@ - - - - block-icon - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/core/images/btc.svg b/app/core/images/btc.svg index ddd3305..c8b1233 100644 --- a/app/core/images/btc.svg +++ b/app/core/images/btc.svg @@ -1,21 +1 @@ - - - - Bitcoin - Created with Sketch. - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/core/images/logos/bcc-logotext.svg b/app/core/images/logos/bcc-logotext.svg deleted file mode 100644 index 1b47835..0000000 --- a/app/core/images/logos/bcc-logotext.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - type (outlines) - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file diff --git a/app/core/images/logos/bcc-logotype.svg b/app/core/images/logos/bcc-logotype.svg deleted file mode 100644 index f17cacb..0000000 --- a/app/core/images/logos/bcc-logotype.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - logotype - Created with Sketch. - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/core/images/logos/bch-logotext.svg b/app/core/images/logos/bch-logotext.svg new file mode 100644 index 0000000..5e6faf1 --- /dev/null +++ b/app/core/images/logos/bch-logotext.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/core/images/logos/bch-logotype.svg b/app/core/images/logos/bch-logotype.svg new file mode 100644 index 0000000..59fc1e5 --- /dev/null +++ b/app/core/images/logos/bch-logotype.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/core/images/logos/btc-logotext.svg b/app/core/images/logos/btc-logotext.svg index 923101f..68048df 100644 --- a/app/core/images/logos/btc-logotext.svg +++ b/app/core/images/logos/btc-logotext.svg @@ -1,16 +1 @@ - - - - type (text) - Created with Sketch. - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/core/images/logos/btc-logotype.svg b/app/core/images/logos/btc-logotype.svg index 186047b..d262f97 100644 --- a/app/core/images/logos/btc-logotype.svg +++ b/app/core/images/logos/btc-logotype.svg @@ -1,17 +1 @@ - - - - btc-logotype - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/core/images/logos/logomark.svg b/app/core/images/logos/logomark.svg index ab42070..b57032f 100644 --- a/app/core/images/logos/logomark.svg +++ b/app/core/images/logos/logomark.svg @@ -1,18 +1 @@ - - - - logomark - Created with Sketch. - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/core/images/transaction.svg b/app/core/images/transaction.svg index 8d57f5b..aa2b626 100644 --- a/app/core/images/transaction.svg +++ b/app/core/images/transaction.svg @@ -1,12 +1 @@ - - - - transaction - Created with Sketch. - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/core/links/IndexLink.js b/app/core/links/IndexLink.js index a5878ef..bd2f74f 100644 --- a/app/core/links/IndexLink.js +++ b/app/core/links/IndexLink.js @@ -2,7 +2,7 @@ import Link from 'next/link'; import { connect } from 'react-redux'; const getReverseChain = (chain) => { - return (chain === "btc") ? "bcc" : "btc"; + return (chain === "btc") ? "bch" : "btc"; } const TxLink = ({ chain, reverse, children, style }) => { diff --git a/app/core/utils/money.js b/app/core/utils/money.js index ae86881..55ad537 100644 --- a/app/core/utils/money.js +++ b/app/core/utils/money.js @@ -1,3 +1,3 @@ export const isCurrencyCrypto = (currency) => ( - (currency === "bcc" || currency === "btc") + (currency === "bch" || currency === "btc") ) diff --git a/app/data/store.js b/app/data/store.js index 55b7c5f..bfc67ba 100644 --- a/app/data/store.js +++ b/app/data/store.js @@ -13,8 +13,8 @@ const DEFAULT_LANGUAGE = 'en'; const INITIAL_STATE = { preferences: { - chain: "bcc", - currency: "bcc", + chain: "bch", + currency: "bch", }, i18n: { locale: DEFAULT_LANGUAGE, diff --git a/app/index/components/Logotype.js b/app/index/components/Logotype.js index 2cfc88a..770070f 100644 --- a/app/index/components/Logotype.js +++ b/app/index/components/Logotype.js @@ -1,4 +1,4 @@ -import BccLogotypeIcon from '~/core/images/logos/bcc-logotype.svg'; +import BchLogotypeIcon from '~/core/images/logos/bch-logotype.svg'; import BtcLogotypeIcon from '~/core/images/logos/btc-logotype.svg'; import { getPrimaryColor } from '~/ui/colors'; @@ -6,7 +6,7 @@ import { getPrimaryColor } from '~/ui/colors'; const getLogotype = (chain) => { return (chain == "btc") ? BtcLogotypeIcon - : BccLogotypeIcon; + : BchLogotypeIcon; } const Logotype = ({ @@ -32,8 +32,8 @@ const Logotype = ({ .logo-container[data-chain="btc"] :global(svg g) { fill: ${getPrimaryColor("btc")}; } - .logo-container[data-chain="bcc"] :global(svg g) { - fill: ${getPrimaryColor("bcc")}; + .logo-container[data-chain="bch"] :global(svg g) { + fill: ${getPrimaryColor("bch")}; } `} diff --git a/app/preferences/options/chains.js b/app/preferences/options/chains.js index f952dc1..bda29bd 100644 --- a/app/preferences/options/chains.js +++ b/app/preferences/options/chains.js @@ -1,11 +1,11 @@ -import BCCIcon from '~/core/images/bcc.svg'; +import BCHIcon from '~/core/images/bch.svg'; import BTCIcon from '~/core/images/btc.svg'; export default [ { name: 'Bitcoin Cash', - code: 'bcc', - symbol: , + code: 'bch', + symbol: , }, { name: 'Bitcoin Legacy', diff --git a/app/preferences/options/currencies.js b/app/preferences/options/currencies.js index 09c26bc..9cd9a85 100644 --- a/app/preferences/options/currencies.js +++ b/app/preferences/options/currencies.js @@ -1,7 +1,7 @@ export default [ { name: 'Bitcoin Cash', - code: 'bcc', + code: 'bch', symbol: '₿', }, { @@ -22,7 +22,7 @@ export default [ ]; export const defaultChainCurrencies = { - bcc: 'bcc', + bch: 'bch', btc: 'btc', } diff --git a/app/tx/components/AmountBadge.js b/app/tx/components/AmountBadge.js index c16002a..1728202 100644 --- a/app/tx/components/AmountBadge.js +++ b/app/tx/components/AmountBadge.js @@ -1,11 +1,11 @@ import { moneyColor } from '~/ui/colors'; -import BCCIcon from '~/core/images/bcc.svg'; +import BCHIcon from '~/core/images/bch.svg'; import Money from '~/core/components/Money'; const AmountBadge = ({ amount, currency, style }) => (
- { {
( `rgba(72, 87, 103, ${opacity})` ) -const getBccHeaderTextColor = (opacity) => ( +const getBchHeaderTextColor = (opacity) => ( `rgba(74, 59, 20, ${opacity})` ) export const getHeaderTextColor = (opacity, chain) => ( (chain === "btc") ? getBtcHeaderTextColor(opacity) - : getBccHeaderTextColor(opacity) + : getBchHeaderTextColor(opacity) ) -export const getPrimaryColor = (chain = "bcc", opacity = 1) => { +export const getPrimaryColor = (chain = "bch", opacity = 1) => { switch (chain) { case "btc": // Blue: //return `rgba(48,112,171,${opacity})`; return `rgba(120, 163, 204, ${opacity})`; - case "bcc": + case "bch": default: // Orange: return `rgba(247,180,11,${opacity})`; } } -export const getLinkColor = (chain = "bcc") => ( +export const getLinkColor = (chain = "bch") => ( (chain === "btc") ? '#6297bf' : "#fdb300" ) diff --git a/app/ui/components/Toggle.js b/app/ui/components/Toggle.js index 4a91a39..6a224de 100644 --- a/app/ui/components/Toggle.js +++ b/app/ui/components/Toggle.js @@ -53,7 +53,7 @@ const Toggle = ({ } .toggle-container :global(.react-toggle--checked:not(.react-toggle--disabled) .react-toggle-track), .toggle-container :global(.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track) { - background-color: ${getPrimaryColor("bcc")}; + background-color: ${getPrimaryColor("bch")}; } .toggle-container[data-chain="btc"] :global(.react-toggle--checked:not(.react-toggle--disabled) .react-toggle-track), .toggle-container[data-chain="btc"] :global(.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track) { diff --git a/app/ui/images/arrow.svg b/app/ui/images/arrow.svg index 9240110..47a9675 100644 --- a/app/ui/images/arrow.svg +++ b/app/ui/images/arrow.svg @@ -1,25 +1 @@ - - - - arrow - Created with Sketch. - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/ui/images/caret.svg b/app/ui/images/caret.svg index 06fee22..5cf1f3a 100644 --- a/app/ui/images/caret.svg +++ b/app/ui/images/caret.svg @@ -1,12 +1 @@ - - - - caret - Created with Sketch. - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/ui/images/check.svg b/app/ui/images/check.svg index a10746e..7d39038 100644 --- a/app/ui/images/check.svg +++ b/app/ui/images/check.svg @@ -1,12 +1 @@ - - - - Path - Created with Sketch. - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/ui/images/checkmark.svg b/app/ui/images/checkmark.svg index 40aa2a0..41160b6 100644 --- a/app/ui/images/checkmark.svg +++ b/app/ui/images/checkmark.svg @@ -1,12 +1 @@ - - - - confirmation - Created with Sketch. - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/ui/images/clock.svg b/app/ui/images/clock.svg index f5423d4..75b2eee 100644 --- a/app/ui/images/clock.svg +++ b/app/ui/images/clock.svg @@ -1,18 +1 @@ - - - - clock - Created with Sketch. - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/ui/images/close.svg b/app/ui/images/close.svg index 7a8fa72..8d78e0c 100644 --- a/app/ui/images/close.svg +++ b/app/ui/images/close.svg @@ -1,14 +1 @@ - - - - close - Created with Sketch. - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/ui/images/copy.svg b/app/ui/images/copy.svg index 322dfb5..9edf6a9 100644 --- a/app/ui/images/copy.svg +++ b/app/ui/images/copy.svg @@ -1,23 +1 @@ - - - - copy - Created with Sketch. - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/ui/images/search.svg b/app/ui/images/search.svg index b3c878d..78521c3 100644 --- a/app/ui/images/search.svg +++ b/app/ui/images/search.svg @@ -1,18 +1 @@ - - - - search - Created with Sketch. - - - - - - - - - - - - - + \ No newline at end of file diff --git a/app/ui/images/settings.svg b/app/ui/images/settings.svg index 7001049..14d386f 100644 --- a/app/ui/images/settings.svg +++ b/app/ui/images/settings.svg @@ -1,12 +1 @@ - - - - settings - Created with Sketch. - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/package.json b/package.json index 8525753..4fc9f99 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "node server.js", "build": "node_modules/.bin/next build", - "start": "NODE_ENV=production BTC_API_URL=https://insight.bitcoin.com/api BCC_API_URL=https://cashexplorer.bitcoin.com/api node --max_old_space_size=2000 --expose-gc server.js" + "start": "NODE_ENV=production BTC_API_URL=https://insight.bitcoin.com/api BCH_API_URL=https://cashexplorer.bitcoin.com/api node --max_old_space_size=2000 --expose-gc server.js" }, "author": "", "license": "ISC", diff --git a/pages/_document.js b/pages/_document.js index b030a5f..cb65e4b 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -23,7 +23,7 @@ export default class NextDocument extends Document { var BitcoinMenuLang = "en"; ` }} /> - + diff --git a/pages/_error.js b/pages/_error.js index 30456e4..70ad7e1 100644 --- a/pages/_error.js +++ b/pages/_error.js @@ -23,7 +23,7 @@ const redirectToChain = (chain, { pathname, query, asPath }) => { } const ErrorPage = ({ resource, error, chain, router }) => { - const oppositeChain = (chain === "btc") ? "bcc" : "btc"; + const oppositeChain = (chain === "btc") ? "bch" : "btc"; return (