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

feat: Add user rejected error code handling in getSwapErrorCode #2056

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

Conversation

VolodymyrBg
Copy link

What changed? Why?

This commit adds handling for error code 4001 (user rejected request) in the getSwapErrorCode utility function.

The function now properly maps error code 4001 to USER_REJECTED_ERROR_CODE, which allows for consistent error handling across the application when a user rejects a transaction.

This addresses the TODO comment in the getSwapErrorCode function to handle additional error codes.

Added a corresponding test case to verify the new functionality.

Notes to reviewers

How has it been tested?

Copy link

vercel bot commented Feb 28, 2025

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

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ❌ Failed (Inspect) Feb 28, 2025 8:01pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2025 8:01pm

Copy link

vercel bot commented Feb 28, 2025

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

A member of the Team first needs to authorize it.

@VolodymyrBg
Copy link
Author

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