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: fork URL and fetch for React Native in web3.js #26604

Merged
merged 1 commit into from
Jul 13, 2022
Merged

fix: fork URL and fetch for React Native in web3.js #26604

merged 1 commit into from
Jul 13, 2022

Conversation

steveluscher
Copy link
Contributor

@steveluscher steveluscher commented Jul 13, 2022

Problem

React Native has a kneecapped URL implementation, and uses a browser-like fetch API. For web3.js to work in React Native we need to supply forks/polyfills.

Summary of Changes

  • Create a fork of the URL impl for use in React Native
  • Use the same fetch fork as we do for browsers
  • Convince the build system to build a React Native bundle.

@steveluscher steveluscher added enhancement New feature or request automerge Merge this Pull Request automatically once CI passes javascript Pull requests that update Javascript code labels Jul 13, 2022
@mergify
Copy link
Contributor

mergify bot commented Jul 13, 2022

automerge label removed due to a CI failure

@mergify mergify bot removed the automerge Merge this Pull Request automatically once CI passes label Jul 13, 2022
@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

Merging #26604 (ad8ee4b) into master (1165a7f) will decrease coverage by 4.3%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master   #26604       +/-   ##
===========================================
- Coverage    81.9%    77.5%     -4.4%     
===========================================
  Files         631       41      -590     
  Lines      174252     2374   -171878     
  Branches        0      343      +343     
===========================================
- Hits       142728     1842   -140886     
+ Misses      31524      405    -31119     
- Partials        0      127      +127     

@steveluscher steveluscher merged commit 8174021 into solana-labs:master Jul 13, 2022
@steveluscher steveluscher deleted the fetch-and-url-for-react-native branch July 13, 2022 04:41
Lcchy pushed a commit to Bonfida/solana that referenced this pull request Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant