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

Commit 3e2d710

Browse files
authored
Impl multi currency trait (#150)
* Reinstate MultiCurrencyTrait * Update decl_event and usages
1 parent 3cf1183 commit 3e2d710

File tree

6 files changed

+715
-25
lines changed

6 files changed

+715
-25
lines changed

prml/generic-asset/src/default_weight.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use frame_support::weights::{
2-
constants::{RocksDbWeight as DbWeight},
3-
Weight,
4-
};
1+
use frame_support::weights::{constants::RocksDbWeight as DbWeight, Weight};
52

63
impl crate::WeightInfo for () {
74
fn transfer() -> Weight {

prml/generic-asset/src/imbalances.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ use sp_std::{mem, result};
3636
/// denoting that funds have been created without any equal and opposite
3737
/// accounting.
3838
#[must_use]
39-
#[derive(Debug)]
39+
#[derive(Debug, PartialEq)]
4040
pub struct PositiveImbalance<T: Trait> {
4141
amount: T::Balance,
4242
asset_id: T::AssetId,
4343
}
4444

4545
impl<T: Trait> PositiveImbalance<T> {
46-
/// Create a new positive imbalance given some amount
46+
/// Create a new positive imbalance from a `balance` and with the given `asset_id`.
4747
pub fn new(amount: T::Balance, asset_id: T::AssetId) -> Self {
4848
PositiveImbalance { amount, asset_id }
4949
}
@@ -53,14 +53,14 @@ impl<T: Trait> PositiveImbalance<T> {
5353
/// denoting that funds have been destroyed without any equal and opposite
5454
/// accounting.
5555
#[must_use]
56-
#[derive(Debug)]
56+
#[derive(Debug, PartialEq)]
5757
pub struct NegativeImbalance<T: Trait> {
5858
amount: T::Balance,
5959
asset_id: T::AssetId,
6060
}
6161

6262
impl<T: Trait> NegativeImbalance<T> {
63-
/// Create a new negative imbalance from a balance.
63+
/// Create a new negative imbalance from a `balance` and with the given `asset_id`.
6464
pub fn new(amount: T::Balance, asset_id: T::AssetId) -> Self {
6565
NegativeImbalance { amount, asset_id }
6666
}

0 commit comments

Comments
 (0)