Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed to BCH symbols, added SRI hash to JS, and optimized SVG's #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion app/chains/selectors.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/core/components/Header/NavField.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")};
Expand Down
16 changes: 8 additions & 8 deletions app/core/components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 (
<header>
Expand Down Expand Up @@ -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;
Expand All @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions app/core/components/Money.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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;
};
Expand Down
6 changes: 3 additions & 3 deletions app/core/fetch.js
Original file line number Diff line number Diff line change
@@ -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`;
}
Expand Down
17 changes: 0 additions & 17 deletions app/core/images/bcc.svg

This file was deleted.

1 change: 1 addition & 0 deletions app/core/images/bch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 1 addition & 27 deletions app/core/images/block.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 1 addition & 21 deletions app/core/images/btc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading