-
Notifications
You must be signed in to change notification settings - Fork 336
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
Update validation of GasPrice.fromString to allow using ibc denoms as gas denom #1522
Update validation of GasPrice.fromString to allow using ibc denoms as gas denom #1522
Conversation
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.
Thank for the fix. Could you keep the structure of the code as it was before? This provides much more detailed error messages to the user in case something is wrong.
@webmaster128 sure. although the reason I changed the structure was the consistency of the regex with the one in the sdk. |
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.
Thank you! Could you rebase that to latest main? I made a bis of an mistake before where the 0.32.1 release was published to npm but not yet pushed to GitHub. I.e. the new CHANGELOG entry should move into the Unreleased section above 0.32.1.
db1cf5f
to
fb20b92
Compare
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.
Thanks
okay, just the linter: |
released today as part of 0.32.2 |
Currently the
GasPrice.fromString
method claims that the denom validation matches the "Cosmos SDK 0.42 pattern"; But the regex being used for validation is not the same as the one used in the sdk. Because of that, creating a gas price using IBC denoms which contain "/" is not possible and throws an error. This PR intends to update the validation regex to fix this issue.