Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed fmt & clippy
Signed-off-by: Matteo Muraca <mmuraca247@gmail.com>
  • Loading branch information
muraca committed Mar 7, 2024
commit 6c7a19708f6453baeee42176791dba0bd6175b60
2 changes: 1 addition & 1 deletion substrate/frame/assets/src/impl_fungibles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl<T: Config<I>, I: 'static> fungibles::Unbalanced<T::AccountId> for Pallet<T,

fn deactivate(asset: Self::AssetId, amount: Self::Balance) {
Asset::<T, I>::mutate(&asset, |maybe_asset| match maybe_asset {
Some(ref mut asset) =>{
Some(ref mut asset) => {
// Inactive amount can't exceed supply
asset.inactive = asset.inactive.saturating_add(amount).max(asset.supply);
},
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/assets/src/migration/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl<T: Config<I>, I: 'static> OnRuntimeUpgrade for MigrateToV1<T, I> {
"the asset count before and after the migration should be the same"
);

let in_code_version = Pallet::<T>::in_code_storage_version();
let in_code_version = Pallet::<T, I>::in_code_storage_version();
let on_chain_version = Pallet::<T, I>::on_chain_storage_version();

frame_support::ensure!(in_code_version == 1, "must_upgrade");
Expand Down