Guest User

Untitled

a guest
Feb 23rd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. const mapDispatchToProps = dispatch => ({
  2. setWeb3: (web3) => {
  3. dispatch({
  4. type: 'WEB3',
  5. value: web3
  6. })
  7. },
  8. });
  9.  
  10. setInterval(() => {
  11. web3js.eth.getAccounts((error, accounts) => {
  12. if (accounts.length > 0) {
  13. this.props.setWeb3(web3js);
  14. }
  15. });
  16. }, 2500);
Add Comment
Please, Sign In to add comment