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: replace computed max u64 constant with literal #27765

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

jstarry
Copy link
Member

@jstarry jstarry commented Sep 13, 2022

Problem

Some bundlers convert ** to Math.pow which breaks bigint exponentiation used in the web3 sdk

Summary of Changes

  • Replace calculated max u64 with a literal value for improved compatibility

Fixes #

@jstarry jstarry added the automerge Merge this Pull Request automatically once CI passes label Sep 13, 2022
@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Merging #27765 (ac31813) into master (e779032) will increase coverage by 0.4%.
The diff coverage is n/a.

❗ Current head ac31813 differs from pull request most recent head 5b77508. Consider uploading reports for the commit 5b77508 to get more accurate results

@@            Coverage Diff            @@
##           master   #27765     +/-   ##
=========================================
+ Coverage    76.9%    77.3%   +0.4%     
=========================================
  Files          48       55      +7     
  Lines        2505     2889    +384     
  Branches      355      402     +47     
=========================================
+ Hits         1927     2234    +307     
- Misses        448      514     +66     
- Partials      130      141     +11     

@mergify mergify bot merged commit afe1cfe into solana-labs:master Sep 13, 2022
@jstarry jstarry deleted the web3/const-u64 branch September 16, 2022 13:19
@steveluscher
Copy link
Contributor

Nice. And we could go even further by converting that to BigInt('18446744073709551615') for compatibility with runtimes that don't support bigint literals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants