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 getAction for cases where minifier changes function names #2132

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

acedward
Copy link
Contributor

@acedward acedward commented Apr 14, 2024

Some minifiers, as esbuild, might change name functions.
e.g., sendTransaction to sendTransaction5

So client[action.name ?? name] only checks the first value and never falls back to name.

closes #2117


PR-Codex overview

This PR focuses on fixing the getAction function to handle cases where minifiers change function names, ensuring the correct function is called.

Detailed summary

  • Updated getAction to handle cases where minifiers change function names
  • Refactored function name retrieval logic for reliability

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Apr 14, 2024

🦋 Changeset detected

Latest commit: 85045ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Apr 14, 2024

@acedward is attempting to deploy a commit to the wevm Team on Vercel.

A member of the Team first needs to authorize it.

@jxom jxom merged commit 8c3eb6a into wevm:main Apr 15, 2024
12 of 20 checks passed
@github-actions github-actions bot mentioned this pull request Apr 15, 2024
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.

bug: JS Minification breaks getAction()
2 participants