Skip to content
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

Fix typo in v14 metadata parser #318

Closed
wants to merge 2 commits into from

Conversation

HolyGrease
Copy link

Description

Fix typo in metadata parser.

For example chain contains event like so:

pub enum Event<T: Config> {
  AccountUpdated {
    account_id: T::AccountId,
    username: T::Username,
    new_username: Option<T::Username>,
    phone_number_hash: T::PhoneNumberHash,
    new_phone_number_hash: Option<T::PhoneNumberHash>,
  },
  // ...
}

Now after decoding chain events you get something like this, where instead of field names uses field types:

{
  T::AccountId: ...,
  T::Username: ...,
  // ...
}

But the actual value should be:

{
  account_id: ...,
  username: ...,
  // ...
}

Copy link
Collaborator

@Lohann Lohann left a comment

Choose a reason for hiding this comment

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

@HolyGrease Thank you very much for the contribution! Seems some units tests are failling, if you want to run only the unit tests of substrate_metadata package, you can do this:

dart run melos exec --scope="substrate_metadata"  -- 'dart test'

@justkawal
Copy link
Collaborator

Closing this as no followup is taken and everything already seems to be working fine without the typo.

@justkawal justkawal closed this Nov 2, 2023
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.

4 participants