calculateFee function
- required RawTransaction tx,
- required Amount feePerByte,
Implementation
BigInt calculateFee({
required RawTransaction tx,
required Amount feePerByte,
}) {
return switch (tx) {
EC8RawTransaction _ => calculateFeeEC8(tx: tx),
_ => tx.size.toBI * feePerByte.value,
};
}