stellar / js-stellar-base

The lowest-level stellar helper library. It consists of classes to read, write, hash, and sign Stellar xdr
https://stellar.github.io/js-stellar-base/
Apache License 2.0
106 stars 138 forks source link

Add compatibility with pre-ES2016 environments (like some React Native JS compilers) by adding a custom `Buffer.subarray` polyfill #733

Closed overcat closed 5 months ago

overcat commented 6 months ago

We need to wait for the new version of js-xdr to be released first.

Shaptic commented 5 months ago

@overcat @stellar/js-xdr@v3.1.1 is out

overcat commented 5 months ago

stellar-base also uses Buffer.subarray https://github.com/stellar/js-stellar-base/blob/d87eb011d7b5fb8dfea8bada6675dbf06b0818cf/src/util/decode_encode_muxed_account.js#L109

overcat commented 5 months ago

Hi @Shaptic, stellar-sdk does not seem to directly use Buffer.subarray, so we do not need to add this polyfill in stellar-sdk for now. We just need to update the version of stellar-base in stellar-sdk.

So next, we need to:

  1. Merge this PR
  2. Release the new stellar-base
  3. Update the stellar-base version in stellar-sdk
  4. Release the new stellar-sdk