-
-
Notifications
You must be signed in to change notification settings - Fork 9
feat(account-api): add group/wallet id parsing support #360
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
Conversation
Co-authored-by: David Drazic <david@timechaser.org>
| * | ||
| * @param groupId - The multichain account group ID to validate and parse. | ||
| * @returns The parsed multichain account group ID. | ||
| * @throws When the group ID format is invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I suggested having a type of the error in front is because it's proposed by TSDoc and also some editors (like mine) are recognizing it that way. It's not a blocker, but something to think about.
https://tsdoc.org/pages/tags/throws/
They're more specific about their suggestion:
It is suggested, but not required, for the @throws block to start with a line containing only the name of the exception.
For example what I see in editor:

So, it's kinda "more semantic" and IDE uses it in some way.
But, anyway this is not hard requirement, just some stuff good to know if you want to consider having in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware of this TBH. It's good that you share this! I'll definitely start using those then, I thought those were just old type annotation that we were not really using anymore in tsdoc (cause we don't really have rule to enforce this in all the linter/toolings we have in place).
Anyway, I'll make sure to update our docs with this next time! 👍
Adding parsing helpers (similar to the ones we have in `@metamask/utils` for CAIP) for account wallet/group IDs. --------- Co-authored-by: David Drazic <david@timechaser.org>

Adding parsing helpers (similar to the ones we have in
@metamask/utilsfor CAIP) for account wallet/group IDs.