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

feat(address): improved NewAddress to support both bech32/base58 #760

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

verbotenj
Copy link
Contributor

No description provided.

@verbotenj verbotenj requested a review from a team as a code owner October 15, 2024 15:25
var decoded []byte
var err error

if isMixedCase(addr) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably drop the helper function and just do something like if strings.ToLower(addr) != addr {. This will effectively detect upper-case characters in the string, which we should never see for bech32.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a smart move, thanks

Signed-off-by: Ales Verbic <verbotenj@blinklabs.io>
@verbotenj verbotenj merged commit ee4c98b into main Oct 15, 2024
8 checks passed
@verbotenj verbotenj deleted the feat/imporove-newaddress branch October 15, 2024 17:49
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