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

Replace deprecated usage of AddressFromBech32 with address.Codec #7835

Open
gjermundgaraba opened this issue Jan 10, 2025 · 1 comment
Open
Labels
good first issue Good for newcomers

Comments

@gjermundgaraba
Copy link
Contributor

gjermundgaraba commented Jan 10, 2025

We use a few different versions of *AddressFromBech32 in the code base, which is now deprecated. This should be replaced with use of an address.Codec as per the documentation:

// Deprecated: Use an address.Codec to convert addresses from and to string/bytes.
func AccAddressFromBech32(address string) (addr AccAddress, err error) {

Replace all the instance of these deprecated functions.

Look at how this is done in the SDK for a good pointer on how it should be done here.

@gjermundgaraba
Copy link
Contributor Author

@duvbell, I added a link to the SDK where you should go look for the different ways they get the correct codec at any given time. It is usually attached to a client context, so you shouldn't have to create it anywhere yourself.

If you want to work on this issue I can assign it to you (that's usually what we want before a PR, so people don't overlap work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

1 participant