From bc8e3e6eb08b117f062bc7fbe9683d7f9a787eab Mon Sep 17 00:00:00 2001 From: Tyler <48813565+technicallyty@users.noreply.github.com> Date: Fri, 16 Dec 2022 00:08:56 -0800 Subject: [PATCH] fix: use actual result when unmarshaling value (#1555) --- x/evm/handler_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/x/evm/handler_test.go b/x/evm/handler_test.go index 923cbb6c..4a7d43a3 100644 --- a/x/evm/handler_test.go +++ b/x/evm/handler_test.go @@ -2,11 +2,12 @@ package evm_test import ( "errors" - "github.com/evmos/ethermint/x/evm/keeper" "math/big" "testing" "time" + "github.com/evmos/ethermint/x/evm/keeper" + sdkmath "cosmossdk.io/math" "github.com/gogo/protobuf/proto" @@ -16,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -375,7 +377,7 @@ func (suite *EvmTestSuite) TestDeployAndCallContract() { tx = types.NewTx(suite.chainID, 2, &receiver, big.NewInt(0), gasLimit, gasPrice, nil, nil, bytecode, nil) suite.SignTx(tx) - _, err = suite.handler(suite.ctx, tx) + result, err = suite.handler(suite.ctx, tx) suite.Require().NoError(err, "failed to handle eth tx msg") err = proto.Unmarshal(result.Data, &res) @@ -387,7 +389,7 @@ func (suite *EvmTestSuite) TestDeployAndCallContract() { tx = types.NewTx(suite.chainID, 2, &receiver, big.NewInt(0), gasLimit, gasPrice, nil, nil, bytecode, nil) suite.SignTx(tx) - _, err = suite.handler(suite.ctx, tx) + result, err = suite.handler(suite.ctx, tx) suite.Require().NoError(err, "failed to handle eth tx msg") err = proto.Unmarshal(result.Data, &res)