fn correct_and_deposit_fee(
		who: &T::AccountId,
		_dispatch_info: &DispatchInfoOf<T::Call>,
		_post_info: &PostDispatchInfoOf<T::Call>,
		corrected_fee: Self::Balance,
		tip: Self::Balance,
		already_withdrawn: Self::LiquidityInfo,
	) -> Result<(), TransactionValidityError> {
		if let Some(paid) = already_withdrawn {
			// Calculate how much refund we should return
			let refund_amount = paid.peek().saturating_sub(corrected_fee);
			// refund to the the account that paid the fees. If this fails, the
			// account might have dropped below the existential balance. In
			// that case we don't refund anything.
			let refund_imbalance =
				C::deposit_into_existing(&who, refund_amount).unwrap_or_else(|_| C::PositiveImbalance::zero());
			// merge the imbalance caused by paying the fees and refunding parts of it again.
			let adjusted_paid = paid
				.offset(refund_imbalance)
				.map_err(|_| TransactionValidityError::Invalid(InvalidTransaction::Payment))?;
			// Call someone else to handle the imbalance (fee and tip separately)
			let imbalances = adjusted_paid.split(tip);
			OU::on_unbalanceds(Some(imbalances.0).into_iter().chain(Some(imbalances.1)));
		}
		Ok(())
	}
/// Hand the fee and the tip over to the `[OnUnbalanced]` implementation.
/// Since the predicted fee might have been too high, parts of the fee may
/// be refunded.
///
/// Note: The `fee` already includes the `tip`.
/// Note: This is the default implementation
Hand the fee and the tip over to the `[OnUnbalanced]` implementation.
Since the predicted fee might have been too high, parts of the fee may
be refunded.

The `fee` already includes the `tip`.
Note: This is the default implementation
Hand the fee and the tip over to the ` [ OnUnbalanced ] ` implementation . Since the predicted fee might have been too high parts of the fee may be refunded . The ` fee ` already includes the ` tip ` . Note : This is the default implementation
fn correct_and_deposit_fee(
		who: &T::AccountId,
		_dispatch_info: &DispatchInfoOf<T::Call>,
		_post_info: &PostDispatchInfoOf<T::Call>,
		corrected_fee: Self::Balance,
		tip: Self::Balance,
		already_withdrawn: Self::LiquidityInfo,
	) -> Result<(), TransactionValidityError> {
		if let Some(paid) = already_withdrawn {
			// Calculate how much refund we should return
			let refund_amount = paid.peek().saturating_sub(corrected_fee);
			// refund to the the account that paid the fees. If this fails, the
			// account might have dropped below the existential balance. In
			// that case we don't refund anything.
			let refund_imbalance =
				C::deposit_into_existing(&who, refund_amount).unwrap_or_else(|_| C::PositiveImbalance::zero());
			// merge the imbalance caused by paying the fees and refunding parts of it again.
			let adjusted_paid = paid
				.offset(refund_imbalance)
				.map_err(|_| TransactionValidityError::Invalid(InvalidTransaction::Payment))?;
			// Call someone else to handle the imbalance (fee and tip separately)
			let imbalances = adjusted_paid.split(tip);
			OU::on_unbalanceds(Some(imbalances.0).into_iter().chain(Some(imbalances.1)));
		}
		Ok(())
	}
fn correct_and_deposit_fee ( who : & T :: AccountId , _dispatch_info : & DispatchInfoOf < T :: Call > , _post_info : & PostDispatchInfoOf < T :: Call > , corrected_fee : Self :: Balance , tip : Self :: Balance , already_withdrawn : Self :: LiquidityInfo , ) -> Result < ( ) , TransactionValidityError > { if let Some ( paid ) = already_withdrawn { // Calculate how much refund we should return let refund_amount = paid . peek ( ) . saturating_sub ( corrected_fee ) ; // refund to the the account that paid the fees. If this fails, the // account might have dropped below the existential balance. In // that case we don't refund anything. let refund_imbalance = C :: deposit_into_existing ( & who , refund_amount ) . unwrap_or_else ( | _ | C :: PositiveImbalance :: zero ( ) ) ; // merge the imbalance caused by paying the fees and refunding parts of it again. let adjusted_paid = paid . offset ( refund_imbalance ) . map_err ( | _ | TransactionValidityError :: Invalid ( InvalidTransaction :: Payment ) ) ? ; // Call someone else to handle the imbalance (fee and tip separately) let imbalances = adjusted_paid . split ( tip ) ; OU :: on_unbalanceds ( Some ( imbalances . 0 ) . into_iter ( ) . chain ( Some ( imbalances . 1 ) ) ) ; } Ok ( ( ) ) }
Hand the fee and the tip over to the `[OnUnbalanced]` implementation.
Hand the fee and the tip over to the ` [ OnUnbalanced ] ` implementation .
who
&T::AccountId
_dispatch_info
&DispatchInfoOf<T::Call>
_post_info
&PostDispatchInfoOf<T::Call>
corrected_fee
Self::Balance
tip
Self::Balance
already_withdrawn
Self::LiquidityInfo