diff --git a/CHANGELOG.md b/CHANGELOG.md index 260e44fd1d1..0ac57b9233b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). * Add keyboard shortcut to quit the app on Windows ([#1202](https://github.com/lbryio/lbry-app/pull/1202)) * Build for both architectures (x86 and x64) for Windows ([#1262](https://github.com/lbryio/lbry-app/pull/1262)) * Add referral FAQ to Invites screen([#1314](https://github.com/lbryio/lbry-app/pull/1314)) + * Show exact wallet balance on mouse hover over ([#1305](https://github.com/lbryio/lbry-app/pull/1305)) ### Fixed * Black screen on macOS after maximizing LBRY and then closing ([#1235](https://github.com/lbryio/lbry-app/pull/1235)) diff --git a/src/renderer/component/header/index.js b/src/renderer/component/header/index.js index 073d0d2eb97..b10483149f3 100644 --- a/src/renderer/component/header/index.js +++ b/src/renderer/component/header/index.js @@ -1,22 +1,21 @@ import { connect } from 'react-redux'; +import { doDownloadUpgradeRequested } from 'redux/actions/app'; import { doNavigate } from 'redux/actions/navigation'; import { selectIsUpgradeAvailable, selectAutoUpdateDownloaded } from 'redux/selectors/app'; -import { formatCredits } from 'util/formatCredits'; import { selectBalance } from 'redux/selectors/wallet'; +import { formatCredits } from 'util/formatCredits'; import Header from './view'; -import { doDownloadUpgradeRequested } from 'redux/actions/app'; const select = state => ({ - isUpgradeAvailable: selectIsUpgradeAvailable(state), autoUpdateDownloaded: selectAutoUpdateDownloaded(state), - balance: formatCredits(selectBalance(state) || 0, 2), + balance: selectBalance(state), + isUpgradeAvailable: selectIsUpgradeAvailable(state), + roundedBalance: formatCredits(selectBalance(state) || 0, 2), }); const perform = dispatch => ({ - navigate: path => dispatch(doNavigate(path)), - back: () => dispatch(doHistoryBack()), - forward: () => dispatch(doHistoryForward()), downloadUpgradeRequested: () => dispatch(doDownloadUpgradeRequested()), + navigate: path => dispatch(doNavigate(path)), }); export default connect(select, perform)(Header); diff --git a/src/renderer/component/header/view.jsx b/src/renderer/component/header/view.jsx index e081e2139c8..b31441addf9 100644 --- a/src/renderer/component/header/view.jsx +++ b/src/renderer/component/header/view.jsx @@ -5,20 +5,22 @@ import WunderBar from 'component/wunderbar'; import * as icons from 'constants/icons'; type Props = { + autoUpdateDownloaded: boolean, balance: string, - navigate: any => void, downloadUpgradeRequested: any => void, isUpgradeAvailable: boolean, - autoUpdateDownloaded: boolean, + navigate: any => void, + roundedBalance: string, }; const Header = (props: Props) => { const { + autoUpdateDownloaded, balance, + downloadUpgradeRequested, isUpgradeAvailable, navigate, - downloadUpgradeRequested, - autoUpdateDownloaded, + roundedBalance, } = props; const showUpgradeButton = @@ -37,7 +39,10 @@ const Header = (props: Props) => { `${balance}` ) : ( - You have {balance} LBC + + You have + {' '} + {roundedBalance} LBC ) }