Skip to content

Commit

Permalink
Merge pull request #275 from chronologic/feature/eth-balance-notifica…
Browse files Browse the repository at this point in the history
…tion

[FEATURE] Eth balance notification
  • Loading branch information
adibas03 authored May 4, 2018
2 parents 1a50110 + a8ccc5c commit 1239c29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/components/TimeNode/TimeNodeStatistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ class TimeNodeStatistics extends Component {
await this.props.timeNodeStore.getDAYBalance();
}

getBalanceNotification() {
return Number(this.props.timeNodeStore.balanceETH) > 0 ? null : <Alert type="warning" close={false} msg="Your ETH balance is 0. You will be unable to claim or execute transactions." />;
}

componentWillUnmount() {
clearInterval(this.interval);
}
Expand All @@ -87,6 +91,7 @@ class TimeNodeStatistics extends Component {
return (
<div id="timeNodeStatistics">
{this.state.timeNodeDisabled ? dayTokenError : null}
{this.getBalanceNotification()}

<h2 className="py-4">
Your TimeNode is currently {timeNodeStatus}.
Expand Down

0 comments on commit 1239c29

Please sign in to comment.