-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat!: bech32 #441
Merged
Merged
feat!: bech32 #441
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Total Coverage: 89.88% Coverage Report
|
camsjams
requested review from
a team and
luizstacio
and removed request for
AlicanC
August 17, 2022 07:20
Total Coverage: 89.86% Coverage Report
|
luizstacio
requested changes
Aug 17, 2022
Total Coverage: 89.86% Coverage Report
|
luizstacio
previously approved these changes
Aug 18, 2022
… directly (#461) relocate predicate related helpers
Total Coverage: 89.80% Coverage Report
|
luizstacio
approved these changes
Aug 21, 2022
QuinnLee
approved these changes
Aug 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I refactored this a couple of times after looking through the fuels-rs version of the
Bech32
implementation.What first?
I think it make sense to first look over these two files before diving into all of the changes:
Address: https://github.com/FuelLabs/fuels-ts/blob/feature/bech32/packages/address/src/address.ts
Address Utils: https://github.com/FuelLabs/fuels-ts/blob/feature/bech32/packages/address/src/utils.ts
What is nice about the Rust version is that the
Bech32
value is a container rather than just a string. This was what I eventually realized made the most sense as this allows a little more clarity of what kind ofAddress
you are handling.There are still some places where an address is an ambiguous
string
orBytesLike
which I opted to leave alone for now, but open to also refactoring them as part of this issue.