Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cuteolaf committed Dec 3, 2022
1 parent 08f63c1 commit 7d58305
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pallets/asset_management/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ pub mod pallet {
let caller = ensure_signed(origin.clone())?;

// Ensure that the caller is a representative
let rep = Roles::Pallet::<T>::reps(caller.clone());
let rep = Roles::Pallet::<T>::reps(caller.clone());
ensure!(rep.is_some(), Error::<T>::NotARepresentative);
let rep = rep.unwrap();
ensure!(rep.activated, Error::<T>::NotAnActiveRepresentative);
Expand All @@ -465,10 +465,7 @@ pub mod pallet {
ensure!(ownership.is_some(), Error::<T>::NotAnAsset);

let asset_account = ownership.unwrap().virtual_account;
ensure!(
rep.assets_accounts.contains(&asset_account),
Error::<T>::AssetOutOfControl
);
ensure!(rep.assets_accounts.contains(&asset_account), Error::<T>::AssetOutOfControl);

// Ensure that provided account is a valid tenant
let tenant0 = Roles::Pallet::<T>::tenants(tenant.clone());
Expand Down

0 comments on commit 7d58305

Please sign in to comment.