diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index 33a336e7c94e5..4d24f5914f017 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -541,11 +541,11 @@ pub mod pallet { origin: OriginFor, dest: AccountIdLookupOf, #[pallet::compact] value: T::Balance, - ) -> DispatchResultWithPostInfo { + ) -> DispatchResult { let source = ensure_signed(origin)?; let dest = T::Lookup::lookup(dest)?; >::transfer(&source, &dest, value, Expendable)?; - Ok(().into()) + Ok(()) } /// Set the regular balance of a given account; it also takes a reserved balance but this @@ -564,7 +564,7 @@ pub mod pallet { who: AccountIdLookupOf, #[pallet::compact] new_free: T::Balance, #[pallet::compact] old_reserved: T::Balance, - ) -> DispatchResultWithPostInfo { + ) -> DispatchResult { ensure_root(origin)?; let who = T::Lookup::lookup(who)?; let existential_deposit = Self::ed(); @@ -592,7 +592,7 @@ pub mod pallet { } Self::deposit_event(Event::BalanceSet { who, free: new_free }); - Ok(().into()) + Ok(()) } /// Exactly as `transfer_allow_death`, except the origin must be root and the source account @@ -603,12 +603,12 @@ pub mod pallet { source: AccountIdLookupOf, dest: AccountIdLookupOf, #[pallet::compact] value: T::Balance, - ) -> DispatchResultWithPostInfo { + ) -> DispatchResult { ensure_root(origin)?; let source = T::Lookup::lookup(source)?; let dest = T::Lookup::lookup(dest)?; >::transfer(&source, &dest, value, Expendable)?; - Ok(().into()) + Ok(()) } /// Same as the [`transfer_allow_death`] call, but with a check that the transfer will not @@ -622,11 +622,11 @@ pub mod pallet { origin: OriginFor, dest: AccountIdLookupOf, #[pallet::compact] value: T::Balance, - ) -> DispatchResultWithPostInfo { + ) -> DispatchResult { let source = ensure_signed(origin)?; let dest = T::Lookup::lookup(dest)?; >::transfer(&source, &dest, value, Preserve)?; - Ok(().into()) + Ok(()) } /// Transfer the entire transferable balance from the caller account. @@ -724,11 +724,11 @@ pub mod pallet { origin: OriginFor, dest: AccountIdLookupOf, #[pallet::compact] value: T::Balance, - ) -> DispatchResultWithPostInfo { + ) -> DispatchResult { let source = ensure_signed(origin)?; let dest = T::Lookup::lookup(dest)?; >::transfer(&source, &dest, value, Expendable)?; - Ok(().into()) + Ok(()) } /// Set the regular balance of a given account. @@ -743,7 +743,7 @@ pub mod pallet { origin: OriginFor, who: AccountIdLookupOf, #[pallet::compact] new_free: T::Balance, - ) -> DispatchResultWithPostInfo { + ) -> DispatchResult { ensure_root(origin)?; let who = T::Lookup::lookup(who)?; let existential_deposit = Self::ed(); @@ -767,7 +767,7 @@ pub mod pallet { } Self::deposit_event(Event::BalanceSet { who, free: new_free }); - Ok(().into()) + Ok(()) } } diff --git a/frame/support/src/traits/tokens/currency.rs b/frame/support/src/traits/tokens/currency.rs index 3f6f6b8e7384b..1bc91b6ae5f9a 100644 --- a/frame/support/src/traits/tokens/currency.rs +++ b/frame/support/src/traits/tokens/currency.rs @@ -124,8 +124,7 @@ pub trait Currency { /// Transfer some liquid free balance to another staker. /// - /// This is a very high-level function. It will ensure all appropriate fees are paid - /// and no imbalance in the system remains. + /// This is a very high-level function. It will ensure no imbalance in the system remains. fn transfer( source: &AccountId, dest: &AccountId,