diff --git a/Makefile b/Makefile index 293ec9dc52..f03400aae1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ SUM := $(shell which shasum) COMMIT := $(shell git rev-parse HEAD) CAT := $(if $(filter $(OS),Windows_NT),type,cat) -Version=v0.10.0 +Version=v0.10.5 CosmosSDK=v0.37.9 Tendermint=v0.32.10 Iavl=v0.12.4 diff --git a/app/protocol/protocol_v0.go b/app/protocol/protocol_v0.go index 884df46817..2d0a2f544c 100644 --- a/app/protocol/protocol_v0.go +++ b/app/protocol/protocol_v0.go @@ -305,10 +305,10 @@ func (p *ProtocolV0) produceKeepers() { p.keys[order.OrderStoreKey], p.cdc, appConfig.BackendConfig.EnableBackend, orderMetrics, ) - p.streamKeeper = stream.NewKeeper(p.orderKeeper, p.tokenKeeper, p.dexKeeper, p.accountKeeper, + p.streamKeeper = stream.NewKeeper(p.orderKeeper, p.tokenKeeper, &p.dexKeeper, &p.accountKeeper, p.cdc, p.logger, appConfig, streamMetrics) - p.backendKeeper = backend.NewKeeper(p.orderKeeper, p.tokenKeeper, p.dexKeeper, p.streamKeeper.GetMarketKeeper(), + p.backendKeeper = backend.NewKeeper(p.orderKeeper, p.tokenKeeper, &p.dexKeeper, p.streamKeeper.GetMarketKeeper(), p.cdc, p.logger, appConfig.BackendConfig) // 3.register the proposal types diff --git a/x/backend/mock_test.go b/x/backend/mock_test.go index ac226a08e3..b895a33928 100644 --- a/x/backend/mock_test.go +++ b/x/backend/mock_test.go @@ -147,7 +147,7 @@ func getMockApp(t *testing.T, numGenAccs int, enableBackend bool, dbDir string) mockApp.backendKeeper = NewKeeper( mockApp.orderKeeper, mockApp.tokenKeeper, - mockApp.dexKeeper, + &mockApp.dexKeeper, nil, mockApp.Cdc, mockApp.Logger(), diff --git a/x/dex/keeper/keeper.go b/x/dex/keeper/keeper.go index 7d60e302e5..09227b5c56 100644 --- a/x/dex/keeper/keeper.go +++ b/x/dex/keeper/keeper.go @@ -94,7 +94,7 @@ func (k Keeper) SaveTokenPair(ctx sdk.Context, tokenPair *types.TokenPair) error store.Set(types.GetTokenPairAddress(keyPair), k.cdc.MustMarshalBinaryBare(tokenPair)) store.Set(types.GetUserTokenPairAddress(tokenPair.Owner, keyPair), []byte{}) - if !ctx.IsCheckTx() && k.observerKeeper != nil { + if k.observerKeeper != nil { k.observerKeeper.OnAddNewTokenPair(ctx, tokenPair) } @@ -184,7 +184,7 @@ func (k Keeper) DeleteTokenPairByName(ctx sdk.Context, owner sdk.AccAddress, pro // remove the user-tokenpair relationship k.deleteUserTokenPair(ctx, owner, product) - if !ctx.IsCheckTx() && k.observerKeeper != nil { + if k.observerKeeper != nil { k.observerKeeper.OnTokenPairUpdated(ctx) } } @@ -200,7 +200,7 @@ func (k Keeper) UpdateTokenPair(ctx sdk.Context, product string, tokenPair *type store := ctx.KVStore(k.tokenPairStoreKey) store.Set(types.GetTokenPairAddress(product), k.cdc.MustMarshalBinaryBare(*tokenPair)) - if !ctx.IsCheckTx() && k.observerKeeper != nil { + if k.observerKeeper != nil { k.observerKeeper.OnTokenPairUpdated(ctx) } } @@ -457,6 +457,6 @@ func (k Keeper) GetTokenPairNum(ctx sdk.Context) (tokenPairNumber uint64) { return } -func (k Keeper) SetObserverKeeper(sk exported.StreamKeeper) { +func (k *Keeper) SetObserverKeeper(sk exported.StreamKeeper) { k.observerKeeper = sk }