mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-01 00:19:49 +00:00
[pallet-assets] add asset_exists(id: AssetId) function (#12782)
* check if an asset exists via loose coupling * Update frame/support/src/traits/tokens/fungibles.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: parity-processbot <>
This commit is contained in:
authored and
1 parent
9a014d1ecd
commit
200f49d66d
2 files changed
+7
No files matched your search
@@ -59,6 +59,10 @@ impl<T: Config<I>, I: 'static> fungibles::Inspect<<T as SystemConfig>::AccountId
|
||||
) -> WithdrawConsequence<Self::Balance> {
|
||||
Pallet::<T, I>::can_decrease(asset, who, amount, false)
|
||||
}
|
||||
|
||||
fn asset_exists(asset: Self::AssetId) -> bool {
|
||||
Asset::<T, I>::contains_key(asset)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config<I>, I: 'static> fungibles::InspectMetadata<<T as SystemConfig>::AccountId>
|
||||
|
||||
Reference in new issue
Block a user