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

reward collector - ICA message unit tests #1005

Merged
merged 8 commits into from
Dec 4, 2023

Conversation

sampocs
Copy link
Collaborator

@sampocs sampocs commented Dec 2, 2023

  • Split SwapRewardTokens and TransferRewardTokensHostToTrade into 2 functions each - with one of them being a function only responsible for building a message
  • Added unit tests around each of these, with one to cover the message contents, and a different one to cover the ICA submission
  • Added a couple unit test helpers

Copy link
Contributor

@ethan-stride ethan-stride left a comment

Choose a reason for hiding this comment

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

Awesome! LGTM
Beautiful solution to being able to test the msg without any state being stored by the ICA submit -- this call structure should probably become our convention going forward. I left some suggestions to simply even further but they are mostly matters of taste we can discuss.

x/stakeibc/keeper/keeper_test.go Show resolved Hide resolved
x/stakeibc/keeper/reward_converter.go Outdated Show resolved Hide resolved
x/stakeibc/keeper/reward_converter.go Outdated Show resolved Hide resolved
x/stakeibc/keeper/reward_converter_test.go Show resolved Hide resolved
x/stakeibc/keeper/reward_converter_test.go Show resolved Hide resolved
x/stakeibc/keeper/reward_converter_test.go Show resolved Hide resolved
@sampocs sampocs merged commit fe21ad3 into autoswap-revenue-tokens Dec 4, 2023
1 check passed
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