diff --git a/src/containers/Home/index.js b/src/containers/Home/index.js index c02b4131..e8d21b0f 100644 --- a/src/containers/Home/index.js +++ b/src/containers/Home/index.js @@ -9,7 +9,7 @@ import SuccessDialog from '../Stake/DelegateDialog/SuccessDialog'; import UnSuccessDialog from '../Stake/DelegateDialog/UnSuccessDialog'; import ClaimDialog from './ClaimDialog'; import Table from '../Stake/Table'; -import { Button } from '@material-ui/core'; +import { Button, IconButton } from '@material-ui/core'; import Cards from '../Proposals/Cards'; import ProposalDialog from '../Proposals/ProposalDialog'; import { withRouter } from 'react-router'; @@ -74,23 +74,24 @@ class Home extends Component {
{this.props.address !== '' && - } + if (this.state.isLoading === false) { + this.setState((p) => ({ ...p, isLoading: true })); + Promise.all([ + this.props.fetchRewards(this.props.network.REST_URL, this.props.address), + this.props.getBalance(this.props.network.REST_URL, this.props.address), + this.props.fetchVestingBalance(this.props.network.REST_URL, this.props.address), + this.props.getUnBondingDelegations(this.props.network.REST_URL, this.props.address), + this.props.getDelegations(this.props.network.REST_URL, this.props.address), + sleep(2000), + ]).then(() => this.setState((p) => ({ ...p, isLoading: false }))); + } + }}> + + } +

{variables[this.props.lang].welcome}

{variables[this.props.lang].participate}