From 47b634132408d53736caab149d86c6acb197277e Mon Sep 17 00:00:00 2001 From: Solovyov1796 Date: Tue, 19 Nov 2024 18:20:43 +0800 Subject: [PATCH] fix unit test --- x/precisebank/types/fractional_balance_test.go | 4 ++-- x/precisebank/types/fractional_balances_test.go | 4 ++-- x/precisebank/types/genesis_test.go | 4 ++-- x/pricefeed/keeper/keeper_test.go | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/x/precisebank/types/fractional_balance_test.go b/x/precisebank/types/fractional_balance_test.go index 015b867f..2bb822e4 100644 --- a/x/precisebank/types/fractional_balance_test.go +++ b/x/precisebank/types/fractional_balance_test.go @@ -5,7 +5,7 @@ import ( "testing" sdkmath "cosmossdk.io/math" - "github.com/0glabs/0g-chain/app" + "github.com/0glabs/0g-chain/chaincfg" "github.com/0glabs/0g-chain/x/precisebank/types" "github.com/stretchr/testify/require" ) @@ -74,7 +74,7 @@ func TestNewFractionalBalance(t *testing.T) { } func TestFractionalBalance_Validate(t *testing.T) { - app.SetSDKConfig() + chaincfg.SetSDKConfig() tests := []struct { name string diff --git a/x/precisebank/types/fractional_balances_test.go b/x/precisebank/types/fractional_balances_test.go index 9d231cb2..869e4e60 100644 --- a/x/precisebank/types/fractional_balances_test.go +++ b/x/precisebank/types/fractional_balances_test.go @@ -7,14 +7,14 @@ import ( "testing" sdkmath "cosmossdk.io/math" - "github.com/0glabs/0g-chain/app" + "github.com/0glabs/0g-chain/chaincfg" "github.com/0glabs/0g-chain/x/precisebank/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" ) func TestFractionalBalances_Validate(t *testing.T) { - app.SetSDKConfig() + chaincfg.SetSDKConfig() tests := []struct { name string diff --git a/x/precisebank/types/genesis_test.go b/x/precisebank/types/genesis_test.go index e51014b8..7702037d 100644 --- a/x/precisebank/types/genesis_test.go +++ b/x/precisebank/types/genesis_test.go @@ -4,7 +4,7 @@ import ( "testing" sdkmath "cosmossdk.io/math" - "github.com/0glabs/0g-chain/app" + "github.com/0glabs/0g-chain/chaincfg" "github.com/0glabs/0g-chain/x/precisebank/testutil" "github.com/0glabs/0g-chain/x/precisebank/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,7 +12,7 @@ import ( ) func TestGenesisStateValidate_Basic(t *testing.T) { - app.SetSDKConfig() + chaincfg.SetSDKConfig() testCases := []struct { name string diff --git a/x/pricefeed/keeper/keeper_test.go b/x/pricefeed/keeper/keeper_test.go index 13bbd079..959a636c 100644 --- a/x/pricefeed/keeper/keeper_test.go +++ b/x/pricefeed/keeper/keeper_test.go @@ -12,6 +12,8 @@ import ( tmprototypes "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/0glabs/0g-chain/app" + "github.com/0glabs/0g-chain/x/pricefeed/keeper" + "github.com/0glabs/0g-chain/x/pricefeed/testutil" "github.com/0glabs/0g-chain/x/pricefeed/types" )