mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
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 <alex.theissen@me.com> * Improve naming and documentation Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * always call withdraw_fee * move NegativeImbalanceOf to payment module * fix unused import Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -491,6 +491,7 @@ mod tests {
|
||||
traits::{Currency, LockIdentifier, LockableCurrency, WithdrawReasons},
|
||||
};
|
||||
use frame_system::{Call as SystemCall, ChainContext, LastRuntimeUpgradeInfo};
|
||||
use pallet_transaction_payment::CurrencyAdapter;
|
||||
use pallet_balances::Call as BalancesCall;
|
||||
use hex_literal::hex;
|
||||
const TEST_KEY: &[u8] = &*b":test:key:";
|
||||
@@ -632,8 +633,7 @@ mod tests {
|
||||
pub const TransactionByteFee: Balance = 0;
|
||||
}
|
||||
impl pallet_transaction_payment::Trait for Runtime {
|
||||
type Currency = Balances;
|
||||
type OnTransactionPayment = ();
|
||||
type OnChargeTransaction = CurrencyAdapter<Balances, ()>;
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type WeightToFee = IdentityFee<Balance>;
|
||||
type FeeMultiplierUpdate = ();
|
||||
|
||||
Reference in New Issue
Block a user