isEnoughConfirmations static method

bool isEnoughConfirmations(
  1. int nbConfirmations,
  2. int maxConfirmations,
  3. double ratio, {
  4. bool ratioEqualIncluded = true,
})

Implementation

static bool isEnoughConfirmations(
  int nbConfirmations,
  int maxConfirmations,
  double ratio, {
  bool ratioEqualIncluded = true,
}) {
  if (ratioEqualIncluded) {
    if (nbConfirmations / maxConfirmations >= ratio) {
      return true;
    } else {
      return false;
    }
  } else {
    if (nbConfirmations / maxConfirmations > ratio) {
      return true;
    } else {
      return false;
    }
  }
}