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

Added Static Method to Account Class for Key Validation #931

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

digimbyte
Copy link

Introduced a validateKey static method in the Account class that validates a string input and returns its type if valid, or void/undefined if invalid. This method streamlines validation by reducing the need for try/catch blocks and complex conditional checks, providing a clear and direct approach for assessing the health status of a string input.

Copy link
Member

@snowypowers snowypowers left a comment

Choose a reason for hiding this comment

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

unit tests?

packages/neon-core/src/wallet/Account.ts Outdated Show resolved Hide resolved
packages/neon-core/src/wallet/Account.ts Outdated Show resolved Hide resolved
packages/neon-core/src/wallet/Account.ts Outdated Show resolved Hide resolved
packages/neon-core/src/wallet/Account.ts Outdated Show resolved Hide resolved
@digimbyte
Copy link
Author

@snowypowers thanks for looking at it, I wrote it mid project while juggling other code
upgraded to enums per requested and fixed a few missing elements.
should resolve with falsely values

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