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

chore: change Namespace enum to stirng #964

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

Conversation

yeager-eren
Copy link
Collaborator

@yeager-eren yeager-eren commented Dec 9, 2024

Summary

Using a single source of truth for Namespace.

We need to use a single type for both legacy and hub implementation. To make it more general and don't needing to always keeping the namespace updated by what Rango currently support, I changed it to string, instead of enum. To have namespace suggestion while coding, I used a trick to suggest our supported namespaces alongside the fact that it can be any string.

Fixes # (issue)

How did you test this change?

It should be compiled correctly, shouldn't affect the functionality of working with wallets.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Implemented a user interface (UI) change, referencing our Figma design to ensure pixel-perfect precision.

@@ -0,0 +1,8 @@
{
"name": "@rango-dev/wallets-core/namespaces/common",
Copy link
Member

Choose a reason for hiding this comment

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

NIT: The package name specified in package.json (@rango-dev/wallets-core/namespaces/common) does not comply with npm naming conventions. The issue arises because the name contains multiple slashes (/), which are not permitted except for the scope delimiter.

You can check these two links:
https://docs.npmjs.com/package-name-guidelines
https://github.com/npm/validate-npm-package-name

I suggest replacing additional slashes with hyphens: @rango-dev/wallets-core-namespaces-common.
This change ensures compatibility with npm and avoids build or publish errors.

Copy link
Member

@nikaaru nikaaru left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants