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

Fix broken encodeRunestoneUnsafe function #34

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

kevinfaveri
Copy link
Contributor

  • Add todo to unit test the exposed encoding function
  • Fix divisibility conditional, currently broken

The encodeRunestoneUnsafe is important in itself because while unsafe for real time data, it does a job in testing stuff like divisibility, among other conditionals. It can be used, in the future, to test also, by receiving current block, if the rune name is available.

It makes me think tho if rather than giving maintenance to encodeRunestoneUnsafe if it isnt better to just expose through the library Rune and SpacedRune, and then test the stuff currently being tested on encodeRunestoneUnsafe inside the contructor of Rune and SpacedRune. This way, you can remove the complexity of having encodeRunestoneUnsafe, and can rely completely on unit tests of the classes.

DX might suffer a bit, but then again you can just provide some examples in the readme on how to construct a rune from Rune or SpacedRune classes

@summraznboi summraznboi merged commit 5f11bae into me-foundation:main Apr 13, 2024
1 check passed
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