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

Code overlap between TariAddress and EmojiId #6291

Open
AaronFeickert opened this issue Apr 19, 2024 · 0 comments
Open

Code overlap between TariAddress and EmojiId #6291

AaronFeickert opened this issue Apr 19, 2024 · 0 comments

Comments

@AaronFeickert
Copy link
Collaborator

AaronFeickert commented Apr 19, 2024

There is a fair amount of duplication between TariAddress and EmojiId. Both represent a public key, but TariAddress additionally includes a network representation combined with the checksum. While the use cases are strictly different (an EmojiId need not represent a wallet address), the overlap has a bad code smell that suggests the abstractions might be a bit off.

After discussion, it sounds like the preferred design would be to make EmojiId a thin wrapper around a byte representation that only performs encoding and decoding, but not checksums. It would be up to higher-level abstractions (like keys or addresses) to handle checksums and other application-specific details.

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

No branches or pull requests

1 participant