-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store type name of a field in event metadata #654
Conversation
LGTM aside from my tiny nit and Andrew's suggestion! |
@@ -457,7 +490,13 @@ impl TryFrom<RuntimeMetadataPrefixed> for Metadata { | |||
fields: variant | |||
.fields() | |||
.iter() | |||
.map(|f| (f.name().map(|n| n.to_owned()), f.ty().id())) | |||
.map(|f| { | |||
EventFieldMetadata::new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Maybe we could use something like impl From<Field<PortableForm>>
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for contributing! 👍
Fields in
EventMetadata
now also store name of a type specified in the pallet's source code.Required for #673 in
cargo-contract