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

fix: change AccAddressFromBech32 to MustAccAddressFromBech32 #691

Merged
merged 9 commits into from
Oct 11, 2022

Conversation

da1suk8
Copy link
Member

@da1suk8 da1suk8 commented Oct 4, 2022

Description

Fixed from AccAddressFromBech32 to MustAccAddressFromBech32.
MustAccAddressFromBech32 has error handling.

https://github.com/line/lbm-sdk/blob/4250dfb146e92af16698d1359be413fa5b5158ff/types/address.go#L158-L165

The test was modified in reference to below.
https://github.com/CosmWasm/wasmd/blob/ccb2fdd0b6ed849eb94d58e0174f4fc34bce336c/x/wasm/keeper/keeper_test.go#L520-L524
(Here, the appropriate comparison was not made.)

Motivation and context

Since AccAddressFromBech32 does not have error handling, MustAccAddressFromBech32, which has error handling, was used.

How has this been tested?

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@da1suk8 da1suk8 self-assigned this Oct 4, 2022
@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Merging #691 (0034636) into main (1a3eabd) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 0034636 differs from pull request most recent head e351e0f. Consider uploading reports for the commit e351e0f to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #691      +/-   ##
==========================================
+ Coverage   61.18%   61.20%   +0.01%     
==========================================
  Files         873      873              
  Lines       98501    98474      -27     
==========================================
+ Hits        60265    60268       +3     
+ Misses      34667    34615      -52     
- Partials     3569     3591      +22     
Impacted Files Coverage Δ
x/auth/types/account.go 76.16% <100.00%> (ø)
x/bank/types/balance.go 85.36% <100.00%> (ø)
x/bank/types/msgs.go 98.01% <100.00%> (ø)
x/foundation/msgs.go 85.09% <100.00%> (-0.08%) ⬇️
x/wasm/lbmtypes/tx.go 61.76% <100.00%> (+8.82%) ⬆️
x/foundation/keeper/tally.go 41.26% <0.00%> (-16.43%) ⬇️
x/foundation/keeper/exec.go 78.12% <0.00%> (-10.45%) ⬇️
x/foundation/keeper/msg_server.go 74.50% <0.00%> (-7.45%) ⬇️
x/foundation/keeper/member.go 86.48% <0.00%> (-2.63%) ⬇️
x/foundation/foundation.go 81.52% <0.00%> (-2.45%) ⬇️
... and 12 more

x/foundation/msgs.go Outdated Show resolved Hide resolved
@da1suk8 da1suk8 marked this pull request as ready for review October 5, 2022 09:10
x/foundation/msgs_test.go Outdated Show resolved Hide resolved
@da1suk8 da1suk8 requested a review from 0Tech October 6, 2022 02:54
@0Tech 0Tech self-requested a review October 6, 2022 06:44
Copy link
Collaborator

@0Tech 0Tech left a comment

Choose a reason for hiding this comment

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

Please update the change log. It would be nice to provide more detailed title and log.

@da1suk8 da1suk8 changed the title fix: add error handling fix: change AccAddressFromBech32 to MustAccAddressFromBech32. Oct 6, 2022
@da1suk8 da1suk8 changed the title fix: change AccAddressFromBech32 to MustAccAddressFromBech32. fix: change AccAddressFromBech32 to MustAccAddressFromBech32 Oct 6, 2022
@da1suk8 da1suk8 requested review from 0Tech and tnasu October 6, 2022 11:51
Copy link
Member

@zemyblue zemyblue left a comment

Choose a reason for hiding this comment

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

Please write the proper code link include commit hash when you write this github description or comment. Because if you use main or branch name, it can be changed through any update.

@da1suk8
Copy link
Member Author

da1suk8 commented Oct 7, 2022

Understood I have updated.
Thank you.

@da1suk8 da1suk8 requested a review from zemyblue October 7, 2022 05:15
@0Tech 0Tech self-requested a review October 11, 2022 02:35
@da1suk8 da1suk8 merged commit 580d404 into Finschia:main Oct 11, 2022
@da1suk8 da1suk8 deleted the fix/add_error_handling branch October 11, 2022 10:07
@zemyblue zemyblue mentioned this pull request Oct 27, 2022
5 tasks
@zemyblue zemyblue mentioned this pull request Nov 28, 2022
5 tasks
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.

None yet

4 participants