mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 01:35:50 +00:00
pallet assets: Fix errors (#4118)
`LiveAsset` is an error to be returned when an asset is not supposed to be live. And `AssetNotLive` is an error to be returned when an asset is supposed to be live, I don't think frozen qualifies as live.
This commit is contained in:
@@ -491,7 +491,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
let d = Asset::<T, I>::get(&id).ok_or(Error::<T, I>::Unknown)?;
|
||||
ensure!(
|
||||
d.status == AssetStatus::Live || d.status == AssetStatus::Frozen,
|
||||
Error::<T, I>::AssetNotLive
|
||||
Error::<T, I>::IncorrectStatus
|
||||
);
|
||||
|
||||
let actual = Self::decrease_balance(id.clone(), target, amount, f, |actual, details| {
|
||||
|
||||
Reference in New Issue
Block a user