mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Remove As trait bound from Currency::Balance (#2205)
* remove As<64> bond * Currency trait refactor * bump spec version
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
use crate::rstd::result;
|
||||
use crate::codec::{Codec, Encode, Decode};
|
||||
use crate::runtime_primitives::traits::{
|
||||
MaybeSerializeDebug, SimpleArithmetic, As
|
||||
MaybeSerializeDebug, SimpleArithmetic
|
||||
};
|
||||
|
||||
/// The account with the given id was killed.
|
||||
@@ -195,7 +195,7 @@ pub enum SignedImbalance<B, P: Imbalance<B>>{
|
||||
impl<
|
||||
P: Imbalance<B, Opposite=N>,
|
||||
N: Imbalance<B, Opposite=P>,
|
||||
B: SimpleArithmetic + As<usize> + As<u64> + Codec + Copy + MaybeSerializeDebug + Default,
|
||||
B: SimpleArithmetic + Codec + Copy + MaybeSerializeDebug + Default,
|
||||
> SignedImbalance<B, P> {
|
||||
pub fn zero() -> Self {
|
||||
SignedImbalance::Positive(P::zero())
|
||||
@@ -230,7 +230,7 @@ impl<
|
||||
/// Abstraction over a fungible assets system.
|
||||
pub trait Currency<AccountId> {
|
||||
/// The balance of an account.
|
||||
type Balance: SimpleArithmetic + As<usize> + As<u64> + Codec + Copy + MaybeSerializeDebug + Default;
|
||||
type Balance: SimpleArithmetic + Codec + Copy + MaybeSerializeDebug + Default;
|
||||
|
||||
/// The opaque token type for an imbalance. This is returned by unbalanced operations
|
||||
/// and must be dealt with. It may be dropped but cannot be cloned.
|
||||
|
||||
Reference in New Issue
Block a user