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

Hermes compatibility #801

Closed
AlexBHarley opened this issue May 13, 2021 · 3 comments · Fixed by #803
Closed

Hermes compatibility #801

AlexBHarley opened this issue May 13, 2021 · 3 comments · Fixed by #803

Comments

@AlexBHarley
Copy link
Contributor

AlexBHarley commented May 13, 2021

Just wanted to flag that something in the @cosmjs/stargate package breaks in Hermes. Basically requiring the package yields undefined.

If I find anything I'll update this issue.

@AlexBHarley
Copy link
Contributor Author

I've nailed it down to this line

export const defaultGasPrice = GasPrice.fromString("0.025ucosm");

In cosmjs/packages/stargate/src/signingstargateclient.ts

@AlexBHarley
Copy link
Contributor Author

This is the regex it doesn't like, const matchResult = gasPrice.match(/^(?<amount>.+?)(?<denom>[a-z]+)$/); because Hermes doesn't support Regex groups facebook/hermes#89.

@webmaster128
Copy link
Member

Thanks for bringing this up. I was not aware of any regex syntax change. I would have expected that TypeScript converts this or errors since our target is es2017. There is a TypeScript bug that describes this problem: microsoft/TypeScript#36132.

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 a pull request may close this issue.

2 participants