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

Remove buffer usage in favor or Uint8Array and Dataview #800

Merged
merged 18 commits into from
Jul 18, 2023

Conversation

algochoi
Copy link
Contributor

@algochoi algochoi commented Jul 6, 2023

This PR targets the v3.0 branch:

  • Added a utility function to decode base64 different for Node vs browsers
  • Update abi and examples files to remove Buffer usage
  • Update a couple examples where objects weren't being printed properly
  • Added a longer delay for asa examples due to flaky failures in indexer
  • Added a unit test for roundtrip encoding/decoding base64

Future work:

  • Update all usages of Buffer
  • Modify generator to remove Buffer usage
  • Remove Buffer dependency and lint rule

@algochoi algochoi changed the title DRAFT: Remove buffer usage in favor or Uint8Array and Dataview Remove buffer usage in favor or Uint8Array and Dataview Jul 10, 2023
@algochoi algochoi marked this pull request as ready for review July 10, 2023 21:43
src/utils/utils.ts Outdated Show resolved Hide resolved
@algochoi algochoi requested a review from winder July 11, 2023 19:32
src/utils/utils.ts Outdated Show resolved Hide resolved
src/utils/utils.ts Outdated Show resolved Hide resolved
tests/2.Encoding.js Outdated Show resolved Hide resolved
Copy link
Contributor

@Eric-Warehime Eric-Warehime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, needs rebase it looks like?

tests/4.Utils.ts Outdated Show resolved Hide resolved
examples/app.ts Outdated Show resolved Hide resolved
src/utils/utils.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some final thoughts -- once the import issue in the examples is fixed and the new text comparison test is added, I'll approve

examples/app.ts Outdated Show resolved Hide resolved
src/utils/utils.ts Outdated Show resolved Hide resolved
@algochoi algochoi merged commit 3150ea1 into 3.0.0 Jul 18, 2023
@algochoi algochoi deleted the remove-buffer-abi branch July 18, 2023 13:26
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.

3 participants