{"size": 1077, "ext": "js", "max_stars_repo_path": "dist/lib/components/TransactionStatusChecker/index.js", "max_stars_repo_name": "PiggyPrize/app-react-components", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dist/lib/components/TransactionStatusChecker/index.js", "max_issues_repo_name": "PiggyPrize/app-react-components", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dist/lib/components/TransactionStatusChecker/index.js", "max_forks_repo_name": "PiggyPrize/app-react-components", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 32.6363636364, "max_line_length": 110, "alphanum_fraction": 0.7325905292}
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
var React = require('react');
var jotai = require('jotai');
var hooks = require('@pooltogether/hooks');

function TransactionStatusChecker(props) {
  var transactionsKey = props.transactionsKey;

  var _useAtom = jotai.useAtom(hooks.transactionsAtom),
      _useAtom2 = _rollupPluginBabelHelpers.slicedToArray(_useAtom, 2),
      transactions = _useAtom2[0],
      setTransactions = _useAtom2[1];

  var _useOnboard = hooks.useOnboard(),
      chainId = _useOnboard.network,
      usersAddress = _useOnboard.address,
      provider = _useOnboard.provider;

  React.useEffect(function () {
    if (chainId && usersAddress && provider) {
      hooks.readTransactions(transactions, setTransactions, chainId, usersAddress, provider, transactionsKey);
    }
  }, [chainId, usersAddress, provider]);
  return null;
}

exports.TransactionStatusChecker = TransactionStatusChecker;
//# sourceMappingURL=index.js.map
