Skip to content

Commit

Permalink
fix: fee calc
Browse files Browse the repository at this point in the history
  • Loading branch information
wischli committed Jun 2, 2022
1 parent b8919e0 commit 5f51ac0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtimes/common/src/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use frame_support::{
traits::{Currency, Get, Imbalance, OnUnbalanced},
weights::{DispatchClass, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial},
};
use frame_support::weights::WeightToFee as WeightToFeeT;
use pallet_balances::WeightInfo;
use pallet_transaction_payment::OnChargeTransaction;
use smallvec::smallvec;
Expand Down Expand Up @@ -102,7 +103,7 @@ where

// TODO: transfer_keep_alive is 288 byte long?
let tx_len: u64 = 288;
let byte_fee: Balance = <R as pallet_transaction_payment::Config>::LengthToFee::calc(&tx_len).into();
let byte_fee: Balance = <R as pallet_transaction_payment::Config>::LengthToFee::weight_to_fee(&tx_len).into();
let base_weight: Balance = <R as frame_system::Config>::BlockWeights::get()
.get(DispatchClass::Normal)
.base_extrinsic
Expand Down

0 comments on commit 5f51ac0

Please sign in to comment.