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 allow optional attributes on decodeAttributes #1198

Closed
wants to merge 1 commit into from

Conversation

holyxiaoxin
Copy link

Empty events emitted will result in missing attributes field in events object, which is a legit scenario.

{
   "type": "cosmos.module.EmittedEvent"
}

Which causes decodeAttributes assertArray throw an exception UnhandledPromiseRejectionWarning: Error: Value must not be undefined. I'm proposing to make this field optional.

@webmaster128
Copy link
Member

Thank you for bringing this up. Could you please have a look in #1199 for an alternative implementation?

@webmaster128
Copy link
Member

Shipped as part of CosmJS 0.29.0

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