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: resolve crypto-browserify global reference error in browser environments #95

Merged

Conversation

sarvalabs-harshrastogi
Copy link
Member

@sarvalabs-harshrastogi sarvalabs-harshrastogi commented Nov 13, 2024

Package failed in browser environments

This pull request resolves the where package is failed in browser environment due to bug in crypto-browserify package. Causing error.

Uncaught ReferenceError: global is not defined

The following are the issue we are facing:

Apart from it update the node version to v20 in github pipelines

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have tested this code
  • I have updated the README and other relevant documents (guides...)

Copy link

cloudflare-workers-and-pages bot commented Nov 13, 2024

Deploying js-moi-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 69d9667
Status: ✅  Deploy successful!
Preview URL: https://500b2039.js-moi-sdk.pages.dev
Branch Preview URL: https://fix-ws-connect-failed-in-bro.js-moi-sdk.pages.dev

View logs

@sarvalabs-harshrastogi sarvalabs-harshrastogi changed the base branch from develop to refactor/interaction-struct November 15, 2024 11:10
@sarvalabs-gokul sarvalabs-gokul merged commit 2ce6931 into refactor/interaction-struct Nov 15, 2024
2 checks passed
sarvalabs-gokul added a commit that referenced this pull request Nov 15, 2024
* feat: modified the interaction object schema

* refactor: replaced logic schema with logic deploy and interact schema

* refactor: added participants to ix object

* feat: improved the logic to process funds and participants.

- updated the documentation with latest interaction structure
- enhanced the participant structure

* refactor: improved the transaction payload type

* refactor: replace transactions with ix_operations

* refactor: added support to encode participant create schema

* refactor: rename transaction payload with operation payload

- rename txtype to optype

* fix: resolve failing test case

* refactor: replaced transaction keyword with operations.

- added participant create info to docs

* refactor: enhanced the logic to call or estimate ixn

* refactor: added with_commit_info arg to get tesseract method

* refactor: updated the get tesseract examples

* fix: remove base64 decoding from new logs (#94)

* fix: resolve `crypto-browserify` global reference error in browser environments (#95)

---------

Co-authored-by: Harsh Rastogi <[email protected]>
Co-authored-by: Harsh Rastogi <[email protected]>
sarvalabs-gokul added a commit that referenced this pull request Nov 15, 2024
* enhance interaction struct to support multiple operations (#77)

* feat: modified the interaction object schema

* refactor: replaced logic schema with logic deploy and interact schema

* refactor: added participants to ix object

* feat: improved the logic to process funds and participants.

- updated the documentation with latest interaction structure
- enhanced the participant structure

* refactor: improved the transaction payload type

* refactor: replace transactions with ix_operations

* refactor: added support to encode participant create schema

* refactor: rename transaction payload with operation payload

- rename txtype to optype

* fix: resolve failing test case

* refactor: replaced transaction keyword with operations.

- added participant create info to docs

* refactor: enhanced the logic to call or estimate ixn

* refactor: added with_commit_info arg to get tesseract method

* refactor: updated the get tesseract examples

* fix: remove base64 decoding from new logs (#94)

* fix: resolve `crypto-browserify` global reference error in browser environments (#95)

---------

Co-authored-by: Harsh Rastogi <[email protected]>
Co-authored-by: Harsh Rastogi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working providers Issues related to providers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package fails in browser environments due to crypto-browserify global reference error labels
2 participants