mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
pallet-assets: Rename total_supply to amount (#13229)
* pallet-assets: Rename `total_supply` to `amount` We are actually passing the `amount` on assets being minted and not the total supply. Closes: https://github.com/paritytech/substrate/issues/13210 * ".git/.scripts/commands/fmt/fmt.sh" * Fix compilation * FMT Co-authored-by: command-bot <>
This commit is contained in:
@@ -354,18 +354,15 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
if let Some(check_issuer) = maybe_check_issuer {
|
||||
ensure!(check_issuer == details.issuer, Error::<T, I>::NoPermission);
|
||||
}
|
||||
debug_assert!(
|
||||
T::Balance::max_value() - details.supply >= amount,
|
||||
"checked in prep; qed"
|
||||
);
|
||||
debug_assert!(details.supply.checked_add(&amount).is_some(), "checked in prep; qed");
|
||||
|
||||
details.supply = details.supply.saturating_add(amount);
|
||||
|
||||
Ok(())
|
||||
})?;
|
||||
Self::deposit_event(Event::Issued {
|
||||
asset_id: id,
|
||||
owner: beneficiary.clone(),
|
||||
total_supply: amount,
|
||||
});
|
||||
|
||||
Self::deposit_event(Event::Issued { asset_id: id, owner: beneficiary.clone(), amount });
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user