Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
pallet-staking: add RewardDestination::None for explictly not receivi…
Browse files Browse the repository at this point in the history
…ng rewards (#8168)
  • Loading branch information
sorpaas authored Mar 11, 2021
1 parent 0a61b0a commit aae1861
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frame/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ pub enum RewardDestination<AccountId> {
Controller,
/// Pay into a specified account.
Account(AccountId),
/// Receive no reward.
None,
}

impl<AccountId> Default for RewardDestination<AccountId> {
Expand Down Expand Up @@ -2499,7 +2501,8 @@ impl<T: Config> Module<T> {
}),
RewardDestination::Account(dest_account) => {
Some(T::Currency::deposit_creating(&dest_account, amount))
}
},
RewardDestination::None => None,
}
}

Expand Down

0 comments on commit aae1861

Please sign in to comment.