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

refactor: change addr in payment module from string to AccAccount #93

Merged
merged 42 commits into from
Mar 10, 2023

Conversation

owen-reorg
Copy link
Contributor

Description

Change all internal usage of address from string to AccAccount

Rationale

Currently all addresses are string format. Since both upper case and lower case are valid, while set and get in store have to use the same address. It may cause many problems.

Now we convert all addresses in Msg to sdk.AccAddress in msg_server implementation, and convert them back to string before we save them into store. In the whole internal process, we'll use the sdk.AccAddress to prevent from potential wrong usage.

Changes

Notable changes:

  • Change all internal usage of address from string to AccAccount
  • Fix two bugs

@owen-reorg owen-reorg marked this pull request as draft March 8, 2023 18:28
@owen-reorg owen-reorg marked this pull request as ready for review March 10, 2023 04:32
@owen-reorg owen-reorg added the r4r label Mar 10, 2023
@unclezoro
Copy link
Collaborator

LGTM.

@unclezoro unclezoro merged commit 80a9495 into develop Mar 10, 2023
@unclezoro unclezoro deleted the payment-addr-refactor branch April 18, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants