-
Notifications
You must be signed in to change notification settings - Fork 312
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
Consolidate poxAddress type #1508
Labels
feature
Brand new functionality. New pages, workflows, endpoints, etc.
Comments
friedger
added
the
feature
Brand new functionality. New pages, workflows, endpoints, etc.
label
Jun 20, 2023
Will do. I wholeheartedly agree 🙏🏻 |
This work is complete. It will be released when we do a next major version release. |
@janniks has this been released? if so lets close this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
extractPoxAddressFromClarityValue and DelegationInfo define different poxAddress types
Type error like the one below happen when using DelegationInfo and the result of extractPoxAddressFromClarityValue:
Type '{ version: number; hashBytes: Uint8Array; } | undefined' is not assignable to type '{ version: Uint8Array; hashbytes: Uint8Array; } | undefined'.
Solution
Define type PoxAddress as
{ version: number; hashBytes: Uint8Array; }
and use it everywhere.Alternatives
{ version: Uint8Array; hashbytes: Uint8Array; }
- Btc addresses use type number forversion
, therefore PoxAddress should adopt type number as well. PoXAddressVersion uses number as well.The text was updated successfully, but these errors were encountered: