Skip to content

refactor: remove an unnecessary console.warn #1528

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

blakecduncan
Copy link
Collaborator

@blakecduncan blakecduncan commented Apr 9, 2025

Any dev that implements the eoa connection flow will be flooded with these warnings.

Pull Request Checklist


PR-Codex overview

This PR focuses on modifying the behavior of the useSmartAccountClient hook in the account-kit/react/src/hooks/useSmartAccountClient.ts file. It adjusts the logic for returning the smart account client based on the connection status.

Detailed summary

  • Removed the console warning message: console.warn("EOA is connected, will not return an SCA client");
  • Introduced a conditional return of null for the eoaClient when isConnected is false.
  • The client property in the returned object is set to undefined.

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

Copy link

vercel bot commented Apr 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 1:52pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 1:52pm

Copy link

graphite-app bot commented Apr 9, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot temporarily deployed to docs-preview April 9, 2025 16:11 Inactive
Copy link

github-actions bot commented Apr 9, 2025

🌿 Documentation Preview

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Apr 10, 2025, 1:35 PM

@@ -88,7 +88,6 @@ export function useSmartAccountClient({

const eoaClient = useMemo(() => {
if (!isConnected) return null;
console.warn("EOA is connected, will not return an SCA client");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@moldy530 I see you added this in, any concerns with removing this?

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.

1 participant