You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
One approach to this could be including the network byte handling in EmojiId in a generic way: when constructing an EmojiId, the caller can optionally include an extra byte to be combined with the checksum. This would allow for the existing functionality to be retained, while also supporting the requirements of TariAddress.
The text was updated successfully, but these errors were encountered:
There is a fair amount of duplication between
TariAddress
andEmojiId
. Both represent a public key, butTariAddress
additionally includes a network representation combined with the checksum. While the use cases are strictly different (anEmojiId
need not represent a wallet address), the overlap has a bad code smell that suggests the abstractions might be a bit off.One approach to this could be including the network byte handling in
EmojiId
in a generic way: when constructing anEmojiId
, the caller can optionally include an extra byte to be combined with the checksum. This would allow for the existing functionality to be retained, while also supporting the requirements ofTariAddress
.The text was updated successfully, but these errors were encountered: