diff --git a/CHANGELOG.md b/CHANGELOG.md index 169375f5f..7ef2b7b1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 handler to add a maximum commission rate of 25% for validators. * [#1616](https://github.com/NibiruChain/nibiru/pull/1616) - fix(app)!: Add custom wasm snapshotter for proper state exports +* [#1617](https://github.com/NibiruChain/nibiru/pull/1617) - fix(app)!: + non-nil snapshot manager is not guarantted in testapp ### Improvements diff --git a/app/app.go b/app/app.go index a6c690b44..4bd5cf1ed 100644 --- a/app/app.go +++ b/app/app.go @@ -206,17 +206,15 @@ func NewNibiruApp( app.SetAnteHandler(anteHandler) app.SetEndBlocker(app.EndBlocker) - snapshotManager := app.SnapshotManager() - if snapshotManager == nil { - panic("mistakes were made: snapshot manager is nil") - } - if err = snapshotManager.RegisterExtensions( - wasmkeeper.NewWasmSnapshotter( - app.CommitMultiStore(), - &app.WasmKeeper, - ), - ); err != nil { - panic("failed to add wasm snapshot extension.") + if snapshotManager := app.SnapshotManager(); snapshotManager != nil { + if err = snapshotManager.RegisterExtensions( + wasmkeeper.NewWasmSnapshotter( + app.CommitMultiStore(), + &app.WasmKeeper, + ), + ); err != nil { + panic("failed to add wasm snapshot extension.") + } } if loadLatest {