Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Fix] Remove redundant stash from Stake
  • Loading branch information
ruseinov committed Apr 13, 2023
commit 95e31bf6f679914b39644739f5a6f70275d609f8
2 changes: 1 addition & 1 deletion frame/staking/src/pallet/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ impl<T: Config> StakingInterface for Pallet<T> {
fn stake(who: &Self::AccountId) -> Result<Stake<Self>, DispatchError> {
Self::bonded(who)
.and_then(|c| Self::ledger(c))
.map(|l| Stake { stash: l.stash, total: l.total, active: l.active })
.map(|l| Stake { total: l.total, active: l.active })
.ok_or(Error::<T>::NotStash.into())
}

Expand Down
2 changes: 0 additions & 2 deletions primitives/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ impl<AccountId, Balance> OnStakerSlash<AccountId, Balance> for () {
/// A struct that reflects stake that an account has in the staking system. Provides a set of
/// methods to operate on it's properties. Aimed at making `StakingInterface` more concise.
pub struct Stake<T: StakingInterface + ?Sized> {
/// The stash account whose balance is actually locked and at stake.
pub stash: T::AccountId,
/// The total stake that `stash` has in the staking system. This includes the
/// `active` stake, and any funds currently in the process of unbonding via
/// [`StakingInterface::unbond`].
Expand Down