Skip to content

Commit

Permalink
fix: incorrect generics
Browse files Browse the repository at this point in the history
  • Loading branch information
TarekkMA committed Jan 9, 2025
1 parent e3b5c3d commit f623e04
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 5 additions & 3 deletions runtime/moonbase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ impl pallet_balances::Config for Runtime {
pub struct DealWithSubstrateFeesAndTip<R>(sp_std::marker::PhantomData<R>);
impl<R> DealWithSubstrateFeesAndTip<R>
where
R: pallet_balances::Config + pallet_treasury::Config,
R: pallet_balances::Config + pallet_treasury::Config + pallet_author_inherent::Config,
pallet_author_inherent::Pallet<R>: Get<R::AccountId>,
{
fn deal_with_fees(amount: Credit<R::AccountId, pallet_balances::Pallet<R>>) {
// Balances pallet automatically burns dropped Credits by decreasing
Expand All @@ -362,9 +363,10 @@ where
}

impl<R> OnUnbalanced<Credit<R::AccountId, pallet_balances::Pallet<R>>>
for DealWithSubstrateFeesAndTip<R>
for DealWithSubstrateFeesAndTip<R>
where
R: pallet_balances::Config + pallet_treasury::Config,
R: pallet_balances::Config + pallet_treasury::Config + pallet_author_inherent::Config,
pallet_author_inherent::Pallet<R>: Get<R::AccountId>,
{
fn on_unbalanceds(
mut fees_then_tips: impl Iterator<Item = Credit<R::AccountId, pallet_balances::Pallet<R>>>,
Expand Down
6 changes: 4 additions & 2 deletions runtime/moonbeam/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ impl pallet_balances::Config for Runtime {
pub struct DealWithSubstrateFeesAndTip<R>(sp_std::marker::PhantomData<R>);
impl<R> DealWithSubstrateFeesAndTip<R>
where
R: pallet_balances::Config + pallet_treasury::Config,
R: pallet_balances::Config + pallet_treasury::Config + pallet_author_inherent::Config,
pallet_author_inherent::Pallet<R>: Get<R::AccountId>,
{
fn deal_with_fees(amount: Credit<R::AccountId, pallet_balances::Pallet<R>>) {
// Balances pallet automatically burns dropped Credits by decreasing
Expand All @@ -358,7 +359,8 @@ where
impl<R> OnUnbalanced<Credit<R::AccountId, pallet_balances::Pallet<R>>>
for DealWithSubstrateFeesAndTip<R>
where
R: pallet_balances::Config + pallet_treasury::Config,
R: pallet_balances::Config + pallet_treasury::Config + pallet_author_inherent::Config,
pallet_author_inherent::Pallet<R>: Get<R::AccountId>,
{
fn on_unbalanceds(
mut fees_then_tips: impl Iterator<Item = Credit<R::AccountId, pallet_balances::Pallet<R>>>,
Expand Down
8 changes: 5 additions & 3 deletions runtime/moonriver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ impl pallet_balances::Config for Runtime {
pub struct DealWithSubstrateFeesAndTip<R>(sp_std::marker::PhantomData<R>);
impl<R> DealWithSubstrateFeesAndTip<R>
where
R: pallet_balances::Config + pallet_treasury::Config,
R: pallet_balances::Config + pallet_treasury::Config + pallet_author_inherent::Config,
pallet_author_inherent::Pallet<R>: Get<R::AccountId>,
{
fn deal_with_fees(amount: Credit<R::AccountId, pallet_balances::Pallet<R>>) {
// Balances pallet automatically burns dropped Credits by decreasing
Expand All @@ -358,9 +359,10 @@ where
}

impl<R> OnUnbalanced<Credit<R::AccountId, pallet_balances::Pallet<R>>>
for DealWithSubstrateFeesAndTip<R>
for DealWithSubstrateFeesAndTip<R>
where
R: pallet_balances::Config + pallet_treasury::Config,
R: pallet_balances::Config + pallet_treasury::Config + pallet_author_inherent::Config,
pallet_author_inherent::Pallet<R>: Get<R::AccountId>,
{
fn on_unbalanceds(
mut fees_then_tips: impl Iterator<Item = Credit<R::AccountId, pallet_balances::Pallet<R>>>,
Expand Down

0 comments on commit f623e04

Please sign in to comment.