Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

asset-conversion pallet: No need for AssetBalanceOf #14325

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

gilescope
Copy link
Contributor

Instead of AssetBalanceOf<T> we can just reference T::AssetBalance. Less voodoo.

No other changes contained in this PR.

@gilescope gilescope added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jun 8, 2023
@gilescope gilescope requested review from a team June 8, 2023 12:34
@gilescope gilescope changed the title No need for AssetBalanceOf asset-conversion pallet: No need for AssetBalanceOf Jun 8, 2023
Copy link
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think the current code is entirely correct.

Config item Currency for example restrains the Balance of InspectFungible, but not of MutateFungible. I am not sure if this can lead to a situation where a type with incompatible InspectFungible and MutateFungible could be configured, but it might.
Same for Assets and PoolAssets.

@paritytech-ci paritytech-ci requested a review from a team June 8, 2023 19:52
@bkchr
Copy link
Member

bkchr commented Jun 8, 2023

I dont think the current code is entirely correct.

Config item Currency for example restrains the Balance of InspectFungible, but not of MutateFungible. I am not sure if this can lead to a situation where a type with incompatible InspectFungible and MutateFungible could be configured, but it might. Same for Assets and PoolAssets.

MutableFungible has InspectFungable as super trait.

@gilescope
Copy link
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit e434882 into master Jun 8, 2023
@paritytech-processbot paritytech-processbot bot deleted the giles-asset-conversion-simpler branch June 8, 2023 20:49
agryaznov pushed a commit that referenced this pull request Jun 9, 2023
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants