cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
655 stars 344 forks source link

Update validation of GasPrice.fromString to allow using ibc denoms as gas denom #1522

Closed madrezaz closed 11 months ago

madrezaz commented 11 months ago

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.

madrezaz commented 11 months ago

@webmaster128 sure. although the reason I changed the structure was the consistency of the regex with the one in the sdk.

webmaster128 commented 11 months ago

okay, just the linter: yarn && yarn lint-fix should do

webmaster128 commented 11 months ago

released today as part of 0.32.2