There is an issue with the installment calculation:
/// Calculate the cost of an installment. The cost of the installment is the length of the
/// installment multiplied by the storage cost per block.
///
/// The installment index is the index of the installment in the payment plan. The first
/// installment has index 0.
///
/// Returns `None` if the installment index is out of bounds.
fn calculate_installment_cost(&self, installment_index: usize) -> Option<BalanceOf<T>> {
let installment_length = self.calculate_installment_length(installment_index)?;
let cost = CurrentPrices::<T>::get()
.storage_mb_per_block
.saturating_mul(BalanceOf::<T>::saturated_from(
installment_length.saturated_into::<u128>(),
));
Some(cost)
}
That code which is the one that calculates the installment cost is not considering the amount of storage from the agreement, charging only one unit of storage per amount of blocks, when it has to be amount of blocks amount of storage requested storage unit.
There is an issue with the installment calculation:
That code which is the one that calculates the installment cost is not considering the amount of storage from the agreement, charging only one unit of storage per amount of blocks, when it has to be amount of blocks amount of storage requested storage unit.