Skip to content

Implement the rpc handler method for RegisterAccount#2110

Merged
chatton merged 13 commits intomainfrom
cian/issue#2055-implement-the-rpc-handler-method-for-registeraccount
Aug 29, 2022
Merged

Implement the rpc handler method for RegisterAccount#2110
chatton merged 13 commits intomainfrom
cian/issue#2055-implement-the-rpc-handler-method-for-registeraccount

Conversation

@chatton
Copy link
Contributor

@chatton chatton commented Aug 24, 2022

Description

The suggestions in this discussion have been pulled into this PR.

closes: #2055


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@chatton chatton marked this pull request as ready for review August 25, 2022 09:28
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

LGTM, could you add a msg_server_test.go? With simple success/fail tests cases?

Copy link
Contributor

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Looks great! I agree with @colin-axner's suggestions. I think it may be nicer to just return the channelID string directly :)

Copy link
Contributor

@seantking seantking left a comment

Choose a reason for hiding this comment

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

LGTM once @colin-axner changes are in.

ibctesting "github.com/cosmos/ibc-go/v5/testing"
)

func (suite *KeeperTestSuite) TestRegisterAccount() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@colin-axner some of tests are the same or very similar as the existing tests for RegisterInterchainAccount such as this one let me know if you think it's overkill to have the test in multiple locations.

Copy link
Contributor

Choose a reason for hiding this comment

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

When we deprecate RegisterInterchainAccount in favor of the message server API, we can just remove the others. I think it is fine to have duplicates for now

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

ACK, nice work! Left just a few suggestions but otherwise looks great to me

ibctesting "github.com/cosmos/ibc-go/v5/testing"
)

func (suite *KeeperTestSuite) TestRegisterAccount() {
Copy link
Contributor

Choose a reason for hiding this comment

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

When we deprecate RegisterInterchainAccount in favor of the message server API, we can just remove the others. I think it is fine to have duplicates for now

@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2022

Codecov Report

Merging #2110 (d8f1204) into main (dcd616c) will increase coverage by 0.04%.
The diff coverage is 82.60%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2110      +/-   ##
==========================================
+ Coverage   80.03%   80.08%   +0.04%     
==========================================
  Files         170      170              
  Lines       11823    11838      +15     
==========================================
+ Hits         9463     9480      +17     
+ Misses       1942     1940       -2     
  Partials      418      418              
Impacted Files Coverage Δ
...7-interchain-accounts/controller/keeper/account.go 82.35% <71.42%> (+4.57%) ⬆️
...nterchain-accounts/controller/keeper/msg_server.go 100.00% <100.00%> (+100.00%) ⬆️

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Superb work!

@chatton chatton merged commit b7d8359 into main Aug 29, 2022
@chatton chatton deleted the cian/issue#2055-implement-the-rpc-handler-method-for-registeraccount branch August 29, 2022 11:14
mergify bot pushed a commit that referenced this pull request Aug 29, 2022
colin-axner pushed a commit that referenced this pull request Aug 29, 2022
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.

Implement the rpc handler method for RegisterAccount

5 participants