Skip to content

refactor: Consolidate FungibleStrAssetType and FungibleObjAssetType#596

Merged
andrew-ifrita merged 3 commits into
mainfrom
fix/fungible-fungible
Jun 18, 2025
Merged

refactor: Consolidate FungibleStrAssetType and FungibleObjAssetType#596
andrew-ifrita merged 3 commits into
mainfrom
fix/fungible-fungible

Conversation

@andrew-ifrita

@andrew-ifrita andrew-ifrita commented Jun 18, 2025

Copy link
Copy Markdown
Contributor

Consolidate FungibleStrAssetType and FungibleObjAssetType into FungibleAssetType

Both represent the same underlying structure.
There was an extra nested "Fungible" in ObjType as well that added unnecessary complexity.

edit: also consolidate XcmAsset and XcmMultiAsset into FungibleAsset and FungibleMultiAsset

Review Notes

I don't think this is a Chesterton's Fence but can I get a slightly more thorough review on this one? There is no underlying Asset struct in polkadot-sdk with a nested Fungible like FungibleObjAsset had. I could not find any reasonable explanation for the separation of the Obj and Str types. All tests continue to pass after the changes.

Both represent the same underlying structure.
There was an extra nested "Fungible" in ObjType as well that added
unnecessary complexity.
@andrew-ifrita andrew-ifrita force-pushed the fix/fungible-fungible branch from 18a2dd8 to d9f8628 Compare June 18, 2025 09:33
Comment thread src/createXcmTypes/types.ts Outdated
Comment thread src/createXcmTypes/types.ts Outdated

@TarikGul TarikGul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall nice refactor, just one small suggestion.

That all being said, I was pretty thorough in PR and looking for the actual use of the Fungible Object in the SDK and polkadot-js. I couldn't find anything so I think its safe to say we can definitely remove it.

@andrew-ifrita andrew-ifrita merged commit ee10255 into main Jun 18, 2025
13 checks passed
@andrew-ifrita andrew-ifrita deleted the fix/fungible-fungible branch June 18, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants