Skip to content

Commit 9b43231

Browse files
weichweichatheikianenigma
authored
decouple transaction payment and currency (#6912)
* wip: setup types * fix types * make tx payment pallet independent from balances * fix dependent tests * comments * restructure a bit and include more info * clean up ugly phantom * reduce complexity * minor doc improvements * use shorthand * doc * fix line lenght and style * readd BalanceOf * some clarifications and readability improvements * move balance type to OnChargeTransaction * remove noise * fix style * Apply suggestions from code review improved documentation Co-authored-by: Alexander Theißen <[email protected]> * Improve naming and documentation Apply suggestions from code review Co-authored-by: Alexander Theißen <[email protected]> * Apply suggestions from code review Co-authored-by: Kian Paimani <[email protected]> * always call withdraw_fee * move NegativeImbalanceOf to payment module * fix unused import Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
1 parent ec3b66f commit 9b43231

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ mod tests {
491491
traits::{Currency, LockIdentifier, LockableCurrency, WithdrawReasons},
492492
};
493493
use frame_system::{Call as SystemCall, ChainContext, LastRuntimeUpgradeInfo};
494+
use pallet_transaction_payment::CurrencyAdapter;
494495
use pallet_balances::Call as BalancesCall;
495496
use hex_literal::hex;
496497
const TEST_KEY: &[u8] = &*b":test:key:";
@@ -632,8 +633,7 @@ mod tests {
632633
pub const TransactionByteFee: Balance = 0;
633634
}
634635
impl pallet_transaction_payment::Trait for Runtime {
635-
type Currency = Balances;
636-
type OnTransactionPayment = ();
636+
type OnChargeTransaction = CurrencyAdapter<Balances, ()>;
637637
type TransactionByteFee = TransactionByteFee;
638638
type WeightToFee = IdentityFee<Balance>;
639639
type FeeMultiplierUpdate = ();

0 commit comments

Comments
 (0)