Skip to content

Commit f80f4a9

Browse files
authored
refactor(app): remove unnecessary app fields (#2270)
* remove transient key from app * remove memKeys from app * remove privateKeepers * Update CHANGELOG.md
1 parent 6cf5694 commit f80f4a9

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4040

4141
## Unreleased
4242

43+
- [#2270](https://github.com/NibiruChain/nibiru/pull/2270) - refactor(app): remove private keeper struct and transient/mem keys from app
44+
4345
## v2.3.0
4446

4547
- [#2242](https://github.com/NibiruChain/nibiru/pull/2242) - feat(tokenfactory): tx msg SudoSetDenomMetadata

app/app.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,7 @@ type NibiruApp struct {
201201

202202
// keys to access the substores
203203
// TODO(k-yang): remove once depinject is fully integrated
204-
keys map[string]*storetypes.KVStoreKey
205-
tkeys map[string]*storetypes.TransientStoreKey
206-
memKeys map[string]*storetypes.MemoryStoreKey
204+
keys map[string]*storetypes.KVStoreKey
207205

208206
AppKeepers // embed all module keepers
209207

@@ -546,20 +544,6 @@ func (app *NibiruApp) GetKey(storeKey string) *storetypes.KVStoreKey {
546544
return app.keys[storeKey]
547545
}
548546

549-
// GetTKey returns the TransientStoreKey for the provided store key.
550-
//
551-
// NOTE: This is solely to be used for testing purposes.
552-
func (app *NibiruApp) GetTKey(storeKey string) *storetypes.TransientStoreKey {
553-
return app.tkeys[storeKey]
554-
}
555-
556-
// GetMemKey returns the MemStoreKey for the provided mem key.
557-
//
558-
// NOTE: This is solely used for testing purposes.
559-
func (app *NibiruApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey {
560-
return app.memKeys[storeKey]
561-
}
562-
563547
func (app *NibiruApp) kvStoreKeys() map[string]*storetypes.KVStoreKey {
564548
keys := make(map[string]*storetypes.KVStoreKey)
565549
for _, k := range app.GetStoreKeys() {

app/keepers.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ const wasmVmContractMemoryLimit = 32
6969

7070
type AppKeepers struct {
7171
keepers.PublicKeepers
72-
privateKeepers
73-
}
7472

75-
type privateKeepers struct {
7673
capabilityKeeper *capabilitykeeper.Keeper
7774
slashingKeeper slashingkeeper.Keeper
7875
crisisKeeper *crisiskeeper.Keeper

0 commit comments

Comments
 (0)