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 bigint literals with BigInt constructors #27930

Merged
merged 1 commit into from
Sep 20, 2022
Merged

fix: replace bigint literals with BigInt constructors #27930

merged 1 commit into from
Sep 20, 2022

Conversation

steveluscher
Copy link
Contributor

Problem

Some JavaScript runtimes support BigInt but not bigint literals.

Summary of Changes

  • Replace 18446744073709551615n with BigInt('0xffffffffffffffff')

This makes web3.js compatible with runtimes that don't understand bigint literals but do understand BigInt constructors. For whatever that's worth.

This makes web3.js compatible with runtimes that don't understand bigint literals but _do_ understand `BigInt` constructors.
For whatever that's worth.
@steveluscher steveluscher marked this pull request as ready for review September 20, 2022 00:00
@steveluscher
Copy link
Contributor Author

I'm not 100% sure we should do this. It's just a thought.

@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #27930 (74117f8) into master (e6687b8) will increase coverage by 0.1%.
The diff coverage is 95.8%.

@@            Coverage Diff            @@
##           master   #27930     +/-   ##
=========================================
+ Coverage    77.3%    77.4%   +0.1%     
=========================================
  Files          55       55             
  Lines        2889     2910     +21     
  Branches      402      404      +2     
=========================================
+ Hits         2234     2255     +21     
  Misses        514      514             
  Partials      141      141             

@steveluscher steveluscher merged commit d466799 into solana-labs:master Sep 20, 2022
@steveluscher steveluscher deleted the bake-bigints branch September 20, 2022 01:31
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.

None yet

2 participants