Skip to content

Conversation

@ccharly
Copy link
Contributor

@ccharly ccharly commented Aug 28, 2025

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

@ccharly ccharly marked this pull request as ready for review September 1, 2025 19:06
@ccharly ccharly requested a review from a team as a code owner September 1, 2025 19:06
cursor[bot]

This comment was marked as outdated.

Co-authored-by: David Drazic <david@timechaser.org>
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

*
* @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.
Copy link
Contributor

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:
Image

The other way around is like:
Image

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.

Copy link
Contributor Author

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! 👍

@ccharly ccharly enabled auto-merge September 2, 2025 19:16
@ccharly ccharly added this pull request to the merge queue Sep 2, 2025
Merged via the queue into main with commit 760ecda Sep 2, 2025
34 checks passed
@ccharly ccharly deleted the feat/account-api-utils branch September 2, 2025 19:26
Akaryatrh pushed a commit that referenced this pull request Oct 14, 2025
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>
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.

4 participants