mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 06:31:03 +00:00
Introduce ReservableCurrency Trait in Balances Module (#2124)
* Introduce `ReservableCurrency` * Update Docs for `ReservableCurrency` * Update Tests * Bump spec and rebuild wasm * Extra: Add a note to `slash()` Discussion in Riot clarified the behavior of `slash()` and `can_slash()`. Trying to sneak clarifying comments about it into this PR * Update lib.rs * Don't drop the periods! CC @shawntabrizi
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
use serde_derive::{Serialize, Deserialize};
|
||||
use rstd::prelude::*;
|
||||
use srml_support::{StorageValue, StorageMap, decl_module, decl_storage, decl_event, ensure};
|
||||
use srml_support::traits::{Currency, OnDilution, OnUnbalanced, Imbalance};
|
||||
use srml_support::traits::{Currency, ReservableCurrency, OnDilution, OnUnbalanced, Imbalance};
|
||||
use runtime_primitives::{Permill, traits::{Zero, EnsureOrigin, StaticLookup}};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use system::ensure_signed;
|
||||
@@ -33,7 +33,7 @@ type NegativeImbalanceOf<T> = <<T as Trait>::Currency as Currency<<T as system::
|
||||
|
||||
pub trait Trait: system::Trait {
|
||||
/// The staking balance.
|
||||
type Currency: Currency<Self::AccountId>;
|
||||
type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId>;
|
||||
|
||||
/// Origin from which approvals must come.
|
||||
type ApproveOrigin: EnsureOrigin<Self::Origin>;
|
||||
|
||||
Reference in New Issue
Block a user