From 6f5a831e6b1b64f35f766fdc1631080a32050a18 Mon Sep 17 00:00:00 2001 From: Hanjun Kim Date: Thu, 7 Oct 2021 17:05:45 +0900 Subject: [PATCH] test: fix expected value due to the change in deposit logic, expected value in test also changed --- x/liquidity/keeper/liquidity_pool_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/liquidity/keeper/liquidity_pool_test.go b/x/liquidity/keeper/liquidity_pool_test.go index d09eeb758..6a020e5c2 100644 --- a/x/liquidity/keeper/liquidity_pool_test.go +++ b/x/liquidity/keeper/liquidity_pool_test.go @@ -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))) }