-
Notifications
You must be signed in to change notification settings - Fork 606
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
Feature/add details to join exit pool reponse #1886
Feature/add details to join exit pool reponse #1886
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! I personally think adding responses to messages are super useful.
Can we make sure we add new test cases and checks for the new fields to ensure they return expected values?
Also, can you drop the changes for go.mod
and go.sum
as well? Otherwise, logic itself
lgtm!
@@ -296,7 +298,7 @@ func (suite *KeeperTestSuite) TestJoinPoolNoSwap() { | |||
keeper := suite.App.GAMMKeeper | |||
// Test the "tokenInMaxs" | |||
// In this case, to get the 50 * OneShare amount of share token, the foo, bar token are expected to be provided as 5000 amounts. | |||
err := keeper.JoinPoolNoSwap(suite.Ctx, suite.TestAccs[1], poolId, types.OneShare.MulRaw(50), sdk.Coins{ | |||
_, _, err := keeper.JoinPoolNoSwap(suite.Ctx, suite.TestAccs[1], poolId, types.OneShare.MulRaw(50), sdk.Coins{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add check and test ShareOutAmount and TokenIn returned here is as expected?
@@ -493,7 +495,7 @@ func (suite *KeeperTestSuite) TestJoinPoolExitPool_InverseRelationship() { | |||
balanceBeforeJoin := suite.App.BankKeeper.GetAllBalances(suite.Ctx, joinPoolAcc) | |||
fmt.Println(balanceBeforeJoin.String()) | |||
|
|||
err = suite.App.GAMMKeeper.JoinPoolNoSwap(suite.Ctx, joinPoolAcc, poolId, tc.joinPoolShareAmt, sdk.Coins{}) | |||
_, _, err = suite.App.GAMMKeeper.JoinPoolNoSwap(suite.Ctx, joinPoolAcc, poolId, tc.joinPoolShareAmt, sdk.Coins{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto:Can we add check and test ShareOutAmount and TokenIn returned here is as expected?
Needs changelog entry as well, but feature looks good to me! |
Ok so that this doesn't get blocked, going to work on a PR into this branch that should suffice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the changes made in quasar-finance#2 Let's merge this once quasar-finance#2 gets merged!
Dev/takeover 1886
What is the purpose of the change
This PR adds more information to response of join/exit pool handlers so the caller of the transaction in ICA receives these information on acknowledgment.
Brief Changelog
tokenIn sdk.Coins
,sharesOut sdk.Int
to return ofJoinPoolNoSwap
share_out_amount
andtoken_in
fields toMsgJoinPoolResponse
token_out
field toMsgExitPoolResponse
Testing and Verifying
This change added tests and can be verified as follows:
TestJoinPoolNoSwap
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (no)