calculateEpochFee method
Implementation
BigInt calculateEpochFee(
{required BigInt preFeeAmount, required BigInt epoch}) {
final fee = getEpochFee(epoch);
if (preFeeAmount == BigInt.zero || fee.transferFeeBasisPoints == 0) {
return BigInt.zero;
}
final numerator = preFeeAmount * BigInt.from(fee.transferFeeBasisPoints);
final rawFee = (numerator * _Utils.oneInBasisPoint - BigInt.one) ~/
_Utils.oneInBasisPoint;
return rawFee > fee.maximumFee ? fee.maximumFee : rawFee;
}