Skip to content

Commit

Permalink
Hide cards until node is synced (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
rithvikvibhu authored Dec 23, 2021
1 parent ecb89de commit 7683e3d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/pages/Account/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const analytics = aClientStub(() => require("electron").ipcRenderer);
(state) => ({
spendableBalance: state.wallet.balance.spendable,
height: state.node.chain.height,
progress: state.node.chain.progress,
isFetching: state.wallet.isFetching,
network: state.wallet.network,
hnsPrice: state.node.hnsPrice,
Expand All @@ -45,6 +46,7 @@ export default class Account extends Component {
static propTypes = {
spendableBalance: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
progress: PropTypes.number.isRequired,
isFetching: PropTypes.bool.isRequired,
network: PropTypes.string.isRequired,
updateHNSPrice: PropTypes.func.isRequired,
Expand Down Expand Up @@ -263,6 +265,11 @@ export default class Account extends Component {
}

renderCards() {
// Hide cards until (almost) synced
if (this.props.progress < 0.9999) {
return;
}

const network = this.props.network;
const {
revealable,
Expand Down

0 comments on commit 7683e3d

Please sign in to comment.