-
Notifications
You must be signed in to change notification settings - Fork 0
fix: wretch default export compatibility in CommonJS #32
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK -- Was this also tested on platforms?
Yes, tested on desktop build |
|
🎉 This PR is included in version 1.7.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
@thanhdanh we don't have PRs for Mobile and BE? |
|
I don't think this works. |
|
Fix in #33 |
|
Side note: I'm unsure why we even have/need |
Summary
This PR fixes the issue where
wretchwas being called as a function but threw an error (wretch is not a function).The issue occurred because
wretch.browser.jsexports wretch as an ESModule default export, and when imported viarequire, the default export is wrapped inside a.defaultproperty. This fix explicitly accesses the.defaultproperty when importingwretch.browser.jsinwretch.js, ensuring compatibility with CommonJS.Tested on integration tests of
tron-api,solana-api