{"size": 365, "ext": "js", "max_stars_repo_path": "radish34/api/src/install/checkWalletBalance.js", "max_stars_repo_name": "albertxos/baseline", "max_stars_repo_stars_event_min_datetime": "2020-04-29T19:50:59.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-20T08:55:12.000Z", "max_issues_repo_path": "radish34/api/src/install/checkWalletBalance.js", "max_issues_repo_name": "albertxos/baseline", "max_issues_repo_issues_event_min_datetime": "2021-05-11T13:43:36.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-22T12:23:25.000Z", "max_forks_repo_path": "radish34/api/src/install/checkWalletBalance.js", "max_forks_repo_name": "albertxos/baseline", "max_forks_repo_forks_event_min_datetime": "2020-06-28T21:25:38.000Z", "max_forks_repo_forks_event_max_datetime": "2020-06-28T21:25:38.000Z"}
{"max_stars_count": 6, "max_issues_count": 5, "max_forks_count": 1, "avg_line_length": 22.8125, "max_line_length": 91, "alphanum_fraction": 0.6520547945}
import { getBalance } from '../utils/wallet';

const minBalance = 50;

export default async () => {
  const balance = await getBalance();
  if (balance > minBalance) {
    console.log('Wallet balance:', balance);
    return true;
  }
  console.log(
    `Not enough Eth in account! You need ${minBalance} but only have ${balance} available`,
  );
  return false;
};
