Skip to content

Commit

Permalink
test: fix expected value
Browse files Browse the repository at this point in the history
due to the change in deposit logic, expected value in test
also changed
  • Loading branch information
hallazzang committed Oct 7, 2021
1 parent e802d1e commit 6f5a831
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/liquidity/keeper/liquidity_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -997,10 +997,10 @@ func TestDepositWithCoinsSent(t *testing.T) {
liquidity.EndBlocker(ctx, simapp.LiquidityKeeper)

reserveCoins = simapp.LiquidityKeeper.GetReserveCoins(ctx, pool)
require.True(sdk.IntEq(t, sdk.NewInt(3999999), reserveCoins.AmountOf(DenomX))) // This is because of decimal truncation error.
require.True(sdk.IntEq(t, sdk.NewInt(4000000), reserveCoins.AmountOf(DenomX)))
require.True(sdk.IntEq(t, sdk.NewInt(6000000), reserveCoins.AmountOf(DenomY)))
balances := simapp.BankKeeper.GetAllBalances(ctx, addr)
require.True(sdk.IntEq(t, sdk.NewInt(1000001), balances.AmountOf(DenomX)))
require.True(sdk.IntEq(t, sdk.NewInt(1000000), balances.AmountOf(DenomX)))
require.True(sdk.IntEq(t, sdk.NewInt(0), balances.AmountOf(DenomY)))
require.True(sdk.IntEq(t, sdk.NewInt(999999), balances.AmountOf(pool.PoolCoinDenom)))
require.True(sdk.IntEq(t, sdk.NewInt(1000000), balances.AmountOf(pool.PoolCoinDenom)))
}

0 comments on commit 6f5a831

Please sign in to comment.