Skip to content

Commit

Permalink
Return correct number of shares when joining stableswap pool
Browse files Browse the repository at this point in the history
The `joinPoolSharesInternal` method was not taking into account the newShares from single-sided LP joins.
  • Loading branch information
k-yang authored Jun 9, 2022
1 parent 94a3878 commit 2d76f55
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions x/gamm/pool-models/stableswap/amm.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ func (pa *Pool) joinPoolSharesInternal(ctx sdk.Context, tokensIn sdk.Coins, swap
return sdk.ZeroInt(), sdk.NewCoins(), err
}
pa.updatePoolForJoin(sdk.NewCoins(coin), newShare)
numShares = numShares.Add(newShare)
}

return numShares, tokensIn, nil
Expand Down

0 comments on commit 2d76f55

Please sign in to comment.