Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

call asset_exists function in pallet-asset-registry #94

Closed
bernardoaraujor opened this issue Dec 8, 2022 · 4 comments
Closed

call asset_exists function in pallet-asset-registry #94

bernardoaraujor opened this issue Dec 8, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bernardoaraujor
Copy link
Contributor

bernardoaraujor commented Dec 8, 2022

Motivation

pallet-asset-registry is currently using T::Assets::minimum_balance(asset_id).is_zero() as a way to verify whether some Asset exists on Trappist's pallet-assets.

That is a bit hacky, and served as motivation for paritytech/substrate#12444

Suggested Solution

Ever since paritytech/substrate#12782 was merged, we can replace

!T::Assets::minimum_balance(asset_id).is_zero()
with a simpler call to asset_exists.

@bernardoaraujor bernardoaraujor added enhancement New feature or request good first issue Good for newcomers labels Dec 8, 2022
@bernardoaraujor
Copy link
Contributor Author

paritytech/substrate#12782 only got into the release pipeline after polkadot-v0.9.35

so that's also a prerequisite: Trappist needs to be using substrate on polkadot-v0.9.35 or later

@evilrobot-01
Copy link
Contributor

So glad that was finally added.

@stiiifff stiiifff added this to the Trappist M1 / XCM v2 milestone Jan 25, 2023
@stiiifff
Copy link
Contributor

Depends on #122

@lana-shanghai lana-shanghai self-assigned this Feb 2, 2023
@stiiifff
Copy link
Contributor

stiiifff commented Feb 9, 2023

Closed by #131

@stiiifff stiiifff closed this as completed Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants