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: fixed strict check for paymasterUrl in useCapabilities #2059

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hexcow
Copy link

@hexcow hexcow commented Mar 3, 2025

Title:

Fixed strict check for paymasterUrl in useCapabilities

Description:

What changed? Why?
Previously, paymasterService was added even when paymasterUrl was an empty string (""), resulting in an invalid configuration. Now, the check ensures that paymasterService is only included if paymasterUrl is not empty, preventing incorrect payloads.

Notes to reviewers
The main change is in the conditional logic—switched from a loose check to an explicit validation. This prevents edge cases where an empty string could lead to an incomplete configuration.

How has it been tested?

  • Added cases with empty and non-empty paymasterUrl values.
  • Verified that paymasterService is only included when the URL is present.
  • Checked integration with usePaymaster to ensure no regressions.

Copy link

vercel bot commented Mar 3, 2025

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

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2025 4:30pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2025 4:30pm

Copy link

vercel bot commented Mar 3, 2025

@hexcow is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant