Skip to content
This repository was archived by the owner on Jul 4, 2022. It is now read-only.

Commit 0ddfe79

Browse files
committed
Add some extra traits to multi currency balance
1 parent 6324c87 commit 0ddfe79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

prml/support/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
// - 'token' / 'asset' / 'currency' and
2323
// - 'balance' / 'value' / 'amount'
2424
// are used interchangeably as they make more sense in certain contexts.
25-
use codec::Codec;
25+
use codec::{Codec, FullCodec};
2626
use frame_support::traits::{ExistenceRequirement, Imbalance, SignedImbalance, WithdrawReasons};
2727
use sp_runtime::{
28-
traits::{AtLeast32BitUnsigned, MaybeSerializeDeserialize, Zero},
28+
traits::{AtLeast32BitUnsigned, MaybeSerializeDeserialize, Saturating, Zero},
2929
DispatchError, DispatchResult,
3030
};
3131
use sp_std::{fmt::Debug, result};
@@ -44,7 +44,7 @@ pub trait MultiCurrencyAccounting {
4444
/// The ID type for an account in the system
4545
type AccountId: Codec + Debug + Default;
4646
/// The balance of an account for a particular currency
47-
type Balance: AtLeast32BitUnsigned + Codec + Copy + MaybeSerializeDeserialize + Debug + Default;
47+
type Balance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default + Saturating;
4848
/// The ID type of a currency in the system
4949
type CurrencyId: Codec + Debug + Default;
5050
/// A type the is aware of the default network currency ID

0 commit comments

Comments
 (0)