Skip to content

Commit

Permalink
Panicking error to unimplemented (SlowMist N8) (#142)
Browse files Browse the repository at this point in the history
Co-authored-by: DxFFFFFF <[email protected]>
  • Loading branch information
clostao and deblanco authored Nov 16, 2023
1 parent 301733b commit fbe2ae8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 2 additions & 2 deletions pallets/custom-balances/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ pub mod pallet {

fn make_free_balance_be(
_who: &T::AccountId,
_balance: Self::Balance,
balance: Self::Balance,
) -> SignedImbalance<Self::Balance, Self::PositiveImbalance> {
panic!("make_free_balance_be is not allowed in this pallet")
SignedImbalance::Positive(NeutralImbalance::new(balance))
}
}

Expand Down
11 changes: 0 additions & 11 deletions pallets/custom-balances/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,17 +322,6 @@ fn settle_returns_error() {
});
}

#[test]
#[should_panic]
fn make_free_balance_be_panics() {
new_test_ext().execute_with(|| {
<CustomBalances as Currency<AccountId>>::make_free_balance_be(
&ZeroAddress::get().into(),
0u128,
);
});
}

// Inspect<AccountId> functions

#[test]
Expand Down

0 comments on commit fbe2ae8

Please sign in to comment.