Skip to content

Reduce boilerplate in fungible::ItemOf impl + add missing redirects for overridable provided trait methods#2860

Closed
nanocryk wants to merge 2 commits intoparitytech:masterfrom
nanocryk:fungible-item-of-redirect-macro
Closed

Reduce boilerplate in fungible::ItemOf impl + add missing redirects for overridable provided trait methods#2860
nanocryk wants to merge 2 commits intoparitytech:masterfrom
nanocryk:fungible-item-of-redirect-macro

Conversation

@nanocryk
Copy link
Copy Markdown
Contributor

@nanocryk nanocryk commented Jan 5, 2024

Use a macro to reduce boilerplate in fungible::ItemOf following this suggestion:
#2858 (comment)

While doing the change I noticed provided methods in traits were not redirected, which means custom behavior in the fungibles version was ignored in the fungible one. I thus added their redirection.

@nanocryk nanocryk requested review from a team January 5, 2024 15:49
@paritytech-review-bot paritytech-review-bot bot requested a review from a team January 5, 2024 15:50
use sp_core::Get;
use sp_runtime::{DispatchError, DispatchResult};

// Redirects `fungible` function to the `fungibles` equivalent with the proper AssetId.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be a doc comment?

@ggwpez ggwpez requested a review from muharem January 12, 2024 19:08
@nanocryk nanocryk closed this Mar 7, 2024
bkchr pushed a commit that referenced this pull request Apr 10, 2024
* RELEASE.md

* updated running-relayer.md
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