{"size": 447, "ext": "js", "max_stars_repo_path": "client/src/ethereum/web3.js", "max_stars_repo_name": "AhmedBenGhozzia/Catalyst-Electrify", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/ethereum/web3.js", "max_issues_repo_name": "AhmedBenGhozzia/Catalyst-Electrify", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/ethereum/web3.js", "max_forks_repo_name": "AhmedBenGhozzia/Catalyst-Electrify", "max_forks_repo_forks_event_min_datetime": "2021-04-16T14:33:41.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-16T14:33:41.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 27.9375, "max_line_length": 74, "alphanum_fraction": 0.706935123}
import Web3 from "web3";

let web3js;
if (typeof window !== "undefined" && typeof window.web3 !== "undefined") {
  //we are in a browser + metamask
  web3js = new Web3(window.web3.currentProvider);
} else {
  // we are on the server Or the user don't have metamask
  const provider = new Web3.providers.HttpProvider(
    "https://rinkeby.infura.io/v3/94be6796f4944aa2adb744c64c70e745"
  );
  web3js = new Web3(provider);
}

export default web3js;
