From 371c152cfbed21e053c8c653624ad32a474d9f09 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Thu, 21 Jun 2018 15:26:21 -0500 Subject: [PATCH] feat(channels): remove hardcode currency name in channel balance and replace with dynamic currency name --- app/components/Contacts/Network.js | 10 +++++++--- app/routes/app/containers/AppContainer.js | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/components/Contacts/Network.js b/app/components/Contacts/Network.js index 88fb996d..44995839 100644 --- a/app/components/Contacts/Network.js +++ b/app/components/Contacts/Network.js @@ -57,7 +57,9 @@ class Network extends Component { suggestedNodesProps, - network + network, + + currencyName } = this.props const refreshClicked = () => { @@ -151,7 +153,7 @@ class Network extends Component {

My Network

- {btc.satoshisToBtc(balance.channelBalance)}BTC ≈ ${usdAmount + {btc.satoshisToBtc(balance.channelBalance)} {currencyName} ≈ ${usdAmount ? usdAmount.toLocaleString() : ''} @@ -357,7 +359,9 @@ Network.propTypes = { changeFilter: PropTypes.func.isRequired, updateChannelSearchQuery: PropTypes.func.isRequired, setSelectedChannel: PropTypes.func.isRequired, - closeChannel: PropTypes.func.isRequired + closeChannel: PropTypes.func.isRequired, + + closeChannel: PropTypes.string.isRequired } export default Network diff --git a/app/routes/app/containers/AppContainer.js b/app/routes/app/containers/AppContainer.js index 7c15c267..98c5ee67 100644 --- a/app/routes/app/containers/AppContainer.js +++ b/app/routes/app/containers/AppContainer.js @@ -313,6 +313,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { nonActiveFilters: stateProps.nonActiveFilters, ticker: stateProps.ticker, network: stateProps.info.network, + currencyName: stateProps.currencyName, fetchChannels: dispatchProps.fetchChannels, openContactsForm: dispatchProps.openContactsForm,